-->
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: upgrade from hibernate core 3.3.0 to hibernate 3.5.0 CR2
PostPosted: Wed Mar 03, 2010 10:39 am 
Newbie

Joined: Fri Aug 15, 2008 3:33 am
Posts: 17
Hi,

I am working to an application which was developed based on the hibernate core 3.3.0.
Right now, I want to use Hibernate Validator 4.0.2 which is implemented based on JSR 303. But I cannot make the both frameworks to work together (I mean hibernate core 3.3.0 and hibernate validator 4.0.2).

In the same time I try to upgrade the hibernate core but other errors are thrown:
java.lang.NoClassDefFoundError: javax/persistence/spi/ProviderUtil
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:137)
at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:895)
at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:184)
at com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
at com.sun.enterprise.server.ExtendedApplicationLoader.doLoad(ExtendedApplicationLoader.java:134)
at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:238)
at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:226)
at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:224)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:446)
at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:134)
at com.sun.enterprise.server.PEMain.run(PEMain.java:409)
at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
Caused by: java.lang.ClassNotFoundException: javax.persistence.spi.ProviderUtil
at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:738)
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:628)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


Is there any tips or a tutorial which shows how to make this upgrade?

Thank you in advance for every tip. I have invested already so much time to accomplish this with no result until now.


Top
 Profile  
 
 Post subject: Re: upgrade from hibernate core 3.3.0 to hibernate 3.5.0 CR2
PostPosted: Wed Mar 03, 2010 10:48 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
If you work with hibernate 3.5.0 CR2
then you must replace in your classpath

ejb3-persistence.jar

with

http://repository.jboss.org/maven2/org/hibernate/java-persistence/jpa-api/2.0-cr-1/jpa-api-2.0-cr-1.jar


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.