Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception in JasperFillManager.fillReport() line

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created an application with report features. report features is created via iReport
My application also contains a reports folder containing all .japser files

Here is the code



This throws the following exception :
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2266)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2279)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:57)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:197)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:380)
at sms.ui.ireport.MyiReportViewer.<init>(MyiReportViewer.java:53)
..................
..................

Line no 53 of MyiReportViewer is :
JasperPrint print = JasperFillManager.fillReport(
stream, parameter, con);

What changes should i do?
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone please help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic