Vivek Agarwal’s Portal/Java Blog

An IBM Gold Consultant’s weblog about IBM, Lotus, WebSphere, J2EE, IT Processes, and other IT technologies

WebSphere Portal Portlet Error – Unsupported major.minor version 49.0

Posted by Vivek Agarwal on December 19, 2007


Today was a fun day getting the base JSR 168 polls portlet created – I actually got involved doing pair programming with a team member who is new to the Portal world. We chose to create this portlet as a basic JSR168 portlet without Struts or Faces support – the rationale being that we may want to target this portlet at platforms other than WebSphere Portal as well that may not provide the required support for anything other than a basic JSR168 portlet. We did the development in Rational Application Developer (RAD) on my Vista laptop and today pushed me over the edge with Vista. I had RAD crash on me a few times, and now I am convinced that I need to make the time over my winter holidays to just go ahead and downgrade to XP – yes, I am ready to admit defeat on the Vista front and move on with life! Anyway I digress – back to the topic at hand. We got the portlet skeleton coded up and the war file built, and attempted to deploy the portlet on WebSphere Portal v6.0.1.1. And WebSphere Portal rejected the portlet war file with this message –

EJPAQ1316E: Could not process the selected file from the browse button as a WAR file. Make sure it is a WAR file and try again.

The underlying error was –

java.lang.ClassNotFoundException: DeploymentClassLoader.findClass: java.lang.UnsupportedClassVersionError: com/xtivia/poll/portlet/display/PollsDisplayPortlet (Unsupported major.minor version 49.0)
at com.ibm.wps.pe.mgr.deployment.util.DeploymentClassLoader.findClass(DeploymentClassLoader.java:73)
at com.ibm.wps.pe.mgr.deployment.util.DeploymentClassLoader.loadClass(DeploymentClassLoader.java:133)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.ibm.wps.pe.mgr.deployment.std.DeploymentManagerStandardImpl.checkForResources(DeploymentManagerStandardImpl.java:1434)
at com.ibm.wps.pe.mgr.deployment.std.DeploymentManagerStandardImpl.getPortletApplicationInfo(DeploymentManagerStandardImpl.java:1315)
at com.ibm.wps.pe.mgr.deployment.AbstractPortletDeploymentManagerImpl.getApplicationInfo(AbstractPortletDeploymentManagerImpl.java:790)
at com.ibm.wps.pe.mgr.deployment.AbstractDeploymentManagerImpl.getApplicationInfo(AbstractDeploymentManagerImpl.java:1586)
at com.ibm.wps.pe.mgr.AbstractApplicationManagerImpl.getApplicationInfo(AbstractApplicationManagerImpl.java:356)
at com.ibm.wps.pe.mgr.AbstractApplicationManagerImpl.getApplicationInfo(AbstractApplicationManagerImpl.java:332)

This is the first time that I had seen this error message. However, it was relatively easy to see from the top Google hits that this error is usually related to incompatible versions between the compiler used to build a jar/war file and the one used by WebSphere Portal. And that certainly was the root cause for my error as well. WebSphere Portal v6.0.1.x uses JDK v1.4 while I was running RAD using JDK v1.5 and RAD had used v1.5 for the compile. Switching the RAD setting for JDK Compliance->Compiler compliance level to v1.4, compiling, building the new war file and redeploying the portlet resolved the issue!

Advertisements

One Response to “WebSphere Portal Portlet Error – Unsupported major.minor version 49.0”

  1. Gokul said

    If the complaince level already JDK 1.4, then how to resolve this error? i’m using RAD 6.0 (JDK complaince level 1.4), trying to install on WPS 6.0.1. I am getting this error, can you please tell me how to resolve this error? Thanks.

Sorry, the comment form is closed at this time.

 
%d bloggers like this: