File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes Unsupported major.minor version 49.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Unsupported major.minor version 49.0" Watch "Unsupported major.minor version 49.0" New topic
Author

Unsupported major.minor version 49.0

Angus Rose
Ranch Hand

Joined: Jun 21, 2002
Posts: 56
I am currently developing a web-app based on jsf/myfaces. I am developing it in Jdeveloper 10.1.3 which is using JDK 5 for compilation. I am deploying to 10g AS. When I run the app, I get the following exception:

javax.faces.FacesException: uk/ac/ukbiobank/crms/infobean (Unsupported major.minor version 49.0)at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)at java.lang.Thread.run(Thread.java:534)Caused by: javax.servlet.ServletException: uk/ac/ukbiobank/crms/infobean (Unsupported major.minor version 49.0)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:595)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:537)at _helloWorld._jspService(_helloWorld.java:164)[SRC:/helloWorld.jsp]at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:253)at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)... 12 more.

I have edited the server.xml to also point at jdk 5 but to no avail. Any suggestions anyone?

Thanks

Angus
Amit Kumar Kaushik
Greenhorn

Joined: Jan 12, 2006
Posts: 11
1. Uninstall all versions of jdk from system along with respective Runtime Environments and install jdk1.5 again.

2. If you are using ecpilse then go to Package Explorer and right click on your project-> Properties.

Go to java compiler in properties and set your compiler compliance level to 1.5. click apply and ok.

build the project again and try againg for the same.
Alex Varghese
Greenhorn

Joined: Apr 04, 2007
Posts: 1
Hi,

I was using Oracle Application Server Containers for J2EE 10g (10.1.2.0.2) to deploy a Java/Struts application. I'm using JDK 1.4.2_05 to compile it and the application server uses the same version too. When I deploy the application, I get the following error:

- Begin event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:259)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1227)
at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingParser.java:143)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:281)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:195)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2354)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4795)
at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2821)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:680)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.UnsupportedClassVersionError: gov/nih/nci/ctep/ipad/form/UrlListForm (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at com.evermind.util.OC4JSecureClassLoader.defineClassEntry(OC4JSecureClassLoader.java:172)
at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:1179)
at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:1065)
at com.evermind.naming.ContextClassLoader.findClass(ContextClassLoader.java:404)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:143)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.apache.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.java:320)
at org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:191)
... 29 more
- Parsing error processing resource path
java.lang.reflect.InvocationTargetException
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1227)
at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingParser.java:143)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:281)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:195)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2354)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4795)
at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2821)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:680)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)


Basically I'm getting an invocation exception that's traced back to jdk version. I seem to be using the same version to compile and deploy the application. Why should it still be crying foul?

thanks
alex
sriram viswanathan
Greenhorn

Joined: Jul 27, 2007
Posts: 12
Hi,
I am also faced with a similar problem in 10g App Server
java.lang.UnsupportedClassVersionError: abc/xyz/thirdpartyclass (Unsupported major.minor version 49.0)at java.lang.ClassLoader.defineClass0(Native Method)at java.lang.ClassLoader.defineClass(ClassLoader.java:539)at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.OC4JSecureClassLoader.defineClassEntry(OC4JSecureClassLoader.java:172)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].naming.ContextClassLoader.defineClass(ContextClassLoader.java:1179)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].naming.ContextClassLoader.defineClass(ContextClassLoader.java:1065)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].naming.ContextClassLoader.findClass(ContextClassLoader.java:404)at java.lang.ClassLoader.loadClass(ClassLoader.java:289)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].naming.ContextClassLoader.loadClass(ContextClassLoader.java:143)at java.lang.ClassLoader.loadClass(ClassLoader.java:235)at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)at com.iii.premia.interfaces.solvese.InterfaceImplPremiaSolve.getInitialisedSolveLink(InterfaceImplPremiaSolve.java:423)at com.iii.premia.interfaces.solvese.InterfaceImplPremiaSolve.callCenterPayment(InterfaceImplPremiaSolve.java:256)at com.iii.premia.interfaces.solvese.__InterfaceImplPremiaSolveStatelessWrapper.invokeMethod(__InterfaceImplPremiaSolveStatelessWrapper.java:130)at oracle.j2ee.ws.InvocationWrapper.invoke(InvocationWrapper.java:380)at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:642)at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1173)at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:792)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)at java.lang.Thread.run(Thread.java:534)

Most of the reference materials/forums suggest recompiling the class in a lower version of java...but unfortunately that is not an option, since it is a third party utility class.

It will be greatif anyone can suggest ways of :
  • Changing the JVM used by the 10g appserver 10.1.2 to Sun JDK 1.5
  • Setting 1.4 as the target level of (possibly obfuscated) java class files without having access to source files
  • Identifying the java version of class file (I tried to read the version information in Hexadecimal after CAFEBABE marker... but unable to makeout anything from it)
  • Could the jar utility version used be a problem (if not the actual class)?


  • [ July 27, 2007: Message edited by: sriram chandra mouli viswanathan ]

    Thanks,<br />Sriram
    Ulf Dittmer
    Marshal

    Joined: Mar 22, 2005
    Posts: 41509
        
      53
    Originally posted by sriram chandra mouli viswanathan:
    Setting 1.4 as the target level of (possibly obfuscated) java class files without having access to source files

    That's not possible. The files need to be recompiled, so unless you have the source you're out of luck.

    Identifying the java version of class file (I tried to read the version information in Hexadecimal after CAFEBABE marker... but unable to makeout anything from it)

    The next 4 bytes after CAFEBABE contain the minor and major version of the class file format. For Java 5, it would be "00 00 00 31", with the "31" being hexadecimal for "49".


    Ping & DNS - my free Android networking tools app
    sriram viswanathan
    Greenhorn

    Joined: Jul 27, 2007
    Posts: 12
    Originally posted by Ulf Dittmer:

    The next 4 bytes after CAFEBABE contain the minor and major version of the class file format. For Java 5, it would be "00 00 00 31", with the "31" being hexadecimal for "49".


    Thank you so much for the help ... My next task is to try and figure out a way to make the Oracle Application Server (OC4J 10.1.2) to use the Sun JDK 1.5 instead of the SDK bundled with OAS
    sriram viswanathan
    Greenhorn

    Joined: Jul 27, 2007
    Posts: 12
    Possible Solution:
    There is a way we can change the sdk used by oc4j from the Application Server Control application, make "Java Executable" value as the required sdk executable path.

    Word of caution:
    OAS 10.1.2 is certified only for sun sdk 1.4 and we are strongly recommended to adhere to certified versions, since those are the ones that are tested thoroughly. For this reason, we are not going for a sdk upgrade.

    Thanks for your help though
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
     
    subject: Unsupported major.minor version 49.0