5 Replies Latest reply on Jul 8, 2009 6:20 AM by Joseph Miller

    Error on Application Redeploy

    Vikas Sharma Newbie

      I am getting below error while redeploying seam application on Weblogic 10 MP1.


      
      Apr 18, 2008 9:44:58 AM com.sun.faces.spi.InjectionProviderFactory createInstance
      
      INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with 
      
      these annotations will have said annotations processed.
      
      <Apr 18, 2008 9:45:05 AM PDT> <Warning> <HTTP> <BEA-101162> <User defined listener 
      
      org.jboss.seam.servlet.SeamListener failed: javax.persistence.PersistenceException: 
      
      org.hibernate.AnnotationException: java.lang.NoSuchMethodException: 
      
      org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, 
      
      org.hibernate.validator.MessageInterpolator, java.util.Map, 
      
      org.hibernate.annotations.common.reflection.ReflectionManager).
      
      javax.persistence.PersistenceException: org.hibernate.AnnotationException: 
      
      java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, 
      
      java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, 
      
      org.hibernate.annotations.common.reflection.ReflectionManager)
      
           at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:258)
      
           at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
      
           at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
      
           at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
      
           at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81)
      
           Truncated. see log file for complete stacktrace
      
      org.hibernate.AnnotationException: java.lang.NoSuchMethodException: 
      
      org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, 
      
      org.hibernate.validator.MessageInterpolator, java.util.Map, 
      
      org.hibernate.annotations.common.reflection.ReflectionManager)
      
           at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:353)
      
           at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
      
           at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1265)
      
           at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150)
      
           at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:884)
      
           Truncated. see log file for complete stacktrace
      
      java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, 
      
      java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, 
      
      org.hibernate.annotations.common.reflection.ReflectionManager)
      
           at java.lang.Class.getConstructor0(Class.java:2678)
      
           at java.lang.Class.getDeclaredConstructor(Class.java:1953)
      
           at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:343)
      
           at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
      
           at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1265)
      
           Truncated. see log file for complete stacktrace
      
      > 
      
      <Apr 18, 2008 9:45:05 AM PDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution 
      
      of deployment request with ID '1208537093228' for task '1'. Error is: 
      
      'weblogic.application.ModuleException: '
      
      weblogic.application.ModuleException: 
      
           at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:975)
      
           at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
      
           at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
      
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
      
           at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
      
           Truncated. see log file for complete stacktrace
      
      java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, 
      
      java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, 
      
      org.hibernate.annotations.common.reflection.ReflectionManager)
      
           at java.lang.Class.getConstructor0(Class.java:2678)
      
           at java.lang.Class.getDeclaredConstructor(Class.java:1953)
      
           at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:343)
      
           at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
      
           at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1265)
      
           Truncated. see log file for complete stacktrace
      
      > 
      
      
      



      If i remove below entry from components.xml, i don't get this error on redeployment.


      
      <persistence:entity-manager-factory name="testDatabase" />
      
      



      Thanks,
      Vikas

        • 1. Re: Error on Application Redeploy
          Lukas Herman Newbie

          Just remove hibernate-validator.jar from your domain lib/ directory.

          • 2. Re: Error on Application Redeploy
            Vikas Sharma Newbie

            I don't have hibernate-validator.jar in domain lib/ directory. I have all hibernate and JPA jars in APP-INF/lib directory.

            • 3. Re: Error on Application Redeploy
              Jess Evans Newbie

              I'm having the same problem with Weblogic 10 autodeploy.  The app loads without error if I restart the server from scratch.  Did you find a solution to this problem?

              • 4. Re: Error on Application Redeploy
                Tobias Hill Newbie

                We are facing the same problem but on jboss 4.2.3.GA.
                Read more about it here: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210223
                (initially we thought it was because of envers).


                We are overriding older Hibernate-jars in default/lib (jboss specific) with newer bundled dittos.


                Deploys are ok!
                Redeploys gives long stacktraces. :-#




                So ... Did you solve this?


                Tobias

                • 5. Re: Error on Application Redeploy
                  Joseph Miller Newbie

                  I'm getting the same problem too.. both on WebLogic 10.3, and JBoss 4.2.2


                  I'm packaging my own hibernate libs with my app, including hibernate validator (there were some bugs in the shipped version)


                  Caused by: javax.persistence.PersistenceException: [PersistenceUnit: bookItPersistenceUnit] Unable to configure EntityManagerFactory
                  
                       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)
                  
                       at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)
                  
                       at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
                  
                       at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85)
                  
                       at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
                  
                       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 org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
                  
                       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
                  
                       at org.jboss.seam.Component.callComponentMethod(Component.java:2219)
                  
                       at org.jboss.seam.Component.callCreateMethod(Component.java:2134)
                  
                       at org.jboss.seam.Component.newInstance(Component.java:2094)
                  
                       ... 95 more
                  
                  Caused by: org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
                  
                       at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:374)
                  
                       at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
                  
                       at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
                  
                       at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
                  
                       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
                  
                       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:191)
                  
                       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:253)
                  
                       ... 108 more