[
https://issues.apache.org/jira/browse/WICKET-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bernard updated WICKET-6809:
----------------------------
Component/s: (was: wicket)
wicket-core
Affects Version/s: (was: 1.5.5)
8.9.0
Description:
How to reproduce:
- Use the attached quickstart
- deploy it on the GlassFish server with directory deployment (I use NetBeans
which is easy) but Windows command files are provided
- open the application in the browser
- undeploy the application
- try to execute the maven clean goal or try to delete the target dir
Maven error: Failed to delete ... WEB-INF\lib\wicket-core-8.9.0.jar
Please inspect for WICKET-4458 for how to use the ZipFileMonitor tool which is
included in the attached quickstart. The output of the show command is as
follows:
..Opened by hashCode object 3192 from:
java.util.jar.JarFile.<init>(java\util\jar\JarFile.java:168)
java.util.jar.JarFile.<init>(java\util\jar\JarFile.java:103)
sun.net.www.protocol.jar.URLJarFile.<init>(sun\net\www\protocol\jar\URLJarFile.java:93)
sun.net.www.protocol.jar.URLJarFile.getJarFile(sun\net\www\protocol\jar\URLJarFile.java:69)
sun.net.www.protocol.jar.JarFileFactory.get(sun\net\www\protocol\jar\JarFileFactory.java:94)
sun.net.www.protocol.jar.JarURLConnection.connect(sun\net\www\protocol\jar\JarURLConnection.java:122)
sun.net.www.protocol.jar.JarURLConnection.getInputStream(sun\net\www\protocol\jar\JarURLConnection.java:152)
java.net.URL.openStream(java\net\URL.java:1045)
java.util.ServiceLoader.parse(java\util\ServiceLoader.java:304)
java.util.ServiceLoader.access$200(java\util\ServiceLoader.java:185)
java.util.ServiceLoader$LazyIterator.hasNextService(java\util\ServiceLoader.java:357)
java.util.ServiceLoader$LazyIterator.hasNext(java\util\ServiceLoader.java:393)
java.util.ServiceLoader$1.hasNext(java\util\ServiceLoader.java:474)
org.apache.wicket.Application.initInitializers(org\apache\wicket\Application.java:568)
org.apache.wicket.Application.initApplication(org\apache\wicket\Application.java:782)
org.apache.wicket.protocol.http.WicketFilter.init(org\apache\wicket\protocol\http\WicketFilter.java:444)
org.apache.wicket.protocol.http.WicketFilter.init(org\apache\wicket\protocol\http\WicketFilter.java:368)
org.apache.catalina.core.ApplicationFilterConfig.getFilter(org\apache\catalina\core\ApplicationFilterConfig.java:226)
This indicates that we may have a similar problem or a regression. It should be
somewhat easier now to fix.
was:
How to reproduce:
- Create a 1.5.5 quickstart
- deploy it on the GlassFish server with directory deployment (I use NetBeans
which is easy)
- open the application in the browser
- undeploy the application
- try to execute the maven clean goal or try to delete the target dir
Error in GlassFish log:
Unable to delete file WEB-INF\lib\wicket-core-1.5.5.jar
I first thought that this was a GlassFish issue such as:
http://java.net/jira/browse/GLASSFISH-17339
To eliminate that, I added glassfish\modules\war-util.jar to the project and
wrote code to let GlassFish close all jar files:
In the Application class:
@Override
public void onDestroy() {
super.onDestroy();
ClassLoader parentClassLoader = this.getClass().getClassLoader();
ClassLoader classLoader;
do{
classLoader = parentClassLoader;
if(classLoader instanceof WebappClassLoader){
WebappClassLoader glassFishLoader =
(WebappClassLoader)classLoader;
glassFishLoader.closeJARs(true);
break;
}
parentClassLoader = classLoader.getParent();
}while(parentClassLoader != classLoader && parentClassLoader != null);
}
but this did not fix the problem.
Environment:
Windows 7
java version "1.8.0_201"
was:
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing)
Priority: Critical (was: Major)
Summary: wicket-core-8.9.0.jar not closed when Application is
undeployed from an application server (was: CLONE - wicket-core-1.5.5.jar not
closed when Application is undeployed from directory)
> wicket-core-8.9.0.jar not closed when Application is undeployed from an
> application server
> ------------------------------------------------------------------------------------------
>
> Key: WICKET-6809
> URL: https://issues.apache.org/jira/browse/WICKET-6809
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 8.9.0
> Environment: Windows 7
> java version "1.8.0_201"
> Reporter: Bernard
> Assignee: Martin Tzvetanov Grigorov
> Priority: Critical
> Fix For: 1.5.6, 6.0.0-beta2
>
>
> How to reproduce:
> - Use the attached quickstart
> - deploy it on the GlassFish server with directory deployment (I use
> NetBeans which is easy) but Windows command files are provided
> - open the application in the browser
> - undeploy the application
> - try to execute the maven clean goal or try to delete the target dir
> Maven error: Failed to delete ... WEB-INF\lib\wicket-core-8.9.0.jar
> Please inspect for WICKET-4458 for how to use the ZipFileMonitor tool which
> is included in the attached quickstart. The output of the show command is as
> follows:
> ..Opened by hashCode object 3192 from:
> java.util.jar.JarFile.<init>(java\util\jar\JarFile.java:168)
> java.util.jar.JarFile.<init>(java\util\jar\JarFile.java:103)
>
> sun.net.www.protocol.jar.URLJarFile.<init>(sun\net\www\protocol\jar\URLJarFile.java:93)
>
> sun.net.www.protocol.jar.URLJarFile.getJarFile(sun\net\www\protocol\jar\URLJarFile.java:69)
>
> sun.net.www.protocol.jar.JarFileFactory.get(sun\net\www\protocol\jar\JarFileFactory.java:94)
>
> sun.net.www.protocol.jar.JarURLConnection.connect(sun\net\www\protocol\jar\JarURLConnection.java:122)
>
> sun.net.www.protocol.jar.JarURLConnection.getInputStream(sun\net\www\protocol\jar\JarURLConnection.java:152)
> java.net.URL.openStream(java\net\URL.java:1045)
> java.util.ServiceLoader.parse(java\util\ServiceLoader.java:304)
> java.util.ServiceLoader.access$200(java\util\ServiceLoader.java:185)
>
> java.util.ServiceLoader$LazyIterator.hasNextService(java\util\ServiceLoader.java:357)
>
> java.util.ServiceLoader$LazyIterator.hasNext(java\util\ServiceLoader.java:393)
> java.util.ServiceLoader$1.hasNext(java\util\ServiceLoader.java:474)
>
> org.apache.wicket.Application.initInitializers(org\apache\wicket\Application.java:568)
>
> org.apache.wicket.Application.initApplication(org\apache\wicket\Application.java:782)
>
> org.apache.wicket.protocol.http.WicketFilter.init(org\apache\wicket\protocol\http\WicketFilter.java:444)
>
> org.apache.wicket.protocol.http.WicketFilter.init(org\apache\wicket\protocol\http\WicketFilter.java:368)
>
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(org\apache\catalina\core\ApplicationFilterConfig.java:226)
> This indicates that we may have a similar problem or a regression. It should
> be somewhat easier now to fix.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)