aspose file tools*
The moose likes Object Relational Mapping and the fly likes ValidateEventListener error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "ValidateEventListener error" Watch "ValidateEventListener error" New topic
Author

ValidateEventListener error

Tom Ethens
Greenhorn

Joined: Jun 10, 2008
Posts: 16
Hello,

I am getting the above error msg while trying to integrate glassfish with hibernate. I have hibernate3.jar, hibernate-annotations.jar and hibernate-common-annotations.jar in lib directory of glassfish.

Below is the stack trace.

Hibernate Annotations 3.3.1.GA
93 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.0.CR1
93 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
109 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib
109 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
CORE5016: Unexpected error occurred while loading applications
java.lang.NoClassDefFoundError: org/hibernate/validator/event/ValidateEventListener
at org.hibernate.ejb.EventListenerConfigurator.<init>(EventListenerConfigurator.java:69)
at org.hibernate.ejb.Ejb3Configuration.<init>(Ejb3Configuration.java:78)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:114)
at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149)
at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:898)
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.AbstractLoader.load(AbstractLoader.java:244)
at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:225)
at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:217)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)
at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)
at com.sun.enterprise.server.PEMain.run(PEMain.java:411)
at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
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:585)
at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)


Any help greatly appreciated.

Regards,
Tom
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
You have to have the hibernate validator jar as well


Visit my blog: http://jnassef.blogspot.com/
Tom Ethens
Greenhorn

Joined: Jun 10, 2008
Posts: 16
Thanks for the reply, but can you let me know the jar name that I need to include..I have googled this error and sometimes some one says you need to remove hibernate3.jar, sometimes remove the annotations jar. Nothing has worked so far.

Regards,
Tom.
Tom Ethens
Greenhorn

Joined: Jun 10, 2008
Posts: 16
Never mind.

I added hibernate-validator.jar to lib and its working fine (although I am getting other exceptions like java.lang.reflect.InvocationTargetException
but the validator exception is gone.

Thanks for the reply and bearing with a newbie in Hibernate.

Regards,
Tom
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
Download it from here. It's called hibernate-validator.jar
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
OOPs, seems that you found out the jar yourself
Tom Ethens
Greenhorn

Joined: Jun 10, 2008
Posts: 16
Thanks for your help, Naseef.

Regards,
Tom.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ValidateEventListener error