2

我们有一个 spring 应用程序,它基于 lib 文件夹动态加载组件。

这个应用需要部署在不同的AS上,比如Jetty,Tomcat,JBoss..

现在,JBoss 有了这个 VFS 功能,它看起来并没有真正解压缩你的战争,而是vfs://用于战争/jar 中的文件。

目前我们正在升级(从Java6)到Java7,我们遇到了以下问题。

首先,snowdrop 1.0.0GA 在 Java7 下不再工作,因为 InputStream 发生了某种变化。升级到 snowdrop 2.0.4.Final 解决了这个问题。

接下来是堆栈跟踪的这个宝石:


11:37:44,563 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/runtime]] (MSC service thread 1-1) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from "/C:/Tools/jboss-as-7.1.1.Final/bin/content/Aquima-Server-9-SNAPSHOT.war/WEB-INF/classes/aquima-config.xml"; nested exception is java.lang.RuntimeException: java.lang.IllegalArgumentException: Null path
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]

.....................

Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Null path
    at org.jboss.spring.vfs.VFSServletContextResourcePatternResolver.convertClassLoaderURL(VFSServletContextResourcePatternResolver.java:62) [snowdrop-vfs-2.0.4.Final.jar:2.0.4.Final]
    at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findAllClassPathResources(PathMatchingResourcePatternResolver.java:305) [spring-core-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:270) [spring-core-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1245) [spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]

.........................

Caused by: java.lang.IllegalArgumentException: Null path
    at org.jboss.vfs.VFS.getChild(VFS.java:187) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
    at org.jboss.vfs.VFS.getChild(VFS.java:173) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
    at org.jboss.vfs.VFS.getChild(VFS.java:154) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_11]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_11]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_11]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_11]
    at org.jboss.spring.vfs.VFSUtil.invokeMethodWithExpectedExceptionType(VFSUtil.java:157) [snowdrop-vfs-2.0.4.Final.jar:2.0.4.Final]
    at org.jboss.spring.vfs.VFSUtil.invokeVfsMethod(VFSUtil.java:170) [snowdrop-vfs-2.0.4.Final.jar:2.0.4.Final]
    at org.jboss.spring.vfs.VFSServletContextResourcePatternResolver.convertClassLoaderURL(VFSServletContextResourcePatternResolver.java:59) [snowdrop-vfs-2.0.4.Final.jar:2.0.4.Final]
    ... 34 more

有谁知道如何解决这个问题?

4

0 回答 0