kschmitte Posted September 10, 2007 Share Posted September 10, 2007 Hi all, I have created a report with a small scriptlet in iReport. Report runs fine in iReport. Now I want to deploy the report in JasperServer 2. But - I don't know how to connect the report to the scriptlet. I tried to put the scriptlet in a jar file and add the jar to the "Resources" section of my Report Unit. When I run this from JasperServer I get a message which doesn't help at all. When I run the report from within the iReport JasperServer plugin, I get the message that the class could not be found: java.lang.Exception: 1 - Report design not valid : 1. java.lang.ClassNotFoundException: quarterlyExchangedMailScriptlet A research in this forum showed me no helpful article. A restart of the machine JasperServer is running on (was needed anyway) did not change the behaviour. What am I doing wrong? Do I need to obey some naming schema? Or something else? Thanks for any help! Kai Link to comment Share on other sites More sharing options...
kschmitte Posted September 18, 2007 Author Share Posted September 18, 2007 So, now I went little further with my investigations:1) I needed to put the *.class and *.java files in the root of the JAR file. Otherwise the report could not be validated in JasperServer and the addition of the JAR was not successful.2) I needed to add the iReport.jar to the Tomcat where I run JasperServer 2 on. But, then - again no way to get further:From iReport I get:java.lang.Exception: 1 - Report design not valid : 1. java.lang.ClassNotFoundException: QuarterlyExchangedMail_jrxml_1190130107948Scriptlet at com.jaspersoft.jasperserver.irplugin.wsclient.WSClient.runReport(WSClient.java:382) at com.jaspersoft.jasperserver.irplugin.wsclient.WSClient.runReport(WSClient.java:299) at com.jaspersoft.jasperserver.irplugin.ReportRunner.run(ReportRunner.java:73) at java.lang.Thread.run(Unknown Source)This seems as if the mechanism of running reports from the PlugIn in iReport is not capable of using scriptlets. and in JasperServer the message is:java.io.NotSerializableException: net.sf.jasperreports.engine.design.JRValidationFaultjava.io.NotSerializableException: net.sf.jasperreports.engine.design.JRValidationFault at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.ArrayList.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[...] Has anyone an idea how to get around this? Does this work at all? Or are scriptlets only for iReport exceution? Link to comment Share on other sites More sharing options...
kschmitte Posted September 18, 2007 Author Share Posted September 18, 2007 just for anyone interested, I'm trying to get this: http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=9&id=29748#29748 running.I need to get the value of the last row in the current one to calculate the percentage deviaton... Link to comment Share on other sites More sharing options...
dmoreland Posted May 2, 2008 Share Posted May 2, 2008 I am receiving the exact same message and I cannot bypass. Scriptlet works fine in iReport but deployed as above and I receive the exact same message. Did you manage to solve this error? Scriptlets are very poorly documented! Link to comment Share on other sites More sharing options...
kschmitte Posted May 5, 2008 Author Share Posted May 5, 2008 I have stopped development of scriplets and moved everything into a simple JAR. This jar is part of my JasperServer Repository and needs to be linked as resource for every report. For iReport I need to keep the java *.class and *.java files in the folder where the report jrxml is stored - then I don't need to change anything in iReport or the report itself. Gruss Kai Schmitte Link to comment Share on other sites More sharing options...
yskripch Posted July 2, 2008 Share Posted July 2, 2008 I am also getting a similar error. Could you please email me at YSkripchenko@gmail.com about how you are adding the Jar file. thanks in advance. 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