5 Replies Latest reply on Mar 6, 2009 3:43 PM by Serge Emmanuel Pagop

    Seam 2.1.1 GA, JBoss 5.0.0 GA. Drools (4.0.4) load error

    Niels Henrik Hagen Newbie

      Hi,


      I have created a (vanilla) Seam project using JBoss Developer Studio. Then I added pom.xml files to mavenize it. When the vanilla ear is deployed everything works ok, but when I try to deploy our mavenized ear we strange thing in the log regarding Drools:




      14:12:30,012 ERROR [[/seam-template]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.RuntimeException: Could not create Component: securityRules
           at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1178)
           at org.jboss.seam.init.Initialization.installComponents(Initialization.java:1094)
           at org.jboss.seam.init.Initialization.init(Initialization.java:728)
           at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
           at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:367)
           at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
           at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:460)
           at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
           at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
           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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
           at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
           at $Proxy36.start(Unknown Source)
           at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
           at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
           at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
           at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
           at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
           at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
           at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
           at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
           at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
           at org.jboss.system.ServiceController.start(ServiceController.java:460)
           at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
           at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
           at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
           at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
           at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
           at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
           at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
           at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
           at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
           at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
           at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
           at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
           at org.jboss.Main.boot(Main.java:209)
           at org.jboss.Main$1.run(Main.java:547)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.NoClassDefFoundError: org/drools/RuleBase
           at java.lang.Class.getDeclaredMethods0(Native Method)
           at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
           at java.lang.Class.privateGetPublicMethods(Class.java:2547)
           at java.lang.Class.getMethods(Class.java:1410)
           at org.jboss.seam.Component.hasAnnotation(Component.java:1125)
           at org.jboss.seam.Component.<init>(Component.java:219)
           at org.jboss.seam.Component.<init>(Component.java:206)
           at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1162)
           ... 62 more
      Caused by: java.lang.ClassNotFoundException: org.drools.RuleBase from BaseClassLoader@716598{VFSClassLoaderPolicy@c5003c{name=vfszip:/opt/jboss-5.0.0.GA/server/default/deploy/seam-template-ear.ear domain=ClassLoaderDomain@d7ee98{name=seam-template:loader=seam-template-ear.ear parentPolicy=AFTER_BUT_JAVA_BEFORE parent=ClassLoaderDomain@c72243{DefaultDomain}} roots=[MemoryContextHandler@26375417[path= context=vfsmemory://3j001-lqdwjr-fpwl2gc1-1-fpwl2p76-20 real=vfsmemory://3j001-lqdwjr-fpwl2gc1-1-fpwl2p76-20], DelegatingHandler@4039138[path=seam-template-ear.ear context=file:/opt/jboss-5.0.0.GA/server/default/deploy/ real=file:/opt/jboss-5.0.0.GA/server/default/deploy/seam-template-ear.ear], DelegatingHandler@5187491[path=seam-template-ear.ear/jboss-seam.jar context=file:/opt/jboss-5.0.0.GA/server/default/deploy/ real=file:/opt/jboss-5.0.0.GA/server/default/deploy/seam-template-ear.ear/jboss-seam.jar], DelegatingHandler@11750355[path= context=file:/opt/jboss-5.0.0.GA/server/default/deployers/seam.deployer/lib-int/jboss-seam-int-jbossas.jar real=vfszip:/opt/jboss-5.0.0.GA/server/default/deployers/seam.deployer/lib-int/jboss-seam-int-jbossas.jar], DelegatingHandler@20392923[path=seam-template-ear.ear/seam-template-ejb.jar context=file:/opt/jboss-5.0.0.GA/server/default/deploy/ real=file:/opt/jboss-5.0.0.GA/server/default/deploy/seam-template-ear.ear/seam-template-ejb.jar]]  delegates=null exported=[, org.jboss.seam.theme, mvel14-1.2.21.jar.org.mvel.integration, drools-core.jar.org.drools.ruleflow.instance, org.jboss.seam.security.management, org.jboss.seam.contexts, org.jboss.seam.el, org.jboss.seam.exception, drools-core.jar.META-INF, drools-core.jar.org.drools.base.mvel, drools-compiler.jar.META-INF, drools-compiler.jar.org.drools.commons.jci.stores, mvel14-1.2.21.jar.org.mvel.optimizers.impl.refl, drools-compiler.jar.org.drools.lang, drools-compiler.jar.org.drools.rule.builder.dialect.mvel, janino-2.5.10.jar.org.codehaus.janino.util.enumerator, mvel14-1.2.21.jar.META-INF, mvel14-1.2.21.jar.org.mvel.tests.main, org.jboss.seam.annotations.datamodel, org.jboss.seam.security.jaas, mvel14-1.2.21.jar.org.mvel.debug, org.jboss.seam.init, com.tracetracker.seamTemplate.session, org.jboss.seam.annotations.bpm, drools-compiler.jar.org.drools.lang.descr, org.jboss.seam.framework, drools-core.jar.org.drools.spi, drools-core.jar.org.drools.base.accumulators, drools-compiler.jar.org.drools.brms.server.rules, drools-compiler.jar.org.drools.semantics.java.parser, org.jboss.seam.log, org.jboss.seam.captcha, mvel14-1.2.21.jar.org.mvel.integration.impl, org.jboss.seam.core, jboss-el-1.0_02.CR2.jar.org.jboss.el.lang, org.jboss.seam.servlet, drools-core.jar.org.drools.objenesis.strategy, org.jboss.seam.drools, org.jboss.seam.annotations, org.jboss.seam.persistence, org.jboss.seam.pageflow, drools-compiler.jar.org.drools.compiler, drools-core.jar.org.drools.asm.signature, org.jboss.seam.security.digest, org.jboss.seam.text, org.jboss.seam.faces, drools-core.jar.org.drools.conflict, mvel14-1.2.21.jar.org.mvel.tests, org.jboss.seam.deployment, mvel14-1.2.21.jar.org.mvel.tests.perftests, drools-core.jar.org.drools.base.field, drools-core.jar.org.drools.base.evaluators, janino-2.5.10.jar.org.codehaus.janino.samples, org.jboss.seam.jmx, org.jboss.seam.jms, drools-core.jar.org.drools.rule, jboss-el-1.0_02.CR2.jar.org.jboss.el.util, janino-2.5.10.jar.org.codehaus.janino.util, org.jboss.seam.async, org.jboss.seam.integration.jbossas.vdf, org.jboss.seam.annotations.security.management, antlr-runtime-3.0.jar.org.antlr.runtime.misc, org.jboss.seam.integration.jbossas.jms, org.jboss.seam.bpm, org.jboss.seam.security, org.jboss.seam.web, drools-core.jar.org.drools.base.dataproviders, org.jboss.seam.security.management.action, org.jboss.seam.databinding, drools-core.jar.org.drools.common, drools-core.jar.org.drools.ruleflow.core.impl, org.jboss.seam.annotations.security, antlr-runtime-3.0.jar.org.antlr.runtime, drools-core.jar.org.drools.reteoo, drools-core.jar, drools-compiler.jar.org.drools.commons.jci.problems, jboss-el-1.0_02.CR2.jar.org.jboss.el.parser, drools-core.jar.org.drools.ruleflow.common.core, drools-core.jar.org.drools.objenesis.instantiator.sun, org.jboss.seam.transaction, drools-compiler.jar.org.drools.lang.dsl, org.jboss.seam.document, drools-core.jar.org.drools.agent, org.jboss.seam.mock, drools-core.jar.org.drools.ruleflow.common.instance, org.jboss.seam.mail, drools-core.jar.org.drools.objenesis, drools-compiler.jar.org.drools.brms.server.util, org.jboss.seam.navigation, org.jboss.seam.international, drools-core.jar.org.drools.ruleflow.instance.impl, drools-core.jar.org.drools.ruleflow.core, org.jboss.seam.integration.jbossas.servlet, drools-core.jar.org.drools.reteoo.builder, drools-compiler.jar.org.drools.commons.jci.compilers, mvel14-1.2.21.jar.org.mvel.optimizers, drools-core.jar.org.drools.util.asm, drools-compiler.jar.org.drools.rule.builder.dialect.java, org.jboss.seam.webservice, antlr-runtime-3.0.jar.org.antlr.runtime.tree, janino-2.5.10.jar.org.codehaus.janino.util.iterator, janino-2.5.10.jar.org.codehaus.janino, drools-core.jar.org.drools.ruleflow.common.datatype.impl, drools-compiler.jar.org.drools.commons.jci.readers, drools-core.jar.org.drools.objenesis.instantiator.jrockit, drools-core.jar.org.drools.base.extractors, jboss-el-1.0_02.CR2.jar.META-INF, mvel14-1.2.21.jar.org.mvel.tests.main.res, drools-core.jar.org.drools.objenesis.instantiator, META-INF.maven.org.jboss.seam.integration.jboss-seam-int-jbossas, mvel14-1.2.21.jar.org.mvel.ast.cache, org.jboss.seam.cache, org.jboss.seam.jsf, drools-core.jar.org.drools.asm.util, drools-core.jar.org.drools.facttemplates, drools-core.jar.org.drools.util.concurrent.locks, org.jboss.seam.intercept, drools-core.jar.org.drools.audit.event, mvel14-1.2.21.jar.org.mvel.conversion, org.jboss.seam.integration.jbossas.vfs, org.jboss.seam.annotations.intercept, drools-core.jar.org.drools.asm, mvel14-1.2.21.jar.org.mvel, drools-compiler.jar.org.drools.rule.builder.dialect.java.parser, org.jboss.seam.ejb, drools-compiler.jar.org.drools.rule.builder, org.jboss.seam.annotations.async, drools-compiler.jar.org.drools.xml, drools-compiler.jar.org.drools.brms.client.modeldriven.brl, antlr-runtime-3.0.jar.META-INF, drools-core.jar.org.drools.ruleflow.common.datatype, drools-compiler.jar.META-INF.maven.org.drools.drools-compiler, mvel14-1.2.21.jar.org.mvel.optimizers.impl.asm, drools-core.jar.org.drools.event, org.jboss.seam.annotations.web, org.jboss.seam.annotations.faces, org.jboss.seam, drools-compiler.jar.org.drools.brms.client.modeldriven, org.jboss.seam.security.openid, drools-core.jar.org.drools.asm.commons, janino-2.5.10.jar.org.codehaus.janino.util.resource, drools-core.jar.org.drools.util, mvel14-1.2.21.jar.org.mvel.ast, drools-core.jar.org.drools.objenesis.instantiator.gcj, drools-core.jar.org.drools.objenesis.instantiator.basic, org.jboss.seam.security.permission, drools-core.jar.org.drools.asm.attrs, mvel14-1.2.21.jar.org.mvel.asm, drools-core.jar.org.drools.ruleflow.common.core.impl, janino-2.5.10.jar.org.codehaus.janino.tools, org.jboss.seam.annotations.exception, antlr-runtime-3.0.jar.org.antlr.runtime.debug, drools-core.jar.org.drools.audit, org.jboss.seam.util, drools-core.jar.org.drools.base, META-INF, org.jboss.seam.security.permission.action, org.jboss.seam.annotations.security.permission, drools-core.jar.org.drools.concurrent, META-INF.maven.com.tracetracker.seam-template-ear, mvel14-1.2.21.jar.org.mvel.util, mvel14-1.2.21.jar.org.mvel.math, drools-core.jar.org.drools.asm.util.attrs, META-INF.maven.com.tracetracker.seam-template-ejb, drools-core.jar.org.drools, drools-core.jar.org.drools.ruleflow.common.instance.impl, janino-2.5.10.jar.META-INF, jboss-el-1.0_02.CR2.jar.org.jboss.el, mvel14-1.2.21.jar.org.mvel.optimizers.impl.refl.collection, drools-core.jar.META-INF.maven.org.drools.drools-core, drools-core.jar.org.drools.ruleflow.common.datatype.impl.type] <IMPORT-ALL>NON_EMPTY}}
           at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:385)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
           ... 70 more
      



      Environment:
      Seam 2.1.1.GA
      JBoss 5.0.0.GA
      Maven 2.0.9.
      JDK 1.6.0 update 11
      Postgresql 8.3 (running on a remove machine)


      Project can be suppiled on request

        • 2. Re: Seam 2.1.1 GA, JBoss 5.0.0 GA. Drools (4.0.4) load error
          Stuart Douglas Master

          What is your project structure and where is your drools jar?

          • 3. Re: Seam 2.1.1 GA, JBoss 5.0.0 GA. Drools (4.0.4) load error
            Niels Henrik Hagen Newbie

            This is the structure of the ear file:



            .
            |-- META-INF
            |   |-- MANIFEST.MF
            |   |-- application.xml
            |   |-- jboss-app.xml
            |   +-- maven
            |       +-- com.tracetracker
            |           +-- seam-template-ear
            |               |-- pom.properties
            |               +-- pom.xml
            |-- antlr-runtime-3.0.jar
            |-- commons-collections-3.2.jar
            |-- commons-logging-1.0.4.jar
            |-- core.jar
            |-- drools-compiler.jar
            |-- drools-core.jar
            |-- janino-2.5.10.jar
            |-- jboss-el.jar
            |-- jboss-seam.jar
            |-- mvel14-1.2.21.jar
            |-- richfaces-api-3.2.2.SR1.jar
            |-- seam-template-ejb.jar
            |   |-- META-INF
            |   |   |-- MANIFEST.MF
            |   |   |-- ejb-jar.xml
            |   |   |-- maven
            |   |   |   +-- com.tracetracker
            |   |   |       +-- seam-template-ejb
            |   |   |           |-- pom.properties
            |   |   |           +-- pom.xml
            |   |   +-- persistence.xml
            |   |-- com
            |   |   +-- tracetracker
            |   |       +-- seamTemplate
            |   |           +-- session
            |   |               |-- Authenticator.class
            |   |               +-- Authenticator.java
            |   |-- components.properties
            |   |-- import.sql
            |   |-- seam.properties
            |   +-- security.drl
            +-- seam-template.war
                |-- META-INF
                |   |-- MANIFEST.MF
                |   +-- maven
                |       +-- com.tracetracker
                |           +-- seam-template
                |               |-- pom.properties
                |               +-- pom.xml
                |-- WEB-INF
                |   |-- classes
                |   |-- components.xml
                |   |-- faces-config.xml
                |   |-- jboss-web.xml
                |   |-- lib
                |   |   |-- commons-beanutils-1.7.0.jar
                |   |   |-- commons-collections-3.2.jar
                |   |   |-- commons-digester-1.8.jar
                |   |   |-- commons-logging-1.0.4.jar
                |   |   |-- jboss-seam-debug-2.1.1.GA.jar
                |   |   |-- jboss-seam-jul-2.1.1.GA.jar
                |   |   |-- jboss-seam-ui-2.1.1.GA.jar
                |   |   |-- jsf-facelets-1.1.15.B1.jar
                |   |   |-- richfaces-api-3.2.2.SR1.jar
                |   |   |-- richfaces-impl-3.2.2.SR1.jar
                |   |   +-- richfaces-ui-3.2.2.SR1.jar
                |   |-- pages.xml
                |   +-- web.xml
                |-- error.xhtml
                |-- home.xhtml
                |-- img
                |   |-- dtpick.gif
                |   |-- error.gif
                |   |-- manytoone.gif
                |   |-- msgerror.png
                |   |-- msginfo.png
                |   |-- msgwarn.png
                |   |-- onetomany.gif
                |   +-- seamlogo.png
                |-- index.html
                |-- layout
                |   |-- display.xhtml
                |   |-- edit.xhtml
                |   |-- menu.xhtml
                |   |-- sort.xhtml
                |   +-- template.xhtml
                |-- login.page.xml
                |-- login.xhtml
                +-- stylesheet
                    |-- theme.css
                    +-- theme.xcss
            

            • 4. Re: Seam 2.1.1 GA, JBoss 5.0.0 GA. Drools (4.0.4) load error
              Stefan Gelsebach Newbie

              I had the same problem and figured out, that if you declare the drools-core.jar as a module in application.xml, everything works fine.
              Hope that helps some of you.


              Greetz

              • 5. Re: Seam 2.1.1 GA, JBoss 5.0.0 GA. Drools (4.0.4) load error
                Serge Emmanuel Pagop Newbie

                To solve this problem first create a resources directory in your WAR project and then copy the security.drl into that resources folder and build and try again.
                Otherwise if you do not want to use drools for security rules you can also only comment this part



                     <drools:rule-base name="securityRules">
                          <drools:rule-files>
                               <value>/security.drl</value>
                          </drools:rule-files>
                     </drools:rule-base>



                in your components.xml file