-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate 3.1.3: got unsupported major.minor version 49.0
PostPosted: Tue Aug 22, 2006 3:53 pm 
Newbie

Joined: Wed Mar 01, 2006 3:45 pm
Posts: 9
I just downloaded Hibernate 3.1.3 binary and tried to run it on WebSphere 6.0 (JDK1.4). I assumed that Hibernate 3.1.3 was compiled with JDK1.4.2? But why am I getting a "49" (JDK1.5) major version?

Thanks.

Hibernate version: 3.1.3

Full stack trace of any exception that occurs:

java.lang.UnsupportedClassVersionError: org/hibernate/cfg/SecondPass (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:576)
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
at com.tdemand.util.HibernateConfiguration.init(HibernateConfiguration.java:32)
at com.tdemand.init.TdAppInitServlet.init(TdAppInitServlet.java:62)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:262)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1319)
at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:84)
at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:540)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:379)
at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:114)
at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:127)
at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:776)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:729)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:140)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:360)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1019)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1028)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:538)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:724)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:683)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
----

Name and version of the database you are using: SQLServer2000


Top
 Profile  
 
 Post subject: Still doesn't work after compiled with JDK1.4
PostPosted: Tue Aug 22, 2006 4:49 pm 
Newbie

Joined: Wed Mar 01, 2006 3:45 pm
Posts: 9
I compiled the src with JDK1.4. I modified "build.bat" to:

Code:
C:\j2sdk1.4.2_09\jre\bin\java -cp "lib/ant-launcher-1.6.5.jar;C:\j2sdk1.4.2_09\lib\tools.jar;C:\j2sdk1.4.2_09\jre\lib\rt.jar" org.apache.tools.ant.launch.Launcher -lib lib %1 %2 %3 %4 %5


But I'm still getting the same error:

java.lang.UnsupportedClassVersionError: org/hibernate/cfg/SecondPass (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:576)
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:414)


Could sb. point out what I did wrong?

Thanks in advance.


Top
 Profile  
 
 Post subject: problem solved
PostPosted: Tue Aug 22, 2006 8:52 pm 
Newbie

Joined: Wed Mar 01, 2006 3:45 pm
Posts: 9
Problem solved.

Some other people secretly put hibernate-annotation.jar in the classpath which was obviously compiled with JDK1.5 and conflicted with "SecondPass" class in the new hibernate3.jar. Removed the not needed jar and it worked.

Case closed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.