8 Replies Latest reply on Jul 17, 2002 10:28 AM by naxius

    Deploying and undeploying an EAR

    naxius

      Hi,

      We have an application in development. This application
      is composed of servlet, jsp, ejb (SBSL & Entity CMP) and
      basic beans.
      To test our development, we are packaging this application
      within on EAR file and then deploy it to JBoss 3.0.

      The problem is when we undeploy the EAR (delete the
      file from the deploy directory of JBoss) or redeploy the
      EAR file (copy a new modified EAR file in the deploy dir.
      of JBoss), the client (standalone programm which call
      the SBSL Facade's methods) has an exception :

      <<<<RemoteException occurred in server thread; nested exception is:
      java.rmi.ServerException: null
      Embedded Exception
      $Proxy122; nested exception is:
      javax.ejb.EJBException: null
      Embedded Exception
      $Proxy122


      If we shutdown JBoss, delete all files within server/default/tmp directory (contains temporary files
      of deployed applications), and the restard JBoss with
      the *same* EAR file and start the client, guess what?
      it works...

      Of course, this behavior is very, very unconfortable and
      we waste precious time to undeploy, stop, delete temp
      files, start, deploy and finally test.

      Do you have the same issue? Do you have any idea?
      Jboss says that you can deploy/undeploy application...

      We try JBoss 3.0.1 and it still not work :-(

      Thanks for your different answers.

      Alexandre Aubry
      France - Sophia Antipolis

        • 1. Re: Deploying and undeploying an EAR

          What error do you see in
          ${jboss_home}/server/default/log/server.log

          Regards,
          Adrian

          • 2. Re: Deploying and undeploying an EAR
            naxius

            The server.log file says (it's a little bit long...) :

            2002-07-15 09:38:42,162 INFO [org.jboss.deployment.MainDeployer] not deleting localUrl, it is null or not a copy: njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/clicktocontact.jar
            2002-07-15 09:38:42,162 INFO [org.jboss.deployment.MainDeployer] Undeployed njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/clicktocontact.jar
            2002-07-15 09:38:42,162 DEBUG [org.jboss.deployment.MainDeployer] Destroying sub deployment: njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/c2cConfigurator.war
            2002-07-15 09:38:42,162 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository] UnifiedLoaderRepository removed(true) org.jboss.mx.loading.UnifiedClassLoader@38ec91{ url=njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/c2cConfigurator.war }
            2002-07-15 09:38:42,162 INFO [org.jboss.deployment.MainDeployer] not deleting localUrl, it is null or not a copy: njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/c2cConfigurator.war
            2002-07-15 09:38:42,162 INFO [org.jboss.deployment.MainDeployer] Undeployed njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/c2cConfigurator.war
            2002-07-15 09:38:42,162 DEBUG [org.jboss.deployment.MainDeployer] Destroying sub deployment: njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/service.war
            2002-07-15 09:38:42,162 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository] UnifiedLoaderRepository removed(true) org.jboss.mx.loading.UnifiedClassLoader@335053{ url=njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/service.war }
            2002-07-15 09:38:42,162 INFO [org.jboss.deployment.MainDeployer] not deleting localUrl, it is null or not a copy: njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/service.war
            2002-07-15 09:38:42,162 INFO [org.jboss.deployment.MainDeployer] Undeployed njar:file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear^/service.war
            2002-07-15 09:38:42,162 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository] UnifiedLoaderRepository removed(true) org.jboss.mx.loading.UnifiedClassLoader@1497b1{ url=file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear }
            2002-07-15 09:38:42,162 INFO [org.jboss.deployment.MainDeployer] could not delete directory file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/clicktocontact.ear/80.clicktocontact.ear restart will delete it
            2002-07-15 09:38:42,162 INFO [org.jboss.deployment.MainDeployer] Undeployed file:/C:/softeam/java/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/clicktocontact.ear

            • 3. Re: Deploying and undeploying an EAR

              That just says it is undeployed.
              I don't see any new or redeployment?

              Can you explain your exact steps.

              Regards,
              Adrian

              • 4. Re: Deploying and undeploying an EAR
                naxius

                Well, the steps are :

                1- compile and package the EAR file within JBuilder 6 EE with JBoss 3.x addin ;
                2- still from JBuilder, deploy the EAR file
                3- test my application from my client
                4- Modify a business method in a SBSL for example
                5- compile, package and redeploy (undeploy and deploy) the EAR
                6- test my application and it does not work...

                When undeploying the EAR, the stack trace in the server.log file is the stack trace provided in my previous
                mail.

                If I stop JBoss, delete files in the tmp dir. or JBoss,
                and restart JBoss and test my EAR, it works...

                This is a real nightmare and the development process is
                not productive.

                Any ideas?

                Thanks for your answers but it seems that JBoss does not
                support hotdeployment.

                Alexandre Aubry
                FRANCE

                • 5. Re: Deploying and undeploying an EAR

                  Are you using a deploy mechanism in JBuilder?
                  Maybe it is a problem there?

                  Have you tried copying the new EAR to
                  server/default/deploy
                  manually?

                  Just copying over the existing file should cause the
                  EAR to redeploy.

                  The files in the tmp dir are not relevent. The reason
                  JBoss cannot remove them is because of windows file
                  system locking. They are removed the next time you restart
                  JBoss.

                  Regards,
                  Adrian

                  • 6. Re: Deploying and undeploying an EAR
                    naxius

                    The problem is exactly the same when doing the deployment/
                    undeployment steps manually.

                    Regards,

                    Alexandre Aubry
                    FRANCE

                    • 7. Re: Deploying and undeploying an EAR

                      After you have undeployed the ear can you deploy
                      anything at all.

                      What happens if you deploy the ear under a different
                      name?

                      This is very strange.

                      Regards,
                      Adrian

                      • 8. Re: Deploying and undeploying an EAR
                        naxius

                        Ok, I undeploy my EAR, change the source code and compile it. Rename the EAR file and deploy this EAR file in the
                        deploy directory.

                        And, I have the same exception as usual :

                        <<<<RemoteException occurred in server thread; nested exception is:
                        java.rmi.ServerException: null
                        Embedded Exception
                        $Proxy122; nested exception is:
                        javax.ejb.EJBException: null
                        Embedded Exception
                        $Proxy122

                        java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
                        java.rmi.ServerException: null
                        Embedded Exception
                        $Proxy122; nested exception is:
                        javax.ejb.EJBException: null
                        Embedded Exception
                        $Proxy122

                        It seems that the SBSL is not real unbound from the
                        JNDI.

                        I still have to undeploy the EAR, stop JBoss,
                        clean tmp dir (if I don't, JBoss do not see my new EAR...)
                        then start JBoss and deploy my EAR, and finally :-(
                        start my client and test...

                        Nightmare? I said nightmare? This is a real nightmare.

                        Regards.
                        Alexandre