1 Reply Latest reply on May 11, 2010 12:10 AM by marcelstoer

    Mavenized Seam project: Could not create Component: securityRules (NoClassDefFoundError: org.drools.RuleBase)

    marcelstoer

      Disclaimer: I'm quite familiar with Maven but not with Seam.


      I'm in the process of moving a friend's Seam project from Ant to Maven. After a few failed attempts I mainly followed these instructions: http://kasper.eobjects.dk/2009/04/seam-ejbs-and-ear-packaging-in-maven.html. Hence, I'm building an EAR.


      Upon deployment (JBoss online admin console) I get:


      java.lang.RuntimeException: Could not create Component: securityRules
              at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1202)
              at org.jboss.seam.init.Initialization.installComponents(Initialization.java:1118)
              at org.jboss.seam.init.Initialization.init(Initialization.java:733)
              at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
              ...
      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:1158)
      



      This is irritating because all three Drools JARs (api, compiler, core) are in the root of the EAR. I also tried placing them in /APP-INF/lib but the results were the same. I even tried having them in the WAR's /WEB-INF/lib...same result.


      Worse, I don't know if this is a JBoss issue, a Seam issue or a Drools issue.


      For the record, here's the content of the EAR...


      .
      |____antlr-runtime-3.1.1.jar
      |____core-3.4.2.v_883_R34x.jar
      |____drools-api-5.0.1.jar
      |____drools-compiler-5.0.1.jar
      |____drools-core-5.0.1.jar
      |____janino-2.5.15.jar
      |____jboss-el-1.0_02.CR4.jar
      |____jboss-seam-2.2.0.GA.jar
      |____joda-time-1.6.jar
      |____META-INF
      | |____application.xml
      | |____jboss-app.xml
      |____mvel2-2.0.10.jar
      |____spontacts-mobileweb-0.0.1-SNAPSHOT.war
      |____xpp3_min-1.1.3.4.O.jar
      |____xstream-1.1.3.jar



      ...and the WAR...



      .
      |____activation.xhtml
      ...
      |____home.xhtml
      |____img
      | |____accepted.png
      ...
      | |____watch.png
      |____index.html
      |____layout
      | |____template.xhtml
      |____logout.xhtml
      |____META-INF
      | |____MANIFEST.MF
      |____stylesheet
      | |____mobile.css
      |____WEB-INF
      | |____classes
      ...
      | | |____META-INF
      | | | |____persistence.xml
      | | |____seam.properties
      | | |____security.drl
      | |____components.xml
      | |____faces-config.xml
      | |____jboss-web.xml
      | |____lib
      | | |____commons-beanutils-1.7.0.jar
      | | |____commons-collections-3.1.jar
      | | |____commons-digester-1.8.1.jar
      | | |____commons-logging-1.0.4.jar
      | | |____jboss-seam-jul-2.2.0.GA.jar
      | | |____jboss-seam-ui-2.2.0.GA.jar
      | | |____jsf-facelets-1.1.14.jar
      | | |____mvel2-2.0.10.jar
      | | |____richfaces-api-3.3.1.GA.jar
      | | |____richfaces-impl-3.3.1.GA.jar
      | | |____richfaces-ui-3.3.1.GA.jar
      | | |____spontacts-core-0.0.1-SNAPSHOT.jar
      | | |____spontacts-interface-0.0.1-SNAPSHOT.jar
      | | |____spontacts-persistence-0.0.1-SNAPSHOT.jar
      | | |____spontacts-util-0.0.1-SNAPSHOT.jar
      | |____pages.xml
      | |____spontacts.taglib.xml
      | |____tags
      | | |____act.xhtml
      | | |____acts.xhtml
      | |____web.xml



      I'd be very happy to get a few hints from the Seam community.


      Cheers,