Jump to content
We've recently updated our Privacy Statement, available here ×

NullPointerException while using HtmlComponent (.jasper)


darkoverlord

Recommended Posts

 

Hello everybody,

i am facing a NullPointerException with JasperReports and htmlComponent for quite a while now and i have no idea whats the problem.

I have a simple report with standard htmlcomponent (standard "HTML paragraph" content directly from palette). When i use the .jasper file and

 jasperPrint = JasperFillManager.fillReport( .jasper )

it throws a NullPointerException in HtmlComponentFill

when i use the jrxml of the same report instead of the .jasper and compile it with

    JasperDesign design = JRXmlLoader.load(".jrxml"));
    return JasperCompileManager.compileReport(design);

it is working well. When i remove the htmlComponent from report and compile it (in jaspersoft studio) the .jasper is working fine.

I would be glad to hear your ideas about this

Max

Log: [/code]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]Caused by: java.lang.NullPointerExceptionat net.sf.jasperreports.components.html.HtmlComponentFill.copy(HtmlComponentFill.java:201) 
[htmlcomponent.jar:] at net.sf.jasperreports.components.html.HtmlComponentFill.prepare(HtmlComponentFill.java:127) [htmlcomponent.jar:] at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:150) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:330) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:382) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:357) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2025) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:753) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:263) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:123) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:539) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:411) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:115) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:667) [jasperreports-6.0.3.jar:6.0.3] at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:983) [jasperreports-6.0.3.jar:6.0.3] [/code]


 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

i am using a jboss application server and the htmlcomponent.jar is in the lib directory of my project. When it is missing i would expect class not found but no null pointer exception. Further on, when i compile it at runtime, it works well. Just the precompiled version by Jaspersoft Studio is not working.

regards  

Max

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...