2 Replies Latest reply on Mar 30, 2012 10:05 AM by Juliano Vidal

    Modules loading

    Juliano Vidal Newbie

      I'm trying to migrate from JBoss AS6.1 to JBoss AS7.1

      I've been trying to do it since the release of 7.0

       

      My question is that I have a lot of external libs. And as I saw in the docs I'm supposed to add them as modules, correct? Even though a lib/ext folder exists under the standalone folder?

      I added the module jets3t from AWS S3 API into the folder module like this "jboss-as-7.1.0.Final/modules/org/jets3t/main/"

       

      Inside the folder I added 2 files: module.xml and my jets3t-0.8.1a.jar file.

      Follow attached my module.xml

       

      I also added the file "jboss-deployment-structure.xml" inside my EAR project under EarContent/META-INF folder.

      And it seems to be loading since I get the following log message:

       

      19:32:12,339 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-1) JBAS018567: Deployment "deployment.xxxx-ear.ear" is using a private module ("org.jets3t:main") which may be changed or removed in future versions without notice.
      19:32:12,341 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-1) JBAS018567: Deployment "deployment.xxxx-ear.ear" is using a private module ("org.jets3t:main") which may be changed or removed in future versions without notice.
      

       

      Now, when I try to deploy my ear project and enable it, I get the same error:

       

      19:32:12,370 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."xxxx-ear.ear"."xxxx-ftd.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."xxxx-ear.ear"."xxxx-ftd.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "xxxx-ftd.war" of deployment "xxxx-ear.ear"  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_22]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_22]
        at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_22]
      Caused by: java.lang.NoClassDefFoundError: org/jets3t/service/S3ServiceException
        at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.6.0_22]
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) [rt.jar:1.6.0_22]
        at java.lang.Class.getConstructor0(Class.java:2716) [rt.jar:1.6.0_22]
        at java.lang.Class.getConstructor(Class.java:1674) [rt.jar:1.6.0_22]
        at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:108)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deploy
      mentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
                ... 5 more
      Caused by: java.lang.ClassNotFoundException: org.jets3t.service.S3ServiceException from [Module "deployment.xxxx-ear.ear.xxxx-ftd.war:main" from Service Module Loader]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
                ... 11 more
      

       

      Any ideas?

       

      Thanks in advance.

        • 1. Re: Modules loading
          jaikiran pai Master

          Juliano Vidal wrote:

           

          I'm trying to migrate from JBoss AS6.1 to JBoss AS7.1

          I've been trying to do it since the release of 7.0

           

          My question is that I have a lot of external libs. And as I saw in the docs I'm supposed to add them as modules, correct?

          That's not usually required. All you have to do is package your application as specified by the Java EE spec. If you have a .ear, then create a lib folder in that .ear and place all the required library jar files in that lib folder. Something like:

           

          .ear

          |

          |--- lib

          |     |--- <all library jars>

           

          Those jars will then be available in the classpath of the application.

          • 2. Re: Modules loading
            Juliano Vidal Newbie

            Hi Jaikiran,

             

            Since I have to make deploys from time to time, I don't want to keep my libs on each EAR. I would have to upload them and it will cost me a lot of time.

             

            Can't I simply add them to the libs directory like I used to do on JBoss AS6? Is this wrong from a JEE architecture perspective?

             

            Thanks.