Thursday, February 24, 2011

ArcIMS, Tomcat and IReport Issues

Team,
I got a task to create some new IReport Templates. IReports will compile the report template into .jasper files which can be called from a .jsp application. It’s all Java and open source.
 This IReport application was installed on a Windows 2003 Server running ArcIMS 9.2 Build 514.2165, Apache Tomcat 5.5 and JDK 1.5.0_15.  
The first problem I faced was, the reports were blank. In the preview it will work fine. But when the .jsp file calls the .jasper file, only the Header and Footer will show-up but not the detailed data section of the report. I posted the problem in this link.
After researching many links I copied few selected .jar files of the IReport\modules\ext folder to the Tomcat\lib folder then I got this error.
================================================================
ERROR: failed to generate report...
...Error: java.lang.ClassCastException: cannot assign instance of net.sf.jasperreports.engine.base.JRBaseRectangle to field net.sf.jasperreports.engine.base.JRBasePen.penContainer of type net.sf.jasperreports.engine.JRPenContainer in instance of net.sf.jasperreports.engine.base.JRBasePen
================================================================
Again did some more research and I found copying .jar files in the %JAVA_HOME%\jre\lib\ext folder might help? But it didn’t.
The biggest problem was to find the exact .jar files which is required by the IReport latest version 4.0. Whenever I copied the new version .jar files either ArcIMS will break or IReports will not work. IReports latest version 4.0 never worked for me.
Then finally I decided to rollback with an advice of a friend. There was an IReport 1.3.3 version installed on the same server. Once I rolled back to this old version then everything started to work fine.
In conclusion with the existing ArcIMS/Java and Tomcat combination IReport latest version 4.0 will not work.
If I find a workaround I will post back again.

No comments:

Post a Comment

All Blogs so far ...