4 Replies Latest reply on Jun 24, 2015 1:09 PM by dlwester

    Exception while undeploying application

    dlwester

      I am trying to test my JEE application with Arquillian running under WebSphere Liberty Profile 8.5.5.4. My Arquillian tests run against an EJB and a REST service.

       

      All the tests run successfully. However, the JUnit test process always ends with an exception:

       

      org.jboss.arquillian.container.spi.client.container.DeploymentException: Exception while undeploying application.

          at org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer.undeploy(WLPManagedContainer.java:419)

          at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$4.call(ContainerDeployController.java:205)

          at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$4.call(ContainerDeployController.java:185)

          at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)

          at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.undeploy(ContainerDeployController.java:184)

      ...

      Caused by: org.jboss.arquillian.container.spi.client.container.DeploymentException: Unable to delete archive from apps directory

          at org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer.undeploy(WLPManagedContainer.java:405)

          at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$4.call(ContainerDeployController.java:205)

          at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$4.call(ContainerDeployController.java:185)

          at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)

          at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.undeploy(ContainerDeployController.java:184)

       

      I'm wondering if this is a timing issue, like maybe Arquillian is trying to delete the war it deployed before the app actually stops. But I don't know how to control that.

       

      Any ideas?

        • 1. Re: Exception while undeploying application
          gpoul

          Hi Dave,

           

          have you checked that the permissions are OK? Are you using the managed or the remote wlp container implementation?

           

          I think a good first step would also be to collect a trace log so I can look at it, but I think the chance of us discovering something will be minimal and we might need additional tracing in the code. You can find a sample logging.properties here: arquillian-container-was/logging.properties at master · arquillian/arquillian-container-was · GitHub

           

          Do you think you would be able to checkout & compile a version that includes additional tracing once I looked at the trace and you verified the permissions of the directory?

           

          Gerhard

          • 2. Re: Exception while undeploying application
            dlwester

            Hello, Gerhard. Thanks for your reply.

             

            I am using the Arquillian JUnit tests with WebSphere Liberty Profile in managed mode. I am running on my Windows 7 machine, so there are no permissions issues. I do have WLP configured to allow applications to update the server config directory. It is creating the WAR file successfully - it just doesn't seem to be able to delete it.

             

            I do have a trace, how do you want me to send it to you?

             

            And yes, I'd be happy to run with a debugging version of your code.

            • 3. Re: Exception while undeploying application
              gpoul

              Hi Dave,

               

              I think even on Windows 7 there might be permissions issues if you sometimes run stuff as administrator and sometimes you don't, but don't ask me how that works ;-)

               

              You can create an issue on our JIRA at Arquillian: WebSphere Containers - JBoss Issue Tracker and attach your trace there.

               

              Gerhard

              • 4. Re: Exception while undeploying application
                dlwester

                Thanks Gerhard, I will open a ticket.

                 

                In the meantime, I think this is the part of the trace that would be related. As you thought, it doesn't really tell us anything:

                Jun 24, 2015 11:14:18 AM org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer undeploy

                FINER: ENTRY

                Jun 24, 2015 11:14:18 AM org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getServerXML

                FINER: server.xml: /IBM/WLP8554/usr/servers/taskcalendar/server.xml

                Jun 24, 2015 11:14:18 AM org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getServerXML

                FINER: server.xml: /IBM/WLP8554/usr/servers/taskcalendar/server.xml

                Jun 24, 2015 11:14:18 AM org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer waitForMBeanTargetState

                FINER: ENTRY

                [AUDIT   ] CWWKG0016I: Starting server configuration update.

                [AUDIT   ] CWWKG0028A: Processing included configuration resource: C:\IBM\WLP8554\usr\servers\taskcalendar\serverApplication.xml

                [AUDIT   ] CWWKG0028A: Processing included configuration resource: C:\IBM\WLP8554\usr\servers\taskcalendar\serverKeyStore.xml

                [AUDIT   ] CWWKG0028A: Processing included configuration resource: C:\IBM\WLP8554\usr\servers\taskcalendar\serverBasicUserRegistry.xml

                [AUDIT   ] CWWKG0028A: Processing included configuration resource: C:\IBM\WLP8554\usr\servers\taskcalendar\serverTesting.xml

                [AUDIT   ] CWWKG0017I: The server configuration was successfully updated in 0.043 seconds.

                [AUDIT   ] CWWKT0017I: Web application removed (default_host): http://dlwester:30080/task-calendar-ejb-task-calendar-bean-test/

                [INFO    ] SRVE0253I: [task-calendar-ejb-task-calendar-bean-test] [/task-calendar-ejb-task-calendar-bean-test] [ArquillianServletRunner]: Destroy successful.

                [INFO    ] OpenWebBeans Container was stopped for context path, [/task-calendar-ejb-task-calendar-bean-test]

                [INFO    ] CNTR4003I: The task-calendar-ejb-task-calendar-bean-test.war EJB module in the task-calendar-ejb-task-calendar-bean-test application is stopping.

                [INFO    ] CNTR4004I: The task-calendar-ejb-task-calendar-bean-test.war EJB module in the task-calendar-ejb-task-calendar-bean-test application has stopped successfully.

                [AUDIT   ] CWWKZ0009I: The application task-calendar-ejb-task-calendar-bean-test has stopped successfully.

                Jun 24, 2015 11:14:18 AM org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer waitForMBeanTargetState

                FINER: RETURN

                Jun 24, 2015 11:14:18 AM org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getAppDirectory

                FINER: appDir: /IBM/WLP8554/usr/servers/taskcalendar/apps

                Jun 24, 2015 11:14:19 AM org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer stop

                FINER: ENTRY

                Jun 24, 2015 11:14:19 AM org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer stop

                FINER: RETURN

                 

                 

                Also, I only use my own user ID on my Windows machine, and I have admin authority, so I don't think permissions are the issue.