Hi,
it seems like that there is something broken in the org.springframework.core.io.support.PathMatchingRe sourcePatternResolver class when loading applicationContext-*.xml files using wildcards from .jar files (I use this pattern to load all files: classpath*:spring/applicationContext-*.xml).
I have a .ear file which contains a .war file which contains a .jar file in /WEB-INF/lib which contains all my applicationContext-*.xml files. Everything works fine on Websphere v6.1 when I'm using SpringFramework 2.0.5. However, upgrading to 2.0.6 leaves me with following error in the SystemOut.log:
In the changelog for 2.0.6 this is mentioned, so I guess something *is* broken:Code:[18/07/07 10:58:45:488 CEST] 0000001d WebApp E Exception caught while initializing context org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [classpath*:spring/applicationContext-*.xml]; nested exception is java.util.zip.ZipException: Bad file descriptor file:\C:\Program Files\IBM\WebSphere61\AppServer\profiles\AppSrv01\installedApps\BEDD0033Node02Cell\MyApp.ear\MyAppOnline-2.1.war\WEB-INF\lib\MyAppCore-2.1.jar Caused by: java.util.zip.ZipException: Bad file descriptor file:\C:\Program Files\IBM\WebSphere61\AppServer\profiles\AppSrv01\installedApps\BEDD0033Node02Cell\EscherOnline.ear\MyAppOnline-2.1.war\WEB-INF\lib\MyAppCore-2.1.jar at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:238) at java.util.jar.JarFile.<init>(JarFile.java:165) at java.util.jar.JarFile.<init>(JarFile.java:103) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingJarResources(PathMatchingResourcePatternResolver.java:409) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:320) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:244) at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:867) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:146) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:637) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:295) at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:285) ...
I've tested my application also in Tomcat5.5 (without the .ear packaging ofcourse) and there everything still works fine when using SpringFramework 2.0.6. So I guess it's (another) Websphere v6.1 bug?* PathMatchingResourcePatternResolver explicitly closes freshly obtained JarFile objects, to allow for hot redeployment


Reply With Quote
