2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 By: yebob - yebob jasper applet exception in webshpere 2004-09-09 19:21 I created a applet using JRViewer class to display the *.jrprint temporary files generated by jsp on server side. The application can work perfect in Tomcat5.0.25, however, after deployment to websphere 5.0.2 the following exception occurs when the JRViewer is instantialized. I've tried to display some browser side jrprint files or make websphere use Sun JDK(since the default JDK websphere use is IBM JDK, but Tomcat using IBM JDK also works properly),and all the attempts fail. If there is anyone who encountered the similar problem ever? java.lang.ClassFormatError: <!-- Copyright © 2002 by ObjectLearn/ All Rights Reserved/ --> (Bad magic number) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:157) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:93) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:174) at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:93) at dori.jasper.engine.util.JRStyledTextParser.<init>(JRStyledTextParser.java:145) at dori.jasper.engine.export.JRGraphics2DExporter.<init>(JRGraphics2DExporter.java:148) at dori.jasper.engine.print.JRPrinterAWT.printPageToImage(JRPrinterAWT.java:290) at dori.jasper.engine.print.JRPrinterAWT.printPageToImage(JRPrinterAWT.java:149) at dori.jasper.engine.JasperPrintManager.printPageToImage(JasperPrintManager.java:440) at dori.jasper.view.JRViewer.refreshPage(JRViewer.java:1308) at dori.jasper.view.JRViewer.<init>(JRViewer.java:208) at EmbeddedViewerApplet.init(EmbeddedViewerApplet.java:125) at sun.applet.AppletPanel.run(AppletPanel.java:353) at java.lang.Thread.run(Thread.java:534) By: Michael Bauer - mbabauer RE: jasper applet exception in webshpere 2004-09-14 11:28 Looks like you are trying to run a class compiled on a newer version of JDK on an older version of JVM. Something like trying to run a class file compiled for JDK 1.5 on JVM 1.3.1. The JVM (actually, the class loader) is complaining that the class has some wierd format it can't understand. By: yebob - yebob RE: jasper applet exception in webshpere 2004-09-14 18:40 Then how to explain that the Tomcat can work properly? Even make Tomcat use the same IBM JDK as webshpere uses. My browser side JVM is definitely new enough! 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