1 2 Previous Next 16 Replies Latest reply on Nov 14, 2007 1:25 PM by Pete Muir

    unexplode problems

    henrik lindberg Apprentice

      Quite frequently when doing a "build all" or "clean" in JBoss IDE, there are problems with unexplode.

      This is what I get:


      unexplode:
      [delete] Deleting 52 files from C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
      [delete] Unable to delete file C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\security.drl
      [delete] Deleting: C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite-dev-ds.xml
      [delete] Deleting directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
      [delete] Unable to delete file C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\security.drl
      [delete] Unable to delete directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear

      As you can see there are several directories that can not be deleted.

      When trying again it usually works, but it may take 2-3 rebuilds until it works.

      I do not have the directories or files open in some other tool.
      I am using Seam 1.1.5.GA

        • 1. Re: unexplode problems
          henrik lindberg Apprentice

          Second attempt

          unexplode:
          [delete] Deleting 52 files from C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
          [delete] Deleting: C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite-dev-ds.xml
          [delete] Deleting directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
          [delete] Unable to delete file C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\antlr-2.7.6.jar
          [delete] Unable to delete directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear

          • 2. Re: unexplode problems
            henrik lindberg Apprentice

            3d and 4th attempt produced the same result.
            Then it worked.

            • 3. Re: unexplode problems
              henrik lindberg Apprentice

              On the console - I sometimes get this:

              17:56:16,875 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

              --- Incompletely deployed packages ---
              org.jboss.deployment.DeploymentInfo@75a683f2 { url=file:/C:/Dev/jboss-4.0.5.GA/server/default/deploy/cssite.ear/ }
              deployer: org.jboss.deployment.EARDeployer@134263a
              status: null
              state: FAILED
              watch: file:/C:/Dev/jboss-4.0.5.GA/server/default/deploy/cssite.ear/
              altDD: null
              lastDeployed: 1170608165515
              lastModified: 1170608164843
              mbeans:

              And

              17:57:06,953 ERROR [MainDeployer] Could not initialise deployment: file:/C:/Dev/jboss-4.0.5.GA/server/default/deploy/cssite.ear/
              org.jboss.deployment.DeploymentException: No META-INF/application.xml found
              at org.jboss.deployment.EARDeployer.init(EARDeployer.java:133)
              at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy8.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

              Usually, after having seen these exceptions it works better to build clean.

              • 4. Re: unexplode problems
                henrik lindberg Apprentice

                After switching to using ICEFaces I get these type of errors constantly.
                The reason is that something is holding on to the jars in the the war directory.

                Is there something I can do to make sure JBoss (and/or Tomcat) lets go of references so I can redeploy my changed project.

                I am using a default seam-gen generated build.xml file, and it is the "unexplode" target that files in the last delete operation.

                 <target name="unexplode" description="Undeploy the exploded archive">
                 <delete failonerror="no">
                 <fileset dir="${ear.deploy.dir}">
                 <exclude name="**/*.jar" />
                 </fileset>
                 </delete>
                 <delete file="${deploy.dir}/${project.name}-${profile}-ds.xml" failonerror="no" />
                 <delete dir="${ear.deploy.dir}" failonerror="no" />
                 </target>
                



                • 5. Re: unexplode problems
                  henrik lindberg Apprentice

                  And this is the typical result of doing a "clean":

                  
                  Buildfile: C:\Projects\cssite\build.xml
                  
                  clean:
                  
                  unexplode:
                   [delete] Deleting directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
                   [delete] Unable to delete file C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\cssite.war\WEB-INF\lib\commons-fileupload.jar
                   [delete] Unable to delete file C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\cssite.war\WEB-INF\lib\icefaces-comps.jar
                   [delete] Unable to delete file C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\cssite.war\WEB-INF\lib\icefaces-facelets.jar
                   [delete] Unable to delete file C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\cssite.war\WEB-INF\lib\icefaces.jar
                   [delete] Unable to delete directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
                   [delete] Unable to delete directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
                   [delete] Unable to delete directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
                   [delete] Unable to delete directory C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
                  
                  init:
                   [mkdir] Created dir: C:\Projects\cssite\exploded-archives\cssite.jar
                   [mkdir] Created dir: C:\Projects\cssite\exploded-archives\cssite.ear
                   [mkdir] Created dir: C:\Projects\cssite\exploded-archives\cssite.war
                   [mkdir] Created dir: C:\Projects\cssite\dist
                  
                  compile:
                  
                  copyclasses:
                   [copy] Copying 24 files to C:\Projects\cssite\exploded-archives\cssite.jar
                  
                  jar:
                   [copy] Copying 1 file to C:\Projects\cssite\exploded-archives\cssite.jar
                   [copy] Copying 1 file to C:\Projects\cssite\exploded-archives\cssite.jar\META-INF
                   [copy] Copying 1 file to C:\Projects\cssite\exploded-archives\cssite.jar\META-INF
                   [copy] Copying 1 file to C:\Projects\cssite\exploded-archives\cssite.jar
                  
                  war:
                   [copy] Copying 27 files to C:\Projects\cssite\exploded-archives\cssite.war
                   [copy] Copying 5 files to C:\Projects\cssite\exploded-archives\cssite.war\WEB-INF
                   [copy] Copying 9 files to C:\Projects\cssite\exploded-archives\cssite.war\WEB-INF\lib
                   [copy] Copying 1 file to C:\Projects\cssite\exploded-archives\cssite.war\WEB-INF\classes
                  
                  ear:
                   [copy] Copying 13 files to C:\Projects\cssite\exploded-archives\cssite.ear
                   [copy] Copying 2 files to C:\Projects\cssite\exploded-archives\cssite.ear\META-INF
                  
                  datasource:
                   [copy] Copying 1 file to C:\Dev\jboss-4.0.5.GA\server\default\deploy
                  
                  explode:
                   [mkdir] Created dir: C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\cssite.jar
                   [copy] Copying 28 files to C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\cssite.jar
                   [copy] Copying 42 files to C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear\cssite.war
                   [copy] Copying 15 files to C:\Dev\jboss-4.0.5.GA\server\default\deploy\cssite.ear
                  
                  restart:
                  
                  compiletest:
                  
                  buildtest:
                   [copy] Copying 13 files to C:\Projects\cssite\test-build
                   [copy] Copying 1 file to C:\Projects\cssite\test-build\META-INF
                   [copy] Copying 1 file to C:\Projects\cssite\test-build
                  BUILD SUCCESSFUL
                  Total time: 5 seconds
                  


                  • 6. Re: unexplode problems
                    Gavin King Master

                    This is not unusual. Sometimes the JVM holds a hard ref to some jars, which prevents the unexplode target from completing fully.

                    It should not be a problem in most cases, since usually those jars dont change.

                    In the rare case where it is a prob, just type "seam unexplode" twice on the commandline. Second try usually works.

                    • 7. Re: unexplode problems
                      Pete Muir Master

                      This occurs more on windows, I've never seen it on linux. It might be worth altering the build so that the deletes always complete:

                      <target name="unexplode" description="Undeploy the exploded archive">
                       <delete failonerror="off">
                       <fileset dir="${ear.deploy.dir}">
                       <exclude name="**/*.jar" />
                       </fileset>
                       </delete>
                      etc.
                      


                      • 8. Re: unexplode problems
                        Gavin King Master

                        It already looks like:

                        <target name="unexplode" description="Undeploy the exploded archive">
                         <delete failonerror="no">
                         <fileset dir="${ear.deploy.dir}">
                         <exclude name="**/*.jar"/>
                         </fileset>
                         </delete>
                         <delete file="${deploy.dir}/${project.name}-${profile}-ds.xml" failonerror="no"/>
                         <delete dir="${ear.deploy.dir}" failonerror="no"/>
                         </target>
                        


                        • 9. Re: unexplode problems
                          henrik lindberg Apprentice

                          repeated unexplode used to work, but when adding more jar files in the war directory it does not help.

                          I found other advice recomending setting tomcat context variables (antiJarLocking) - but I have not been able to make that work.

                          Will try some alternatives before - uh -- I don't know - giving up...

                          • 10. Re: unexplode problems
                            koen handekyn Newbie

                            i'm having the same issues on my vista machine with jdk1.5. the same effect with jrocket 5.

                            i'm very interested in a solution to speed up my development cycle

                            koen

                            • 11. Re: unexplode problems
                              Pete Muir Master

                              Complain to MS - this isn't a problem on Linux or Mac

                              • 12. Re: unexplode problems
                                Ivan B Novice

                                WinXP, JBoss-4.2.2, Seam-2.0.0

                                Let me acknowledge the same problem. After the app has been once "exploded" into JBoss deploy dir it cannot be removed apparently because some jars are locked up. This is especially annoying when the app hasn't deployed properly, and needs re-deplyment, which in turn cannot be done due to the above problem.

                                So far have to resort to normal .war deployment, however once in several times run into PermGenSpace out of memory exception, which is well discussed on forums.

                                Out of curiosity, does the majority of public here run AS on Linux even during development?

                                • 13. Re: unexplode problems
                                  koen handekyn Newbie

                                  i develop on windows and the response "complain to MS" is all to simple, i don't have any file locking issues with other apps

                                  don't want to point to jboss or jboss seam, could also be a jvm related bug ...

                                  • 14. Re: unexplode problems
                                    Pete Muir Master

                                    The way to check the culprit is to see what doesn't get removed properly. I can't check as I don't have access to windows.

                                    1 2 Previous Next