JBoss AS 7 upgrade to Java 7, JBoss VFS

家住魔仙堡 提交于 2019-12-10 23:50:03

问题


We have an spring application which dynamically loads components based in the lib folder.

This application needs to be deployed on different AS, like Jetty,Tomcat,JBoss..

Now, JBoss has this VFS feature, where it does not really unpack your war it seems, and uses vfs:// for files inside the war/jar..

Currently we are in the process of upgrading (from Java6) to Java7, and we encounter the following problem.

First of all, snowdrop 1.0.0GA no longer works under Java7, because the InputStream was changed somehow.. Upgrading to snowdrop 2.0.4.Final resolved this issue.

Next up is this gem of a stacktrace:


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

Does anyone know how to resolve this?

来源:https://stackoverflow.com/questions/14520218/jboss-as-7-upgrade-to-java-7-jboss-vfs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!