Jboss as 7 cannot initialize a spring bean solution when deploying a Web application

Source: Internet
Author: User
Tags jboss

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.