You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Thierry.M" <mo...@neuf.fr> on 2008/09/02 10:38:17 UTC

Hibernate annotations and CXF annotations compatibility ?

I try to integrate Spring 2.5.5, Hibernate (3.2.6) as a JPA provider using
annotations (Hibernate-annotations 3.3.1.GA + hibernate-entitymanager
3.3.2.GA) which seems to rely on asm-1.5.3. For the DAO part is works fine.
When I try to integrate the DAO part with web service part using Spring and
CXF 2.1.2, I got a error at startup for the creation of the entity manager :
java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor. CXF uses
asm-2.2.3 where the class can't be found (actually, it is in asm-1.5.3)
What does it mean ? Should I have to give up CXF or Hibernate annotations,
make a choice beetween both ? Is it any tricks to work around this issue ?
Thanks for any advice.
  
 
-- 
View this message in context: http://www.nabble.com/Hibernate-annotations-and-CXF-annotations-compatibility---tp19266248p19266248.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Hibernate annotations and CXF annotations compatibility ?

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

You could use the cglib-nodep jar which embeds the asm itself to walk 
around this issue.

Willem

Thierry.M wrote:
> I try to integrate Spring 2.5.5, Hibernate (3.2.6) as a JPA provider using
> annotations (Hibernate-annotations 3.3.1.GA + hibernate-entitymanager
> 3.3.2.GA) which seems to rely on asm-1.5.3. For the DAO part is works fine.
> When I try to integrate the DAO part with web service part using Spring and
> CXF 2.1.2, I got a error at startup for the creation of the entity manager :
> java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor. CXF uses
> asm-2.2.3 where the class can't be found (actually, it is in asm-1.5.3)
> What does it mean ? Should I have to give up CXF or Hibernate annotations,
> make a choice beetween both ? Is it any tricks to work around this issue ?
> Thanks for any advice.
>   
>  
>   


Re: Hibernate annotations and CXF annotations compatibility ?

Posted by "Thierry.M" <mo...@neuf.fr>.
We found it to fix the problem. Create an hibernate.properties file in the
classpath and add hibernate.bytecode.provider=javassist to use javaassist as
bytecode provider and do some
cleansing in the project pom declaring hibernate-annotations (cglib,
asm,...)
It works.
Thanks for the answer.


-- 
View this message in context: http://www.nabble.com/Hibernate-annotations-and-CXF-annotations-compatibility---tp19266248p19268728.html
Sent from the cxf-user mailing list archive at Nabble.com.