[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - java.lang.NoClassDefFoundError with hibernate

mohammad.gh do-not-reply at jboss.com
Tue Jul 21 11:52:55 EDT 2009


HI

I have and EAR file that contains a WAR file.
In the web-inf/lib of the war file there is a   hibernate-annotations.jar and this file is also included in jboss_home\server\default\lib.
this web project works fine when i run without seam, but after adding Seam to this project i get this error :

com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract ir.itorbit.epic.cartable.api.model.CartablePage ir.itorbit.epic.cartable.client.rpc.process.ProcessService.getProcesses(java.lang.String,boolean,int,int)' threw an unexpected exception: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.AnnotationConfiguration
	at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
	at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:319)
	at ir.itorbit.twg.server.ServiceAdapter.processCall(ServiceAdapter.java:49)
	... 46 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.AnnotationConfiguration
	at ir.itorbit.epic.taskmanagement.domain.factory.EpicConfig.(EpicConfig.java:15)
	at ir.itorbit.epic.taskmanagement.domain.factory.EpicConfig.getInstance(EpicConfig.java:29)
	at ir.itorbit.epic.taskmanagement.domain.factory.EpicContextFactory.createNewContext(EpicContextFactory.java:45)
	at ir.itorbit.epic.taskmanagement.domain.factory.EpicContextFactory.getCurrentContext(EpicContextFactory.java:30)
	at ir.orbitall.epic.integration.service.ProcessServiceIntegrationImpl.getProcesses(ProcessServiceIntegrationImpl.java:38)
	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 ir.itorbit.twg.server.ServiceAdapter.processCall(ServiceAdapter.java:35)
	... 46 more



org.hibernate.cfg.AnnotationConfiguration is located in jboss_home/server/default/lib/hibernate-annotations.jar  and web-inf/lib/hibernate-annotations.jar.

i have a jboss-web.xml that contains this line two :
            <loader-repository-config>java2ParentDelegation=false</loader-repository-config>

what is the problem?

the file exist everywhere why this NoClassDefFoundError?
thanks
Mohammad Ghasemi


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4245047#4245047

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4245047



More information about the jboss-user mailing list