我試圖在wildfly 8.x服務器上部署ear
應用程序。Wildfly 8.x ClassNotFoundException:org.jboss.virtual.VFS
問題是,當我要開始我的服務器,日誌控制檯打印了我以下錯誤:
14:00:09,825 ERROR [org.springframework.core.io.VfsUtils] (MSC service thread 1-7) JBoss VFS packages (for both JBoss AS 5 and 6) were not found - JBoss VFS support disabled
14:00:09,835 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-7) Context initialization failed: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/beans/gardian_beans.xml]; nested exception is java.lang.ExceptionInInitializerError
at
Caused by: java.lang.ExceptionInInitializerError
at org.springframework.core.io.support.PathMatchingResourcePatternResolver$VfsResourceMatchingDelegate.findMatchingResources(PathMatchingResourcePatternResolver.java:652) [spring-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
... 24 more
Caused by: java.lang.IllegalStateException: Cannot detect JBoss VFS packages
at org.springframework.core.io.VfsUtils.<clinit>(VfsUtils.java:109) [spring-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
... 39 more
Caused by: java.lang.ClassNotFoundException: org.jboss.virtual.VFS from [Module "org.springframework.spring:main" from local module loader @67117f44 (finder: local module finder @5d3411d (roots: /abb/assetsuite/wildfly-8.2.1.Final.as/modules,/abb/assetsuite/wildfly-8.2.1.Final.as/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
at org.springframework.core.io.VfsUtils.<clinit>(VfsUtils.java:99) [spring-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
... 39 more
我的JBoss不承認org.jboss.virtual.VFS
類。
這是我module.xml
我模塊org.springframework.spring.main
:
<module xmlns="urn:jboss:module:1.0" name="org.springframework.spring">
<resources>
<resource-root path="aopalliance-1.0.0.jar"/>
<!--<resource-root path="groovy-all-2.3.4.jar"/>-->
<resource-root path="spring-aop-3.2.9.RELEASE.jar"/>
<resource-root path="spring-beans-3.2.9.RELEASE.jar"/>
<resource-root path="spring-context-3.2.9.RELEASE.jar"/>
<resource-root path="spring-core-3.2.9.RELEASE.jar"/>
<resource-root path="spring-expression-3.2.9.RELEASE.jar"/>
<resource-root path="spring-jdbc-3.2.9.RELEASE.jar"/>
<resource-root path="spring-jms-3.2.9.RELEASE.jar"/>
<resource-root path="spring-tx-3.2.9.RELEASE.jar"/>
<resource-root path="spring-web-3.2.9.RELEASE.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.servlet.api"/>
<module name="javax.jms.api"/>
<module name="javax.annotation.api"/>
<module name="org.apache.commons.logging"/>
</dependencies>
</module>
當然,我在同一個文件夾中引用的所有jar我module.xml
..
看起來你需要依賴於org.jboss.vfs。 –
我將您的解決方案移至社區wiki答案。 –