Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.1_b12
    • Fix Version/s: 3.1.2_b13
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      windows 7, jdk 7

      Description

      Here are the steps to reproduce the issue...

      S:\Users\vbk\Downloads>jar xvf jar-lock-demo.jar
      created: META-INF/
      inflated: META-INF/MANIFEST.MF
      created: JarLockDemo/
      created: JarLockDemo/build/
      created: JarLockDemo/build/empty/
      created: JarLockDemo/build/generated-sources/
      created: JarLockDemo/build/generated-sources/ap-source-output/
      created: JarLockDemo/build/web/
      inflated: JarLockDemo/build/web/index.jsp
      created: JarLockDemo/build/web/META-INF/
      inflated: JarLockDemo/build/web/META-INF/MANIFEST.MF
      created: JarLockDemo/build/web/WEB-INF/
      created: JarLockDemo/build/web/WEB-INF/classes/
      created: JarLockDemo/build/web/WEB-INF/lib/
      inflated: JarLockDemo/build/web/WEB-INF/lib/jstl.jar
      inflated: JarLockDemo/build/web/WEB-INF/lib/standard.jar
      inflated: JarLockDemo/build.xml
      created: JarLockDemo/dist/
      inflated: JarLockDemo/dist/JarLockDemo.war
      created: JarLockDemo/nbproject/
      inflated: JarLockDemo/nbproject/ant-deploy.xml
      inflated: JarLockDemo/nbproject/build-impl.xml
      inflated: JarLockDemo/nbproject/genfiles.properties
      created: JarLockDemo/nbproject/private/
      inflated: JarLockDemo/nbproject/private/private.properties
      inflated: JarLockDemo/nbproject/project.properties
      inflated: JarLockDemo/nbproject/project.xml
      created: JarLockDemo/src/
      created: JarLockDemo/src/conf/
      inflated: JarLockDemo/src/conf/MANIFEST.MF
      created: JarLockDemo/src/java/
      created: JarLockDemo/web/
      inflated: JarLockDemo/web/index.jsp
      created: JarLockDemo/web/WEB-INF/

      S:\Users\vbk\Downloads>"s:\P F\glassfish-3.1.1\bin\asadmin" deploy JarLockDemo\build\web
      Application deployed with name web.
      Command deploy executed successfully.

      S:\Users\vbk\Downloads>start iexplore.exe http://127.0.0.1:8080/web

      S:\Users\vbk\Downloads>"s:\P F\glassfish-3.1.1\bin\asadmin" undeploy web
      Command undeploy executed successfully.

      S:\Users\vbk\Downloads>del JarLockDemo\build\web\WEB-INF\lib\jstl.jar
      S:\Users\vbk\Downloads\JarLockDemo\build\web\WEB-INF\lib\jstl.jar
      The process cannot access the file because it is being used by another process.

      S:\Users\vbk\Downloads>"s:\P F\glassfish-3.1.1\bin\asadmin" version
      Version = GlassFish Server Open Source Edition 3.1.1 (build 12)
      Command version executed successfully.

      S:\Users\vbk\Downloads>java -version
      java version "1.7.0"
      Java(TM) SE Runtime Environment (build 1.7.0-b147)
      Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

      This is the root cause of https://netbeans.org/bugzilla/show_bug.cgi?id=202419

      Any productive development workflow will use directory deployment so this is more than a 'NetBeans problem' or an IDE problem.

        Activity

        Hide
        Hong Zhang added a comment -

        Assign to Tim to take a look as he has more experience with this.

        Show
        Hong Zhang added a comment - Assign to Tim to take a look as he has more experience with this.
        Hide
        Tim Quinn added a comment -

        As with any file locking problem, step 1 is to identify what code is locking it, which is relatively easy using the tool and instructions here:

        http://blogs.oracle.com/quinn/entry/tool_for_diagnosing_failed_glassfish

        Using that, I found out that it seems to be part of Jasper invoked from the web container that is opening the JAR (see the stack trace below).

        So I am transferring this to the web container team.

        Current list of opened but unclosed jar files matching the filter:
        Path "/Users/Tim/asgroup/bugs/17339-fileLocking/JarLockDemo/build/web/WEB-INF/lib/jstl.jar"
        ..Opened by hashCode object 566 from:
        java.util.jar.JarFile.<init>(java/util/jar/JarFile.java:137)
        java.util.jar.JarFile.<init>(java/util/jar/JarFile.java:72)
        sun.net.www.protocol.jar.URLJarFile.<init>(sun/net/www/protocol/jar/URLJarFile.java:72)
        sun.net.www.protocol.jar.URLJarFile.getJarFile(sun/net/www/protocol/jar/URLJarFile.java:48)
        sun.net.www.protocol.jar.JarFileFactory.get(sun/net/www/protocol/jar/JarFileFactory.java:55)
        sun.net.www.protocol.jar.JarURLConnection.connect(sun/net/www/protocol/jar/JarURLConnection.java:104)
        sun.net.www.protocol.jar.JarURLConnection.getJarFile(sun/net/www/protocol/jar/JarURLConnection.java:71)
        java.net.JarURLConnection.getManifest(java/net/JarURLConnection.java:217)
        org.apache.jasper.runtime.TldScanner.addManifestClassPath(org/apache/jasper/runtime/TldScanner.java:749)
        org.apache.jasper.runtime.TldScanner.scanJars(org/apache/jasper/runtime/TldScanner.java:687)
        org.apache.jasper.runtime.TldScanner.scanTlds(org/apache/jasper/runtime/TldScanner.java:350)
        org.apache.jasper.runtime.TldScanner.onStartup(org/apache/jasper/runtime/TldScanner.java:239)
        org.apache.catalina.core.StandardContext.callServletContainerInitializers(org/apache/catalina/core/StandardContext.java:5467)
        com.sun.enterprise.web.WebModule.callServletContainerInitializers(com/sun/enterprise/web/WebModule.java:581)
        org.apache.catalina.core.StandardContext.start(org/apache/catalina/core/StandardContext.java:5363)
        com.sun.enterprise.web.WebModule.start(com/sun/enterprise/web/WebModule.java:498)
        org.apache.catalina.core.ContainerBase.addChildInternal(org/apache/catalina/core/ContainerBase.java:917)
        org.apache.catalina.core.ContainerBase.addChild(org/apache/catalina/core/ContainerBase.java:901)
        org.apache.catalina.core.StandardHost.addChild(org/apache/catalina/core/StandardHost.java:733)
        com.sun.enterprise.web.WebContainer.loadWebModule(com/sun/enterprise/web/WebContainer.java:2000)
        com.sun.enterprise.web.WebContainer.loadWebModule(com/sun/enterprise/web/WebContainer.java:1651)
        com.sun.enterprise.web.WebApplication.start(com/sun/enterprise/web/WebApplication.java:109)
        org.glassfish.internal.data.EngineRef.start(org/glassfish/internal/data/EngineRef.java:130)
        org.glassfish.internal.data.ModuleInfo.start(org/glassfish/internal/data/ModuleInfo.java:269)
        org.glassfish.internal.data.ApplicationInfo.start(org/glassfish/internal/data/ApplicationInfo.java:294)
        com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(com/sun/enterprise/v3/server/ApplicationLifecycle.java:462)
        com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(com/sun/enterprise/v3/server/ApplicationLifecycle.java:240)
        org.glassfish.deployment.admin.DeployCommand.execute(org/glassfish/deployment/admin/DeployCommand.java:382)
        com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:355)
        com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:370)
        com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:1064)
        com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:96)
        com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:1244)
        com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:1232)
        com.sun.enterprise.v3.admin.AdminAdapter.doCommand(com/sun/enterprise/v3/admin/AdminAdapter.java:459)
        com.sun.enterprise.v3.admin.AdminAdapter.service(com/sun/enterprise/v3/admin/AdminAdapter.java:209)
        com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(com/sun/grizzly/tcp/http11/GrizzlyAdapter.java:168)
        com.sun.enterprise.v3.server.HK2Dispatcher.dispath(com/sun/enterprise/v3/server/HK2Dispatcher.java:117)
        com.sun.enterprise.v3.services.impl.ContainerMapper.service(com/sun/enterprise/v3/services/impl/ContainerMapper.java:238)
        com.sun.grizzly.http.ProcessorTask.invokeAdapter(com/sun/grizzly/http/ProcessorTask.java:828)
        com.sun.grizzly.http.ProcessorTask.doProcess(com/sun/grizzly/http/ProcessorTask.java:725)
        com.sun.grizzly.http.ProcessorTask.process(com/sun/grizzly/http/ProcessorTask.java:1019)
        com.sun.grizzly.http.DefaultProtocolFilter.execute(com/sun/grizzly/http/DefaultProtocolFilter.java:225)
        com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(com/sun/grizzly/DefaultProtocolChain.java:137)
        com.sun.grizzly.DefaultProtocolChain.execute(com/sun/grizzly/DefaultProtocolChain.java:104)
        com.sun.grizzly.DefaultProtocolChain.execute(com/sun/grizzly/DefaultProtocolChain.java:90)
        com.sun.grizzly.http.HttpProtocolChain.execute(com/sun/grizzly/http/HttpProtocolChain.java:79)
        com.sun.grizzly.ProtocolChainContextTask.doCall(com/sun/grizzly/ProtocolChainContextTask.java:54)
        com.sun.grizzly.SelectionKeyContextTask.call(com/sun/grizzly/SelectionKeyContextTask.java:59)
        com.sun.grizzly.ContextTask.run(com/sun/grizzly/ContextTask.java:71)
        com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(com/sun/grizzly/util/AbstractThreadPool.java:532)
        com.sun.grizzly.util.AbstractThreadPool$Worker.run(com/sun/grizzly/util/AbstractThreadPool.java:513)
        java.lang.Thread.run(java/lang/Thread.java:680)

        Show
        Tim Quinn added a comment - As with any file locking problem, step 1 is to identify what code is locking it, which is relatively easy using the tool and instructions here: http://blogs.oracle.com/quinn/entry/tool_for_diagnosing_failed_glassfish Using that, I found out that it seems to be part of Jasper invoked from the web container that is opening the JAR (see the stack trace below). So I am transferring this to the web container team. Current list of opened but unclosed jar files matching the filter: Path "/Users/Tim/asgroup/bugs/17339-fileLocking/JarLockDemo/build/web/WEB-INF/lib/jstl.jar" ..Opened by hashCode object 566 from: java.util.jar.JarFile.<init>(java/util/jar/JarFile.java:137) java.util.jar.JarFile.<init>(java/util/jar/JarFile.java:72) sun.net.www.protocol.jar.URLJarFile.<init>(sun/net/www/protocol/jar/URLJarFile.java:72) sun.net.www.protocol.jar.URLJarFile.getJarFile(sun/net/www/protocol/jar/URLJarFile.java:48) sun.net.www.protocol.jar.JarFileFactory.get(sun/net/www/protocol/jar/JarFileFactory.java:55) sun.net.www.protocol.jar.JarURLConnection.connect(sun/net/www/protocol/jar/JarURLConnection.java:104) sun.net.www.protocol.jar.JarURLConnection.getJarFile(sun/net/www/protocol/jar/JarURLConnection.java:71) java.net.JarURLConnection.getManifest(java/net/JarURLConnection.java:217) org.apache.jasper.runtime.TldScanner.addManifestClassPath(org/apache/jasper/runtime/TldScanner.java:749) org.apache.jasper.runtime.TldScanner.scanJars(org/apache/jasper/runtime/TldScanner.java:687) org.apache.jasper.runtime.TldScanner.scanTlds(org/apache/jasper/runtime/TldScanner.java:350) org.apache.jasper.runtime.TldScanner.onStartup(org/apache/jasper/runtime/TldScanner.java:239) org.apache.catalina.core.StandardContext.callServletContainerInitializers(org/apache/catalina/core/StandardContext.java:5467) com.sun.enterprise.web.WebModule.callServletContainerInitializers(com/sun/enterprise/web/WebModule.java:581) org.apache.catalina.core.StandardContext.start(org/apache/catalina/core/StandardContext.java:5363) com.sun.enterprise.web.WebModule.start(com/sun/enterprise/web/WebModule.java:498) org.apache.catalina.core.ContainerBase.addChildInternal(org/apache/catalina/core/ContainerBase.java:917) org.apache.catalina.core.ContainerBase.addChild(org/apache/catalina/core/ContainerBase.java:901) org.apache.catalina.core.StandardHost.addChild(org/apache/catalina/core/StandardHost.java:733) com.sun.enterprise.web.WebContainer.loadWebModule(com/sun/enterprise/web/WebContainer.java:2000) com.sun.enterprise.web.WebContainer.loadWebModule(com/sun/enterprise/web/WebContainer.java:1651) com.sun.enterprise.web.WebApplication.start(com/sun/enterprise/web/WebApplication.java:109) org.glassfish.internal.data.EngineRef.start(org/glassfish/internal/data/EngineRef.java:130) org.glassfish.internal.data.ModuleInfo.start(org/glassfish/internal/data/ModuleInfo.java:269) org.glassfish.internal.data.ApplicationInfo.start(org/glassfish/internal/data/ApplicationInfo.java:294) com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(com/sun/enterprise/v3/server/ApplicationLifecycle.java:462) com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(com/sun/enterprise/v3/server/ApplicationLifecycle.java:240) org.glassfish.deployment.admin.DeployCommand.execute(org/glassfish/deployment/admin/DeployCommand.java:382) com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:355) com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:370) com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:1064) com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:96) com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:1244) com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(com/sun/enterprise/v3/admin/CommandRunnerImpl.java:1232) com.sun.enterprise.v3.admin.AdminAdapter.doCommand(com/sun/enterprise/v3/admin/AdminAdapter.java:459) com.sun.enterprise.v3.admin.AdminAdapter.service(com/sun/enterprise/v3/admin/AdminAdapter.java:209) com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(com/sun/grizzly/tcp/http11/GrizzlyAdapter.java:168) com.sun.enterprise.v3.server.HK2Dispatcher.dispath(com/sun/enterprise/v3/server/HK2Dispatcher.java:117) com.sun.enterprise.v3.services.impl.ContainerMapper.service(com/sun/enterprise/v3/services/impl/ContainerMapper.java:238) com.sun.grizzly.http.ProcessorTask.invokeAdapter(com/sun/grizzly/http/ProcessorTask.java:828) com.sun.grizzly.http.ProcessorTask.doProcess(com/sun/grizzly/http/ProcessorTask.java:725) com.sun.grizzly.http.ProcessorTask.process(com/sun/grizzly/http/ProcessorTask.java:1019) com.sun.grizzly.http.DefaultProtocolFilter.execute(com/sun/grizzly/http/DefaultProtocolFilter.java:225) com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(com/sun/grizzly/DefaultProtocolChain.java:137) com.sun.grizzly.DefaultProtocolChain.execute(com/sun/grizzly/DefaultProtocolChain.java:104) com.sun.grizzly.DefaultProtocolChain.execute(com/sun/grizzly/DefaultProtocolChain.java:90) com.sun.grizzly.http.HttpProtocolChain.execute(com/sun/grizzly/http/HttpProtocolChain.java:79) com.sun.grizzly.ProtocolChainContextTask.doCall(com/sun/grizzly/ProtocolChainContextTask.java:54) com.sun.grizzly.SelectionKeyContextTask.call(com/sun/grizzly/SelectionKeyContextTask.java:59) com.sun.grizzly.ContextTask.run(com/sun/grizzly/ContextTask.java:71) com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(com/sun/grizzly/util/AbstractThreadPool.java:532) com.sun.grizzly.util.AbstractThreadPool$Worker.run(com/sun/grizzly/util/AbstractThreadPool.java:513) java.lang.Thread.run(java/lang/Thread.java:680)
        Hide
        Shing Wai Chan added a comment -

        Accordng to Tim's analysis, the following code lock the file:
        org.apache.jasper.runtime.TldScanner.addManifestClassPath(org/apache/jasper/runtime/TldScanner.java:749)

        Show
        Shing Wai Chan added a comment - Accordng to Tim's analysis, the following code lock the file: org.apache.jasper.runtime.TldScanner.addManifestClassPath(org/apache/jasper/runtime/TldScanner.java:749)
        Hide
        vince kraemer added a comment -
        Show
        vince kraemer added a comment - another path to this issue... https://netbeans.org/bugzilla/show_bug.cgi?id=204320
        Hide
        vince kraemer added a comment -

        kchung... it has been a couple weeks. Do you have an update on the status of fixing this?

        Show
        vince kraemer added a comment - kchung... it has been a couple weeks. Do you have an update on the status of fixing this?
        Hide
        kchung added a comment -

        This isuue has been fixed in JSP project and the artifacts puplished (org.glassfish.web:javax.servlet.jsp) but has not been integrated into glassfish. There was a weired osgi error when I started the server. I'll track it down when I come back from my vacation 11/15.

        Show
        kchung added a comment - This isuue has been fixed in JSP project and the artifacts puplished (org.glassfish.web:javax.servlet.jsp) but has not been integrated into glassfish. There was a weired osgi error when I started the server. I'll track it down when I come back from my vacation 11/15.
        Hide
        kchung added a comment -

        Fixed

        Show
        kchung added a comment - Fixed

          People

          • Assignee:
            kchung
            Reporter:
            vince kraemer
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: