Jboss as 7 cannot initialize a spring bean when deploying a Web application (this problem does not occur under Tomcat)
The reason is that the Web application does not have a jar package that imports JBoss support for spring
Workaround:
Download Snowdrop-vfs.jar(the file is in the Jboss-spring-subsystem-as7-nodeps-2.0.0.final.zip package module-deployer\org\jboss\ Under the Snowdrop\main,
Jboss-spring-subsystem-as7-nodeps-2.0.0.final.zip's:
Http://downloads.jboss.org/snowdrop/2.0.1.Final/jboss-spring-subsystem-as7-nodeps-2.0.1.Final.zip)
After importing the package, add it in Web. xml
< Context-param > < Param-name >contextclass</param-name> <Param-value > org.jboss.spring.vfs.context.VFSXmlWebApplicationContext </ param-value> </context-param>
Then restart JBoss should be able to initialize the spring bean.
Jboss as 7 cannot initialize a spring bean solution when deploying a Web application