2002 JI Open Discussion Posted August 19, 2006 Share Posted August 19, 2006 By: Fred Welland - fwelland JR in WebApp with Scriptlet?? 2003-10-24 18:17 I have built a webapp that allows us to run/view reports, as well as add, modify and delete reports. We have added the ability to upload reports (jasper XML files) and even custom data sources to complement more complex designs. All this works well; so I added the ability to upload a scriptlet to be 'run' while a report is being generated. I have built a design using a scriptlet and tested via the ant scripts and it works just the way I want. I create a new report in our webapp, by uploading an XML design and a .class file (that contains my Scriptlet). In the servlet the recieves this XML file and class, I load the class via defineClass then call JasperCompileManager.compileReportToStream to comple the XML file to a jasper file. I get a class not found error that looks like: dori.jasper.engine.JRException: Errors were encountered when compiling report design: /BA/opt/kiva/ias/CloseCommentReport.java:164: Class DateScriptlet not found. value = (java.lang.Integer)(((DateScriptlet)((dori.jasper.engine.JRAbstractScriptlet)parameter_REPORT_SCRIPTLET.getValue())).numberWeekendDays(((java.sql.Timestamp)field_CREATE_DT.getValue()),((java.sql.Timestamp)field_CLOSE_DT.getValue()))); Now after doing a defineClass(null, bytes,0,bytes.lentgh); I checked the name of the newly loaded class and it is the Class that the JasperXML file refers to (There is no package spec). Does anybody have any ideas why I would be getting this issue? Other possible relevant data: -------------------------------- my app server is iPlanet iAS 6sp3 on Solaris my jdk is JDK1.2.2 my jasper engine in 0.4 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now