on 06-27-2011 10:55 AM
Hi,
I am using nwds 7.1 and jdk 1.5. I have created a java application and deployed on the server which has j2sdk1.4.2_26-x64. I am getting the error as below.
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/wipro/jnj/auditlogreport/AuditLogReport (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
I understand that its because of the jdk version. But do i need to use 1.4 jdk, if at all i want to use the same, nwds 7.1 supports it?
and my program will work the same even if i change the jdk to lower version. Please help.
Thanks in advance.
Hello,
You are facing this error because you are compiling your code in 1.5 and running it on 1.4...
Thus this version mismatch occurs.
To correct it in your NWDS project right click and select properties...
In properties window select Java Build path...
Select tab libraries...
Select Add Libraries...
In the wizard select JRE system library....click next and select JRE 1.4....
Click finish...
Remove 1.5 JRE entry from Libraries tab....
close the dialogue box...
Now build and deploy your project and see if you face any error ........then revert back.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasanthi,
Please check the server version.
If the server version is CE7.1 then you can use NWDS 7.1 and jdk 1.5 to deploy the applications in the server.
If the server version is 7.0 then you should use NWDS7.0 with same SP and patch level to avoid further any issue and jdk 1.4.2 to deploy the applications in the server.
Open the URL http://<host>:<port>/index.htm >> system information
Best Regards
Arun Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saurabh,
Thanks for your time and inputs. But with the changes you have mentioned..I am getting this error when i ran the program on my local machine itself. When i was using 1.5 it was running fine on my machine but was giving error on server. kindly advise.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What error you are getting....
Follow below steps and see if similar error re-appears :
I hope you are using DC.
1. Right click on your DC project.....select Developement Component and select Build...then Deploy similarly.
2. Now right click on your EAR file and select "Deploy to J2EE engine"......
This is a orthodox approach...but it worked for me once !!
What happened is:
1. On your machine you must be having 1.5 as JDK version....
Earlier when you compiled your code on 1.5 in NWDS...it was running well on your machine because there you were using 1.5....
and was not running on server because it was having 1.4 as java version....
2. Now, when I suggested you to change java version in NWDS....to 1.4...it started giving error on your machine also....because there then this type mismatch occurs on your machine itself..as an replica of your server earlier.....
BUT now NWDS compile time JDK version and server runtime JDK versions match...both are on 1.4......
I guess now if you will try deploying it on server.....the version mismatch error will not exist on server end.....you might get some new error on server.......but i guess not the same error.......
Check it....if on server things are OK....I will let you know how han u update java path on your local machine.......
Edited by: Saurabh Agarwal on Jun 27, 2011 2:52 PM
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.