CoffeeKid Posted August 8, 2007 Share Posted August 8, 2007 Hello, I've created a custom class called SecToTime that converts seconds (a long value) into a string formated in XX:XX:XX So this would cause an long value of 209 to be come 00:02:29 I've made the jar file then added it to iReports, and used the following in a text field:Code:new SecToTime($V{variable}.longValue()).toString() when i compile the report in Ireports, it works perfect, but trying to add the .jar file to jasper server has caused me some problems. I've added the file to the common/lib dir in tomcat, even tried to modify tomcat's class path, all of which give me the following error: Error Message: org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@1eaf25d targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@10bfe2c, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow' -- action execution attributes were 'map[[empty]]'; nested exception is com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : new SecToTime($V{loginNum}.longValue()).toString()Error Trace: org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@1eaf25d targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@10bfe2c, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow' -- action execution attributes were 'map[[empty]]'; nested exception is com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : new SecToTime($V{loginNum}.longValue()).toString() org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@1eaf25d targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@10bfe2c, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow' -- action execution attributes were 'map[[empty]]'; nested exception is com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : new SecToTime($V{loginNum}.longValue()).toString()Caused by: com.jaspersoft.jasperserver.api.JSExceptionWrapper: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.findBootstrapClass(Native Method) at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:891) at java.lang.ClassLoader.loadClass(ClassLoader.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1270) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at UserTimeStats_1186539169339_594747.evaluate(UserTimeStats_1186539169339_594747:275) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:186).... What am i doing wrong? ThanksCoffeeKid Link to comment Share on other sites More sharing options...
lucianc Posted August 8, 2007 Share Posted August 8, 2007 CoffeeKid wrote:java.lang.UnsupportedClassVersionError: Bad version number in .class file The JVM used by tomcat cannot load your compiled. Use the same Java version or specify source and target versions when compiling the class. Regards,Lucian 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