Results 1 to 4 of 4

Thread: PathMatchingResourcePatternResolver functionality broken in 2.0.6 release on WASv6.1

  1. #1
    Join Date
    Nov 2006
    Location
    Belgium
    Posts
    15

    Default PathMatchingResourcePatternResolver functionality broken in 2.0.6 release on WASv6.1

    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:

    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)
    ...
    In the changelog for 2.0.6 this is mentioned, so I guess something *is* broken:

    * PathMatchingResourcePatternResolver explicitly closes freshly obtained JarFile objects, to allow for hot redeployment
    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?
    Last edited by wpraet; Jul 18th, 2007 at 06:59 AM. Reason: Added extra information

  2. #2
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

    This has fortunately already been discovered and fixed; the fix is available in recent snapshots. The problem was a side effect of some other fix, which unfortunately broke WebSphere compatibility there. This isn't really a WebSphere bug, rather a known WebSphere peculiarity that Spring aims to remain compatible with.

    Please give a recent 2.0.7 or 2.1 M3 snapshot (http://static.springframework.org/do...hp?project=SPR) a try and let us know whether it works for you!

    Juergen

  3. #3
    Join Date
    Nov 2006
    Location
    Belgium
    Posts
    15

    Default fixed in 2.0.7 indeed

    Hi,

    I just checked it with the 2.0.7 snapshot (it took me a while to manually install all .jar files and create the .pom files in my local m2 repository), and the problem is fixed. However, I'll wait for the final 2.0.7 release and work with the 2.0.5 release untill then.

    Thanks for your quick answer (and yes: it seems Websphere has quite some 'peculiarities' to deal with).

  4. #4
    Join Date
    Feb 2009
    Location
    Toulouse - FR
    Posts
    3

    Default Same problem in WAS 6.0.2.33

    Hello,

    we have a similar error in WebSphere 6.0.x (and spring 2.0.6), after installing FixPacks ND 6.0.2.33 & XD 6.0.2.6, application does not restart now ...

    Where I can find documentation about this problem or details to isolate our problem? and the updated Spring classes that fix it?


    best regards,
    Pierre

    2009-05-06 18:40:12,445 ERROR [server.startup : 2] [springframework.web.context.ContextLoader] initWebApplicationContext Context initialization failed
    org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from class path resource [services/eventServiceContext.xml]; nested exception is java.util.zip.ZipException: ZipFile closed.
    Caused by: java.util.zip.ZipException: ZipFile closed.
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipF ile.java:434)
    at java.util.zip.ZipFile$1.fill(ZipFile.java:230)
    at java.util.zip.InflaterInputStream.read(InflaterInp utStream.java:134)
    at java.util.zip.InflaterInputStream.read(InflaterInp utStream.java:105)
    at java.io.FilterInputStream.read(FilterInputStream.j ava:66)
    at org.apache.xerces.impl.XMLEntityManager$Rewindable InputStream.read(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.startEntit y(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.startDocum entEntity(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl.setI nputSource(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(U nknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(U nknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(U nknown Source)
    at org.springframework.beans.factory.xml.DefaultDocum entLoader.loadDocument(DefaultDocumentLoader.java: 76)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:351)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:303)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:280)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:131)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:147)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:124)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:92)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:101)
    at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:389)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:324)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:244)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:187)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
    at com.atlassian.spring.container.ContainerContextLoa derListener.contextInitialized(ContainerContextLoa derListener.java:32)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServle tContextCreated(WebApp.java:1517)
    at com.ibm.ws.webcontainer.webapp.WebApp.initialize(W ebApp.java:475)
    at com.ibm.ws.webcontainer.webapp.WebGroup.addWebAppl ication(WebGroup.java:123)
    at com.ibm.ws.webcontainer.VirtualHost.addWebApplicat ion(VirtualHost.java:149)
    at com.ibm.ws.webcontainer.WebContainer.addWebApp(Web Container.java:940)
    at com.ibm.ws.webcontainer.WebContainer.addWebApplica tion(WebContainer.java:893)
    at com.ibm.ws.runtime.component.WebContainerImpl.inst all(WebContainerImpl.java:167)
    at com.ibm.ws.runtime.component.WebContainerImpl.star t(WebContainerImpl.java:391)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.st art(ApplicationMgrImpl.java:1265)
    at com.ibm.ws.runtime.component.DeployedApplicationIm pl.fireDeployedObjectStart(DeployedApplicationImpl .java:1076)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.st art(DeployedModuleImpl.java:547)
    at com.ibm.ws.runtime.component.DeployedApplicationIm pl.start(DeployedApplicationImpl.java:754)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.st artApplication(ApplicationMgrImpl.java:922)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$Ap pInitializer.run(ApplicationMgrImpl.java:2112)
    at com.ibm.ws.runtime.component.ComponentImpl$_Asynch Initializer.run(ComponentImpl.java:304)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1503)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •