1 Reply Latest reply on Aug 26, 2011 4:50 AM by Jan Groth

    Seam 2 multi module EAR on Jboss AS 6 - JNDI problem

    Jan Groth Novice

      I'm currently migrating a Seam 2 application (Seam 2.1 / JEE 5 on JBoss 4.2 / ant) to a newer environment (Seam 2 / JEE 6 on JBoss 6.0 / maven). The deployment is EAR, the project layout is as maven multi-module project:



      • app-service (for ejbs)

      • - components.xml

      • - seam.properties




      • app-web(for web)

      • - components.xml

      • - seam.properties



      I don't get past this error message in the boot log:      


      Caused by: java.lang.IllegalArgumentException: You must specify org.jboss.seam.core.init.jndiPattern or use @JndiName: com.....auswertung.IAuswertungFacade
           at org.jboss.seam.Component.getJndiName(Component.java:454) [:2.2.2.Final]
           at org.jboss.seam.Component.<init>(Component.java:236) [:2.2.2.Final]
           at org.jboss.seam.Component.<init>(Component.java:208) [:2.2.2.Final]
           at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1186) [:2.2.2.Final]
           ... 111 more
      



      Both modules contain the required configuration in components.xml



           <core:init jndi-pattern="app-ear/#{ejbName}/local" debug="true" />



      Interestingly enough, when I initially forgot seam.properties in the web-module, everything started fine (but did not intialize any seam web components).


      I also tried a lot with different names and config configurations.


      As a small success: It seems to work if I manually add the following to each EJB


      @JndiName(value = "...")



      But I don't want to edit some 250 EJBsby hand... :-(


      Any comments on this?


      Also any hints to a documented migration path Seam 2 to JBoss AS 6 would be highly appreciated.