-->
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.  [ 2 posts ] 
Author Message
 Post subject: Upgrading Tomcat 6 embedded JBoss to Hibernate 3.6 Beta
PostPosted: Sat Aug 14, 2010 2:36 pm 
Beginner
Beginner

Joined: Thu May 20, 2010 12:31 pm
Posts: 28
Hello,

how do you upgrade to Hibernate 3.6 Beta 2 with Tomcat 6 and embedded JBoss?

I removed the hibernate-all.jar from CATALINA/lib

I then downloaded

hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-entitymanager.jar
hibernate-validator-4.1.0.Final.jar
hibernate3.jar

and placed them into CATALINA/lib instead. However, I get an exception with my web app:

Code:
java.lang.IncompatibleClassChangeError: class org.hibernate.cfg.ExtendedMappings has interface org.hibernate.cfg.Mappings as super class
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
   at org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:107)
   at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:124)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
   at com.kawoolutions.bbstats.servlet.BasketballStatsServlet.<init>(BasketballStatsServlet.java:43)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at java.lang.Class.newInstance0(Class.java:355)
   at java.lang.Class.newInstance(Class.java:308)
   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1116)
   at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
   at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


I'm out of ideas. Has anyone gotten this setup to work? Am I missing anything?

Karsten


Top
 Profile  
 
 Post subject: Re: Upgrading Tomcat 6 embedded JBoss to Hibernate 3.6 Beta
PostPosted: Mon Aug 16, 2010 12:37 pm 
Beginner
Beginner

Joined: Thu May 20, 2010 12:31 pm
Posts: 28
Replying to self...

You have to omit

hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-entitymanager.jar

see viewtopic.php?f=1&t=1004779

from the lib dir, because starting from Hibernate 3.5 these are included in the core distribution.

Karsten


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.