-
Bug
-
Resolution: Fixed
-
P2
-
1.4.2_05
-
beta
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2128484 | 5.0u7 | Mala Bankal | P3 | Resolved | Fixed | b01 |
JDK-2126786 | 1.4.2_10 | Mala Bankal | P2 | Resolved | Fixed | b01 |
A customer found the case where files in .war can not be deleted
in some Web application which uses javax.crypto.Cipher
even if undeploy are executed.
CONFIGURATION:
JDK:JDK1.4.2_05
Tomcat 5.0.25
BEHAVIOR :
The files under webappls directory can not be deleted after undeploy
with Tomcat Manager.
Because the files are not deleted, application can not be deployed
after the customer changes the application.
.........
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:67)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.ja
va:85)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection
.java:69)
at javax.crypto.SunJCE_e.run(DashoA6275)
at java.security.AccessController.doPrivileged(Native Method)
at javax.crypto.SunJCE_d.b(DashoA6275)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_b.b(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SunJCE_g.a(DashoA6275)
at javax.crypto.SunJCE_g.a(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.Cipher.a(DashoA6275)
at javax.crypto.Cipher.getInstance(DashoA6275)
at HelloWorld.encode(HelloWorld.java:41)
at HelloWorld.init(HelloWorld.java:17)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
INVESTIGATION :
It turned out the jar file included in the appication is saved in cache of
sun.net.www.protocol.jar.JarFileFactory called from javax.crypto.Cipher.
We can control cache on/off with using setUseCaches(false) in usual our
application. However, in the above case, because the cache control is done
in javax.crypto.Cipher, we can not do anything to control cache.
REQUEST:
If Cipher really opens jars in user application and hold,
it seems that Cipher should release or purge cached jars on the application's
exit.
Otherwise, please provide some workaround.
======================================================================
in some Web application which uses javax.crypto.Cipher
even if undeploy are executed.
CONFIGURATION:
JDK:JDK1.4.2_05
Tomcat 5.0.25
BEHAVIOR :
The files under webappls directory can not be deleted after undeploy
with Tomcat Manager.
Because the files are not deleted, application can not be deployed
after the customer changes the application.
.........
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:67)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.ja
va:85)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection
.java:69)
at javax.crypto.SunJCE_e.run(DashoA6275)
at java.security.AccessController.doPrivileged(Native Method)
at javax.crypto.SunJCE_d.b(DashoA6275)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_b.b(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SunJCE_g.a(DashoA6275)
at javax.crypto.SunJCE_g.a(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.Cipher.a(DashoA6275)
at javax.crypto.Cipher.getInstance(DashoA6275)
at HelloWorld.encode(HelloWorld.java:41)
at HelloWorld.init(HelloWorld.java:17)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
INVESTIGATION :
It turned out the jar file included in the appication is saved in cache of
sun.net.www.protocol.jar.JarFileFactory called from javax.crypto.Cipher.
We can control cache on/off with using setUseCaches(false) in usual our
application. However, in the above case, because the cache control is done
in javax.crypto.Cipher, we can not do anything to control cache.
REQUEST:
If Cipher really opens jars in user application and hold,
it seems that Cipher should release or purge cached jars on the application's
exit.
Otherwise, please provide some workaround.
======================================================================
- backported by
-
JDK-2126786 Cached Jar file should be released on appl. exit even that is opended by Cipher
- Resolved
-
JDK-2128484 Cached Jar file should be released on appl. exit even that is opended by Cipher
- Resolved
- relates to
-
JDK-6423370 Fix for bug 5098318 prevents caching of JAR files containing cipher code
- Resolved
-
JDK-5041014 URLClassLoader.getResourceAsStream locks jar files
- Closed
-
JDK-6321722 On windows, sometimes jar file cannot be deleted even when there is no reference to it
- Resolved