我面临一个非常奇怪的问题。当我从我的 java 类调用 .jrxml 文件时,一切正常。但是当我从批处理文件中调用相同的 java 类时,我无法生成报告。控制台显示一些这样的错误。这个你能帮我吗。
堆栈跟踪:
2012-12-21 16:15:13,466 net.sf.jasperreports.engine.fill.JRFillSubreport : prepare - Fill 31497899: exception java.lang.NullPointerException
at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:1034??)
at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:1004)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementCo??ntainer.java:258)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageHeader(JRVerticalFille??r.java:403)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFill??er.java:264)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.ja??va:128)
net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillBandNoOverflow(JRVerticalF??iller.java:439)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.j??ava:609)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.jav??a:59)
at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRu??nner.java:205)
at java.lang.Thread.run(Thread.java:619)