Thursday, November 5, 2020

Weblogic -- Unsupported Major.Minor Version 52.0 , while making the custom application available to all clients

This issue was escalated to me during a Custom application migration process. A custom application was trying to be migrated from one Weblogic Server to another Weblogic Server, and although, all the things were in place, the application couldn't be deployed to the new Welogic. It was staying in Prepared state, but couldn't be actived for servicing all the requests.

Source Weblogic was running on Windows and target Weblogic was running on Linux.

Source Weblogic was configured to use JDK 1.8 and it was the default java configured for its Weblogic OS user.  However; in the target Weblogic, we had JDK 1.7.. Target Weblogic was configured to use JDK 1.7 and it was also the default java configured for its Weblogic OS user.

The problem was actually arised just after the deploy, when we tried to start the custom application..

The error in Weblogic console was related with a java major version mismatch.. (Ofcourse, I can say it very easily now after long analysis :) 

"Unsupported major.minor version 52.0" was the error which was seen in the logs and it was directly related with the Java major version of the environment. It was related with the class file format, and the problem was caused by using a lower JDK (lower than the one used in compile time) during runtime.

Here is the list of major version number of the class file format being used.

Java SE 15 = 59 (0x3B hex),
Java SE 14 = 58 (0x3A hex),
Java SE 13 = 57 (0x39 hex),
Java SE 12 = 56 (0x38 hex),
Java SE 11 = 55 (0x37 hex),
Java SE 10 = 54 (0x36 hex),[3]
Java SE 9 = 53 (0x35 hex),[4]
Java SE 8 = 52 (0x34 hex),
Java SE 7 = 51 (0x33 hex),
Java SE 6.0 = 50 (0x32 hex),
Java SE 5.0 = 49 (0x31 hex),
JDK 1.4 = 48 (0x30 hex),
JDK 1.3 = 47 (0x2F hex),
JDK 1.2 = 46 (0x2E hex),
JDK 1.1 = 45 (0x2D hex).

As you see above, Major Version 52 maps to Java Se 8, so JDK 8..

In our case, Source Weblogic was configured to use JDK 8 as I already mentioned.. So the cause was the JDK 7 which was being used in the target Weblogic.

As for the solution, we upgraded the JDK version of the target environment :) We made Weblogic to use JDK8 and we made the OS user of the Weblogic use JDK 8 for locating its default java (just in case).. So, we made configuration for JDK 8 in in OS & WLS configurations. (acutally installed JDK 8 on the Linux OS as well)

Well, this was the tip of the day :)  In our case, it was a minor but blocker error, so I found it useful to share with your. See you.

No comments :

Post a Comment

If you will ask a question, please don't comment here..

For your questions, please create an issue into my forum.

Forum Link: http://ermanarslan.blogspot.com.tr/p/forum.html

Register and create an issue in the related category.
I will support you from there.