on 01-24-2011 6:08 PM
Hi,
Actually I am new to BO Java SDK. When i try to run the java class file from the cmc, the instance shows sucess.But the log generated on the Unix throws an exception. I checked the versions on the job server (Its JDK 1.5) and where i am developing my code and compiling is Eclipse (It has also JDK 1.5). But the thing is why i am getting this kind of exception (UnsupportedClassVersionError: Bad version number in .class file).Could anyone help me in solving this exception.
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.crystaldecisions.sdk.plugin.desktop.program.internal.ProgramWrapper.main(ProgramWrapper.java:49)
Thanks,
Ohm
When a Java program object is run by the program job server, it does not use the version of Java that ships with BOE. Instead, it uses the version of Java that %JAVA_HOME% points to for Windows. I assume the same is true for Unix as well. Run java -version to see what version is the default for your system and check that against the compliance level of your code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the exception that is thrown by the class loader on the BOE server is quite typical if the class file you try to run on the plattform was compiled with a newer JDK version that the one that is used on the BOE server.
Doublecheck the version on the server with the version of your compiler. If you use eclipse look in your projects properties under Java compiler and adjust according to the version on the server. After compiling with another compiler you need to upload the java programm again or replace the file directly in the FileStore. Typically there is no other reason for this error.
Regards,
Harald
XI 3.x, the JDK path is specified by the registry setting:
HKLM\SOFTWARE\Business Objects\Suite 12.0\Installer\JDKPath
The default is the Java JVM supplied with SAP BusinessObjects.
Having it specified by JAVA_HOME would lead to all sorts of admin issues.
In pretty much all cases I've encountered, cause of the issue was that the compile version was newer than the one being used.
Sincerely,
Ted Ueda
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.