1
votes

I am deploying Solr(4.10).war on Websphere 8.5.5
I get the 'Bad Major Version" Error for the all the classes configured in the web.xml.


Below is the Error log for class: RedirectServlet

com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinish SRVE0266E: Error occured while initializing servlets: {0} java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/apache/solr/servlet/RedirectServlet, offset=6 at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:264) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:853) at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:763) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:586) at java.lang.ClassLoader.loadClass(ClassLoader.java:650) at java.lang.Class.forNameImpl(Native Method) at java.lang.Class.forName(Class.java:213)


I checked the version of the class: org.apache.solr.servlet.RedirectServlet both in my war as well at the deployed location.

javap -verbose -classpath E:\programs\tech-certification\solr\solr-copy\WEB-INF\lib\solr-core-4.10.2.jar org.apache.solr.servlet.SolrDispatchFilter | findstr "major"

51

C:\Users\NI003KU>javap -verbose -classpath C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\mvm-wNode01Cell\solr.ear\solr.war\WEB-INF\lib\solr-core- 4.10.2.jar org.apache.solr.servlet.RedirectServlet | findstr "major"

51

Does anyone has any insight on it?

2

2 Answers

1
votes

I think Websphere 8.5.5 comes with JDK6 by default. Class version 51 is JDK 7. Update your Websphere to JDK7 and it will be fine.

1
votes

Your code is compiled with Java 7. By default WebSphere 8.5.5 comes with Java 6. You will need to download IBM Java 7, install it and switch jdk used by your server to 7 using managesdk command line.

If you have licensed WebSphere version download Java SDK via Passport Advantage, if you are using Developers version - download it from here. In either case, you will need to install SDK using Installation Manager. Setting JAVA_HOME for third party SDK is not good.