Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/373.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java ClassNotFoundException:org.jboss.vfs.vfs当使用Spring 4.0.2作为jboss 7模块时_Java_Spring_Spring Mvc_Jboss - Fatal编程技术网

Java ClassNotFoundException:org.jboss.vfs.vfs当使用Spring 4.0.2作为jboss 7模块时

Java ClassNotFoundException:org.jboss.vfs.vfs当使用Spring 4.0.2作为jboss 7模块时,java,spring,spring-mvc,jboss,Java,Spring,Spring Mvc,Jboss,我试图让Spring4.0.2作为JBoss7模块运行。部署war文件时,会发生以下错误 Caused by: java.lang.IllegalStateException: Could not detect JBoss VFS infrastructure at org.springframework.core.io.VfsUtils.<clinit>(VfsUtils.java:92) [spring-core-4.0.2.RELEASE.jar:4.0.2.RELEA

我试图让Spring4.0.2作为JBoss7模块运行。部署war文件时,会发生以下错误

Caused by: java.lang.IllegalStateException: Could not detect JBoss VFS infrastructure
    at org.springframework.core.io.VfsUtils.<clinit>(VfsUtils.java:92) [spring-core-4.0.2.RELEASE.jar:4.0.2.RELEASE]
    ... 45 more
Caused by: java.lang.ClassNotFoundException: org.jboss.vfs.VFS from [Module "********:main" from local module loader @5ab785fe (finder: local module finder @46be1539 (roots: C:\jboss-as-7.2.0.Final\modules,C:\jboss-as-7.2.0.Final\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.2.0.CR1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1]
    at org.springframework.core.io.VfsUtils.<clinit>(VfsUtils.java:69) [spring-core-4.0.2.RELEASE.jar:4.0.2.RELEASE]
    ... 45 more
在module.xml文件中,我使用以下JAR

<resource-root path="spring-core-4.0.2.RELEASE.jar"/>
<resource-root path="spring-beans-4.0.2.RELEASE.jar"/>
<resource-root path="spring-context-4.0.2.RELEASE.jar"/>
<resource-root path="spring-web-4.0.2.RELEASE.jar"/>
<resource-root path="spring-webmvc-4.0.2.RELEASE.jar"/>

这个错误是因为我的设置还是JBoss/Spring的错误?如果我把Spring库放在WEB-INF/lib中,一切都会正常运行


谢谢。

像JBoss 5.1 EAP一样,JBoss 7似乎正在使用VFS2。org.jboss.vfs.vfs类属于VFS3。 SpringFramework 4.x不再支持任何VFS2。 您将在我的GitHub projet上找到用于Spring Framework 4.0的VFS2的后端口 希望这能帮助你,
在升级到Spring 4.0.2之后,我也注意到了这一点。谢谢@Antoine,这是一个严重的错误。你帮我省了几个小时的工作。
http\://www.springframework.org/schema/c=org.springframework.beans.factory.xml.SimpleConstructorNamespaceHandler
http\://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler
http\://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler
http\://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler
http\://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler
http\://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler
http\://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler
http\://www.springframework.org/schema/cache=org.springframework.cache.config.CacheNamespaceHandler
<resource-root path="spring-core-4.0.2.RELEASE.jar"/>
<resource-root path="spring-beans-4.0.2.RELEASE.jar"/>
<resource-root path="spring-context-4.0.2.RELEASE.jar"/>
<resource-root path="spring-web-4.0.2.RELEASE.jar"/>
<resource-root path="spring-webmvc-4.0.2.RELEASE.jar"/>