4 Replies Latest reply on Oct 3, 2011 5:27 AM by vidu

    war to call  custom jar throw erros

    vidu

      HI Guys

       

      I'm having toruble deploy  war application that that calls  my ejbs.jar

       

      i've taken the jboss login.war  and added the dependency in my pom.

      <dependency>
      <groupId>com.test.core</groupId>
      <artifactId>test-ejbs</artifactId>
      <version>1.0-SNAPSHOT</version>
      <scope>provided</scope>
      </dependency>

       

      i've already copied the test-ejbs.jar in to deployments folder which loads fine but when i copy the hellojboss.war that  needs this test-ejbs.jar  it failed.

       

        i've trtied to add dependencies to MANIFEST.MF too

        <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-war-plugin</artifactId>
         <configuration>
            <archive>
               <manifestEntries>
                  <Dependencies>com.test.core</Dependencies>
               </manifestEntries>
            </archive>
         </configuration>
      </plugin>
        • 1. Re: war to call  custom jar throw erros
          jaikiran

          How does your final deployed application look like? And what exact exception stacktrace are you seeing?

          • 2. Re: war to call  custom jar throw erros
            vidu

            HI Jaikiran

             

            module not found exception. is there soemthing i'm missing? or should i pack this  ejb.jar and the war in to a ear package?

             

            1:55:20,218 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named ListsMgmtServiceImpl in deployment unit deployment "test-core-1.0-SNAPSHOT.jar" are as follows:

             

                java:global/test-core-1.0-SNAPSHOT/ListsMgmtServiceImpl!com.test.ejbs.core.business.common.IListsMgmtService

                java:app/test-core-1.0-SNAPSHOT/ListsMgmtServiceImpl!com.test.ejbs.core.business.common.IListsMgmtService

                java:module/ListsMgmtServiceImpl!com.test.ejbs.core.business.common.IListsMgmtService

                java:global/test-core-1.0-SNAPSHOT/ListsMgmtServiceImpl

                java:app/test-core-1.0-SNAPSHOT/ListsMgmtServiceImpl

                java:module/ListsMgmtServiceImpl

             

            11:55:20,317 INFO  [org.jboss.as.jpa] (MSC service thread 1-8) added javax.persistence.api dependency to jboss-as-helloworld.war

            11:55:20,336 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.module.service."deployment.jboss-as-helloworld.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.jboss-as-helloworld.war".main: Failed to load module: deployment.jboss-as-helloworld.war:main

                at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:67)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]

                at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

            Caused by: org.jboss.modules.ModuleNotFoundException: Module com.test.ejbs.core:main is not found

            • 3. Re: war to call  custom jar throw erros
              morphy

              i think that the module name is wrong, try to look in the logs how it is really named... at least you are missing the 1.0-SNAPSHOT in the name... at least...

               

              i would like to suggest this approach:

               

              put the interfaces in a jboss module in the modules directory (to avoid a JB bug... best should be: build the ejb module to generate the client jar too, add the client jar in the war dependencies)

               

              use this named module (name is set in module.xml) as Dependencies entry for both the artifacts (jar and war)

               

              deploy the jar and the war

               

              lookup using std jee6 jndi conventions, use global because the deployed artifactes are not in the same module/application

               

              that works for me

               

              bye

              • 4. Re: war to call  custom jar throw erros
                vidu

                HI Riccardo

                 

                Thanks much,i will give that a try.