1 Reply Latest reply on Sep 19, 2011 11:09 AM by Alexander Koledzhikov

    Cannot deploy sar from within an ear

    Alexander Koledzhikov Newbie

      I have a very simple ear, containing only one sar. When I try to deploy it (using the standalone/deployments), it fails with a class not found exception, even though the required class is packed within the sar.

       

      16:04:12,478 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "MyCompanyUt2il.ear"

      16:04:12,478 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "MyCompanyUtil.sar"

      16:04:12,493 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) added javax.persistence.api dependency to MyCompanyUt2il.ear

      16:04:12,493 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api dependency to MyCompanyUtil.sar

      16:05:12,463 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) Did not receive a response to the deployment operation within the allowed timeout p

      eriod [60 seconds]. Check the server configurationfile and the server logs to find more about the status of the deployment.

      16:05:12,479 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "MyCompanyUt2il.ear" was rolled back with failure message Operat

      ion cancelled

      16:13:39,436 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.subunit."MyCompanyUt2il.ear"."MyCompanyU

      til.sar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."MyCompanyUt2il.ear"."MyCompanyUtil.sar".INSTALL: Failed to process phase

      INSTALL of subdeployment "MyCompanyUtil.sar" of deployment "MyCompanyUt2il.ear"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0

      .Alpha1-SNAPSHOT]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

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

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

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

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Component class not found

              at org.jboss.as.service.ReflectionUtils.getClass(ReflectionUtils.java:102)

              at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:111)

              at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:102)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0

      .Alpha1-SNAPSHOT]

              ... 5 more

      Caused by: java.lang.ClassNotFoundException: com.MyCompanyburger.base.util.time.jmx.SomeMBean from [Module "deployment.MyCompanyUt2il.ear.MyCompanyUtil.sar:main" from Se

      rvice Module Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

              at java.lang.Class.forName0(Native Method) [:1.6.0_22]

              at java.lang.Class.forName(Class.java:247) [:1.6.0_22]

              at org.jboss.as.service.ReflectionUtils.getClass(ReflectionUtils.java:100)

              ... 8 more

       

       

      When I deploy the sar independently, it works like a charm. Is this a bug, or I'm not doing something right? Thanks in advance.