3 Replies Latest reply on Aug 13, 2013 9:38 AM by willreichert

    ServerDeploymentManager hangs when deploying

    willreichert

      We use the ServerDeploymentManager to deploy an application as part of performance benchmarking Jboss and our deployment code which works for as-7.1 (and eap-6.0) is hanging with a build of as-7.2.0.Alpha1-SNAPSHOT.  I made sure to update the jars in our deployment code to use the moduesl from 7.2.0 and I verified that those jars work when deploying to as-7.1 but they do not appear to deploy to 7.2.0

       

      Our deployment code:

       

      private void deployContent(String filePath,ModelControllerClient client){
                ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client);
                DeploymentPlanBuilder builder = manager.newDeploymentPlan();
                List<String> deployments = getDeploymentList(client);
                DeploymentPlan plan;
                try{
                File content = new File(filePath);
                if(!content.exists()){
                          return;
                }
        
                if(deployments.contains(content.getName())){
                          plan = builder.replace(content).redeploy(content.getName()).build();
                }else{
                          plan = builder.add(content).deploy(content.getName()).build();
                }
                if(plan==null){
                          logger.info(hostRole+" Failed to prepare deployment of "+filePath);
                }
                if(plan.getDeploymentActions().size() > 0){
                          try{
                                    Future<ServerDeploymentPlanResult> result = manager.execute(plan);
                                    ServerDeploymentPlanResult depResult = result.get();
                                    for(DeploymentAction action : plan.getDeploymentActions()){
                                              ServerDeploymentActionResult actionResult = depResult.getDeploymentActionResult(action.getId());
                                              ServerUpdateActionResult.Result updateResult = actionResult.getResult();
                                              if(ServerUpdateActionResult.Result.EXECUTED.equals(updateResult)){
                                                        logger.log(Level.INFO," Successfully deployed "+content.getName());
                                              }else{
                                                        logger.log(Level.INFO," deployment operation resulted in "+updateResult.name());
                                                        Throwable t = actionResult.getDeploymentException();
                                                        if(t!=null){
                                                                  logger.log(Level.WARNING," Deployment Exception for "+content.getName(),t);
                                                        }
                                                        ServerDeploymentActionResult roll = actionResult.getRollbackResult();
                                                        if(roll!=null){
                                                                  logger.log(Level.WARNING," Rollback Result="+roll);
                                                        }
                                              }
                                    }
                          }catch(InterruptedException e){
                                    logger.log(Level.INFO," Exception deploying "+filePath,e);
                          } catch (ExecutionException e) {
                                    logger.log(Level.INFO," Exception deploying "+filePath,e);
                          }
                }
                }catch(IOException e){
                          logger.log(Level.INFO," Exception deploying "+filePath,e);
                }
      }
      

       

      We see the our code hanging in the result.get() call which I realize we could use a timeout but that I am still confused why it is hanging. On the server side I do not see messages logged until I kill the the JVM running our deployment code. Once I kill that JVM the server logs messages which look like the client just started to deploy the application when in reality I just killed it.

       

      Log Messages:

       

      I started the client code to deploy the application at 16:30 and killed it at 16:36 after no visible progress.

       

      16:36:01,788 INFO  [org.jboss.as.webservices] (MSC service thread 1-2) JBAS015540: Stopping service jboss.ws.endpoint."emulator.ear"."emulator.war"."org.spec.jent.supplier.emulator.SupplierService"
      16:36:01,790 INFO  [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022051: Endpoint unregistered: jboss.ws:context=emulator,endpoint=org.spec.jent.supplier.emulator.SupplierService
      16:36:01,798 INFO  [org.jboss.as.webservices] (MSC service thread 1-4) JBAS015540: Stopping service jboss.ws.port-component-link
      16:36:01,844 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment emulator.war in 85ms
      16:36:01,847 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment emulator.ear in 89ms
      16:36:01,849 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "emulator.ear"
      16:36:01,852 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."emulator.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."emulator.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "emulator.ear"
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                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.7.0_09-icedtea]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09-icedtea]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740: Failed to mount deployment content
                at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:92) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                ... 5 more
      Caused by: java.util.zip.ZipException: error in opening zip file
                at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_09-icedtea]
                at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_09-icedtea]
                at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_09-icedtea]
                at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_09-icedtea]
                at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_09-icedtea]
                at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:97)
                at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:83)
                at org.jboss.vfs.VFS.mountZip(VFS.java:408)
                at org.jboss.vfs.VFS.mountZip(VFS.java:434)
                at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:95) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:88) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                ... 6 more
      
      
      16:36:01,857 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment emulator.ear in 6ms
      16:36:01,859 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "emulator.ear"
      16:36:01,861 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."emulator.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."emulator.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "emulator.ear"
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                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.7.0_09-icedtea]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09-icedtea]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740: Failed to mount deployment content
                at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:92) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                ... 5 more
      Caused by: java.util.zip.ZipException: error in opening zip file
                at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_09-icedtea]
                at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_09-icedtea]
                at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_09-icedtea]
                at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_09-icedtea]
                at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_09-icedtea]
                at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:97)
                at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:83)
                at org.jboss.vfs.VFS.mountZip(VFS.java:408)
                at org.jboss.vfs.VFS.mountZip(VFS.java:434)
                at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:95) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:88) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                ... 6 more
      
      
      16:36:01,866 ERROR [org.jboss.as.server] (management-handler-thread - 4) JBAS015861: Redeploy of deployment "emulator.ear" was rolled back with no failure message
      16:36:01,868 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment emulator.ear in 0ms
      16:36:01,870 ERROR [org.jboss.as.server] (management-handler-thread - 4) JBAS015863: Replacement of deployment "emulator.ear" by deployment "emulator.ear" was rolled back with the following failure message: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"emulator.ear\".STRUCTURE" => undefined}}
      16:36:01,870 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "emulator.ear"
      16:36:01,872 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."emulator.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."emulator.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "emulator.ear"
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                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.7.0_09-icedtea]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09-icedtea]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740: Failed to mount deployment content
                at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:92) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                ... 5 more
      Caused by: java.util.zip.ZipException: error in opening zip file
                at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_09-icedtea]
                at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_09-icedtea]
                at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_09-icedtea]
                at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_09-icedtea]
                at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_09-icedtea]
                at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:97)
                at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:83)
                at org.jboss.vfs.VFS.mountZip(VFS.java:408)
                at org.jboss.vfs.VFS.mountZip(VFS.java:434)
                at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:95) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:88) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                ... 6 more
      
      
      16:36:01,874 INFO  [org.jboss.as.controller] (management-handler-thread - 4) JBAS014774: Service status report
      JBAS014777:   Services which failed to start:      service jboss.deployment.unit."emulator.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."emulator.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "emulator.ear"
      
      16:36:01,875 INFO  [org.jboss.as.repository] (management-handler-thread - 4) JBAS014901: Content removed from location /home/wreicher/runtime/jboss-as-7.2.0.Alpha1-SNAPSHOT/standalone/data/content/ef/a75fbc3debfe1900ac8e7c2d46bea56d902cc9/content
      
      

       

       

      I would appriciate any advice on either how to change our deployment code to work with the 7.2.0 build or how to determine what is preventing the deployment from working.

        • 1. Re: ServerDeploymentManager hangs when deploying
          willreichert

          The message above was when I was trying to deploy an application that was already on the server. I ran the test again (after building 7.2.0 with the latest from master) and while the client still hangs and I do not see log messages until I kill the client the log messages are slightly different.

           

          git rev-parse --verify HEAD --> fda366e44ab5de13830011953b4fdb528dcd30da

           

          Log Messages:

           

          17:52:18,054 INFO  [org.jboss.as.repository] (management-handler-thread - 4) JBAS014900: Content added at location /home/wreicher/src/jboss-as/build/target/jboss-as-7.2.0.Alpha1-SNAPSHOT/standalone/data/content/ef/a75fbc3debfe1900ac8e7c2d46bea56d902cc9/content
          17:52:18,054 INFO  [org.jboss.as.repository] (management-handler-thread - 4) JBAS014900: Content added at location /home/wreicher/src/jboss-as/build/target/jboss-as-7.2.0.Alpha1-SNAPSHOT/standalone/data/content/ef/a75fbc3debfe1900ac8e7c2d46bea56d902cc9/content
          17:52:18,064 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "emulator.ear"
          17:52:18,064 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "emulator.ear"
          17:52:18,077 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."emulator.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."emulator.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "emulator.ear"
                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    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.7.0_09-icedtea]
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09-icedtea]
                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740: Failed to mount deployment content
                    at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:92) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    ... 5 more
          Caused by: java.util.zip.ZipException: error in opening zip file
                    at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_09-icedtea]
                    at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_09-icedtea]
                    at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_09-icedtea]
                    at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_09-icedtea]
                    at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_09-icedtea]
                    at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:97)
                    at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:83)
                    at org.jboss.vfs.VFS.mountZip(VFS.java:408)
                    at org.jboss.vfs.VFS.mountZip(VFS.java:434)
                    at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:95) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:88) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    ... 6 more
          
          
          17:52:18,077 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."emulator.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."emulator.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "emulator.ear"
                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    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.7.0_09-icedtea]
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09-icedtea]
                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740: Failed to mount deployment content
                    at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:92) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    ... 5 more
          Caused by: java.util.zip.ZipException: error in opening zip file
                    at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_09-icedtea]
                    at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_09-icedtea]
                    at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_09-icedtea]
                    at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_09-icedtea]
                    at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_09-icedtea]
                    at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:97)
                    at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:83)
                    at org.jboss.vfs.VFS.mountZip(VFS.java:408)
                    at org.jboss.vfs.VFS.mountZip(VFS.java:434)
                    at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:95) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:88) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
                    ... 6 more
          
          
          17:52:18,089 ERROR [org.jboss.as.server] (management-handler-thread - 4) JBAS015870: Deploy of deployment "emulator.ear" was rolled back with the following failure message: 
          {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"emulator.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"emulator.ear\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"emulator.ear\"
              Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740: Failed to mount deployment content
              Caused by: java.util.zip.ZipException: error in opening zip file"}}
          17:52:18,089 ERROR [org.jboss.as.server] (management-handler-thread - 4) JBAS015870: Deploy of deployment "emulator.ear" was rolled back with the following failure message: 
          {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"emulator.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"emulator.ear\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"emulator.ear\"
              Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740: Failed to mount deployment content
              Caused by: java.util.zip.ZipException: error in opening zip file"}}
          17:52:18,092 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment emulator.ear in 3ms
          17:52:18,092 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment emulator.ear in 3ms
          
          
          • 2. Re: ServerDeploymentManager hangs when deploying
            willreichert

            I managed to successfully deploy an application using the ModelControllerClient in a new build of 7.2 today. I re-built 7.2 and updated my Eclipse project to reference the new jars in the build. I am not sure if the problem was in 7.2 or because I missed something when trying to update my Eclipse project for a previous build but it is working now so I will mark the question answered.

            • 3. Re: ServerDeploymentManager hangs when deploying
              willreichert

              Here is the getDeploymentList method. It is used in an environment where success is far more common than failure.

               

                private List<String> getDeploymentList(ModelControllerClient client){
                  List<String> rtrn = new LinkedList<String>();
                  ModelNode listDeployments = new ModelNode();
                  listDeployments.get("include-runtime").set(true);
                  listDeployments.get("operation").set("read-children-names");
                  listDeployments.get("child-type").set("deployment");
                  try{
                    ModelNode resp = client.execute(listDeployments);
                    if (resp.get("outcome").asString().equals("success")) {
                      List<ModelNode> deps = resp.get("result").asList();
                      for(ModelNode dep : deps){
                        rtrn.add(dep.asString());
                      }
                    }else{
                      logger.log(Level.INFO,hostRole+" getDeployments did not succeed",resp);
                    }
                  }catch(IOException e){
                    logger.log(Level.INFO,hostRole+" getDeployments Exception ",e);
                  }
                  return rtrn;
                }