File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ValidateEventListener error

 
Tom Ethens
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 471
Hibernate Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to have the hibernate validator jar as well
 
Tom Ethens
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 471
Hibernate Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download it from here. It's called hibernate-validator.jar
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OOPs, seems that you found out the jar yourself
 
Tom Ethens
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help, Naseef.

Regards,
Tom.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic