2 Replies Latest reply on Nov 11, 2011 7:09 AM by Lydia Ares

    dependency on hibernate in 1.1.3.Final

    Lydia Ares Newbie

      Hi,
      I just tried the new Weld 1.1.3.Final release and noticed several ClassNotFoundExceptions on container startup. Weld complains about missing drools and hibernate classes. I don't use database persistence nor transactions, so I don't have hibernate in my classpath (my app is running on Tomcat 6). I'm not sure if this a Seam Faces or Weld issue. I didn't change the Seam Faces jars. The exceptions were not thrown using Weld 1.1.2.Final.
      Nevertheless, the web app is deployed and works. Just these exceptions are a bit annoying.



      Here the stacktrace:


      INFO: Tomcat 6 detected, CDI injection will be available in Servlets and Filters. Injection into Listeners is not supported
      [11:59:23,433] org.jboss.solder.config.xml.bootstrap.XmlConfigExtension [INFO] [] Preventing installation of default bean: org.jboss.seam.faces.transaction.TransactionPhaseListener
      10-nov-2011 11:59:24 org.jboss.weld.bootstrap.BeanDeployer addClass
      INFO: WELD-000119 Not generating any bean definitions from org.jboss.seam.security.permission.SecurityRuleLoader because of underlying class loading error
      10-nov-2011 11:59:24 org.jboss.weld.bootstrap.BeanDeployer addClass
      INFO: catching
      org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.seam.security.permission.SecurityRuleLoader
           at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:154)
           at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86)
           at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115)
           at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:168)
           at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:331)
           at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:182)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
           at org.apache.catalina.core.StandardService.start(StandardService.java:519)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
           at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
           at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.NoClassDefFoundError: Lorg/drools/KnowledgeBase;
           at java.lang.Class.getDeclaredFields0(Native Method)
           at java.lang.Class.privateGetDeclaredFields(Unknown Source)
           at java.lang.Class.getDeclaredFields(Unknown Source)
           at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102)
           at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:99)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63)
           at org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:99)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:153)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118)
           at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:48)
           at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:39)
           at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
           at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
           at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
           at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:151)
           ... 20 more
      Caused by: java.lang.ClassNotFoundException: org.drools.KnowledgeBase
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
           ... 36 more
      [11:59:24,450] org.jboss.solder.core.CoreExtension [INFO] [] Preventing class org.jboss.seam.international.locale.LocaleConfiguration from being installed as bean due to @Veto annotation
      [11:59:25,004] org.jboss.solder.core.CoreExtension [INFO] [] Preventing class com.safelayer.trustedx.console.persistence.EagerLoadingStrategy from being installed as bean due to @Veto annotation
      10-nov-2011 11:59:25 org.jboss.weld.bootstrap.BeanDeployer addClass
      INFO: WELD-000119 Not generating any bean definitions from org.jboss.seam.security.permission.RuleBasedPermissionResolver because of underlying class loading error
      10-nov-2011 11:59:25 org.jboss.weld.bootstrap.BeanDeployer addClass
      INFO: catching
      org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.seam.security.permission.RuleBasedPermissionResolver
           at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:154)
           at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86)
           at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115)
           at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:168)
           at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:331)
           at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:182)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
           at org.apache.catalina.core.StandardService.start(StandardService.java:519)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
           at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
           at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.NoClassDefFoundError: org/drools/runtime/ObjectFilter
           at java.lang.Class.getDeclaredFields0(Native Method)
           at java.lang.Class.privateGetDeclaredFields(Unknown Source)
           at java.lang.Class.getDeclaredFields(Unknown Source)
           at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102)
           at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:99)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63)
           at org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:99)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:153)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118)
           at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:48)
           at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:39)
           at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
           at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
           at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
           at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:151)
           ... 20 more
      Caused by: java.lang.ClassNotFoundException: org.drools.runtime.ObjectFilter
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
           ... 36 more
      10-nov-2011 11:59:25 org.jboss.weld.bootstrap.BeanDeployer addClass
      INFO: WELD-000119 Not generating any bean definitions from org.jboss.seam.transaction.HibernateTransaction because of underlying class loading error
      10-nov-2011 11:59:25 org.jboss.weld.bootstrap.BeanDeployer addClass
      INFO: catching
      org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.seam.transaction.HibernateTransaction
           at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:154)
           at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86)
           at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115)
           at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:168)
           at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:331)
           at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:182)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
           at org.apache.catalina.core.StandardService.start(StandardService.java:519)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
           at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
           at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.NoClassDefFoundError: Lorg/hibernate/Session;
           at java.lang.Class.getDeclaredFields0(Native Method)
           at java.lang.Class.privateGetDeclaredFields(Unknown Source)
           at java.lang.Class.getDeclaredFields(Unknown Source)
           at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102)
           at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:99)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63)
           at org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:99)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:153)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118)
           at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:48)
           at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:39)
           at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
           at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
           at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
           at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:151)
           ... 20 more
      Caused by: java.lang.ClassNotFoundException: org.hibernate.Session
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
           ... 36 more
      




      This is my beans.xml where I disable transactions:



      <t:SeSynchronizations>
           <s:modifies />
      </t:SeSynchronizations>
      <t:UTTransaction>
           <s:modifies />
      </t:UTTransaction>
      <sc:Veto>
           <s:Qualifier />
      </sc:Veto>
      <ft:TransactionPhaseListener>
           <s:replaces />
           <sc:Veto />
      </ft:TransactionPhaseListener>
       



      Thanks for any hints!