6 Replies Latest reply on Oct 14, 2003 10:55 AM by bjornno

    WAR wont deploy in AOP DR1 version

    r_clegg1 Newbie

      When deploying an ear with a war inside it the following message is issued. The ear/war deploys
      ok in prior versions of jboss up to 3.2.1:

      WARN [org.jboss.deployment.EARDeployer] Failed to extract nested jar. Ignoring: admin-war-ic.war
      java.io.FileNotFoundException: C:\jboss-4.0.0DR1\server\default\tmp\deploy\server\default\deploy\PCLAdmin.ear\47.PCLAdmin.ear-contents\admin-war-ic.war (Access is denied)
      at java.io.FileOutputStream.open(Native Method)

      please advise
      at java.io.FileOutputStream.(FileOutputStream.java:176)
      at java.io.FileOutputStream.(FileOutputStream.java:131)
      at org.jboss.util.file.JarUtils.extractNestedJar(JarUtils.java:337)
      at org.jboss.deployment.EARDeployer.init(EARDeployer.java:135)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:650)

        • 1. Re: WAR wont deploy in AOP DR1 version
          jenniferhsu Newbie

          I have the same error when I deploy war file in default dir in JBoss 4.0 DR version.

          • 2. Re: WAR wont deploy in AOP DR1 version
            Jarkko Lietolahti Novice

            Also broken with JBoss 4.0DR2
            19:51:06,178 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/java/jboss-4.0.0DR2/server/default/deploy/template.ear
            19:51:06,208 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/C:/java/jboss-4.0.0DR2/server/default/deploy/template.ear
            19:51:06,248 WARN [org.jboss.deployment.EARDeployer] Failed to extract nested jar. Ignoring: jab-web.war
            java.io.FileNotFoundException: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war (Access is denied)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.(FileOutputStream.java:179)
            at java.io.FileOutputStream.(FileOutputStream.java:131)
            at org.jboss.util.file.JarUtils.extractNestedJar(JarUtils.java:337)
            at org.jboss.deployment.EARDeployer.init(EARDeployer.java:135)
            at org.jboss.deployment.MainDeployer.init(MainDeployer.java:650)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:582)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:558)
            at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:155)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:172)
            at $Proxy9.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:529)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)


            It works ok if i delete the tmp/deploy directory before starting up the Jboss.

            • 3. Re: WAR wont deploy in AOP DR1 version
              Jarkko Lietolahti Novice

              After doing some more research i noticed that the directory it's unable to delete contains few files!

              The only remaining directory in 62.template.ear-contents is 62.template.ear-contents/jab-web-war/WEB-INF/lib and it contains a bunch of jar-files. There's nothing else in the -contents-directory. I think i saw somewhere in the log files a message saying undeleting those jar-files failed for some reason..

              • 4. Re: WAR wont deploy in AOP DR1 version
                Jarkko Lietolahti Novice

                Ok, when undeploying EAR Jboss fails to clean up some jar files from the temp/deploy-directory.
                And then when trying to redeploy the same EAR it fails because there's allready some files present and Jboss is assuming it should be empty.


                12:14:28,225 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\commons-beanutils.jar
                12:14:28,225 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\commons-collections.jar
                12:14:28,225 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\commons-digester.jar
                12:14:28,225 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\commons-fileupload.jar
                12:14:28,225 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\commons-lang.jar
                12:14:28,225 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\commons-logging.jar
                12:14:28,245 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\commons-validator.jar
                12:14:28,245 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\jakarta-oro.jar
                12:14:28,245 DEBUG [org.jboss.util.file.Files] Failed to delete file: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib\struts.jar
                12:14:28,245 DEBUG [org.jboss.util.file.Files] Failed to delete dir: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib
                12:14:28,245 DEBUG [org.jboss.util.file.Files] Failed to delete dir: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF\lib
                12:14:28,926 DEBUG [org.jboss.util.file.Files] Failed to delete dir: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF
                12:14:28,926 DEBUG [org.jboss.util.file.Files] Failed to delete dir: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war\WEB-INF
                12:14:28,926 DEBUG [org.jboss.util.file.Files] Failed to delete dir: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear-contents\jab-web.war
                12:14:28,926 DEBUG [org.jboss.deployment.DeploymentInfo] Could not delete directory file:/C:/java/jboss-4.0.0DR2/server/default/tmp/deploy/server/default/deploy/template.ear/62.template.ear-contents/jab-web.war/ restart will delete it
                12:14:28,926 INFO [org.jboss.deployment.MainDeployer] Undeployed file:/C:/java/jboss-4.0.0DR2/server/default/tmp/deploy/server/default/deploy/template.ear/62.template.ear-contents/jab-web.war
                12:14:28,926 DEBUG [org.jboss.system.ServiceController] removing service: jboss.deployment:name=file%3a/C%3a/java/jboss-4.0.0DR2/server/default/deploy/template.ear,service=DeploymentInfo
                12:14:28,926 DEBUG [org.jboss.system.ServiceController] removing jboss.deployment:name=file%3a/C%3a/java/jboss-4.0.0DR2/server/default/deploy/template.ear,service=DeploymentInfo from server
                12:14:28,926 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] UnifiedLoaderRepository removed(false) org.jboss.mx.loading.UnifiedClassLoader3@e74663{ url=file:/C:/java/jboss-4.0.0DR2/server/default/tmp/deploy/server/default/deploy/template.ear/62.template.ear ,addedOrder=34}
                12:14:28,926 DEBUG [org.jboss.util.file.Files] Failed to delete dir: C:\java\jboss-4.0.0DR2\server\default\tmp\deploy\server\default\deploy\template.ear\62.template.ear
                12:14:28,926 DEBUG [org.jboss.deployment.DeploymentInfo] Could not delete directory file:/C:/java/jboss-4.0.0DR2/server/default/tmp/deploy/server/default/deploy/template.ear/62.template.ear restart will delete it
                12:14:28,926 INFO [org.jboss.deployment.MainDeployer] Undeployed file:/C:/java/jboss-4.0.0DR2/server/default/deploy/template.ear
                12:14:28,926 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=MainDeployer,type=Undeployment,sequenceNumber=0,timeStamp=1060161268926,message=null,userData=file:/C:/java/jboss-4.0.0DR2/server/default/deploy/template.ear]


                • 5. Re: WAR wont deploy in AOP DR1 version
                  skyy99_1111 Newbie

                  I'm using DR2 on XP.

                  I've found the problem to be related to .wars that have .jars in their WEB-INF/lib directory. If you'll notice those .jars are locked while JBoss is running (cannot delete them). I suspect they remain locked when the deployer tries to undeploy the .war (i.e. delete the contents of the tmp dir). Then when the deployer tries to redeploy that .war again, it finds a half deleted (half deployed) .war already in the tmp dir.

                  Poor form.

                  -Matt

                  • 6. Re: WAR wont deploy in AOP DR1 version
                    bjornno Newbie

                    When will this be fixed. And is there some ways to avoid this problem? I restart jboss and delete the temp dir each time I redeploy an ear, which is pretty time consuming..