-->
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: Where did @OnDelete go?
PostPosted: Thu Feb 16, 2012 12:06 pm 
Newbie

Joined: Fri Oct 14, 2005 9:55 am
Posts: 5
Location: Bergen, Norway
Hi - I'm on the 3.6.10 version of hibernate entitymanager/core.
In earlier versions I could add the hibernate-annotations to get hold of @OnDelete and get properly DDL generated with on cascade delete.

If I add hibernate-annotations to the application I get a bootup fail:
Caused by: java.lang.NoSuchMethodError: org/hibernate/cfg/AnnotationConfiguration.getPersisterClassProvider()Lorg/hibernate/persister/PersisterClassProvider;
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1055) ~[hibernate-entitymanager-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:689) ~[hibernate-entitymanager-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) ~[hibernate-entitymanager-3.6.10.Final.jar:3.6.10.Final]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225) ~[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310) ~[spring-orm-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479) ~[spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419) ~[spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
... 42 common frames omitted


And if I remove it the DDL will be generated without cascading delete (which is an error).

So - what to do?


Top
 Profile  
 
 Post subject: Re: Where did @OnDelete go?
PostPosted: Thu Feb 16, 2012 12:41 pm 
Newbie

Joined: Fri Oct 14, 2005 9:55 am
Posts: 5
Location: Bergen, Norway
Baah - my fault - sorry for the noise - the annotation had moved to the hibernate-core artifact - and I had a runtime scope.
Everything working like a charm now.


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.