Unable to inject the spring Project deployed in resin4, springresin4

Source: Internet
Author: User

Unable to inject the spring Project deployed in resin4, springresin4

A strange thing happened. A spring Project was deployed to resin4 at the customer's site. After it was started, various reports failed to inject beans and bean problems could not be found. There were a lot of errors:

nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ...

Except for the system, other jdk versions, resin versions, and packages have been successfully deployed and tested in the same test environment. therefore, I think it is possible that there is a problem with the previous package. Immediately, the local resin tested the package, which is also a variety of errors. ah ~ Re-package and re-deploy immediately or report an error... Is it resin? There happened to be an old version of resin4.0.13 on the local device. After deployment, we can see that it is normal... it seems that it is indeed a resin problem ..

Based on the idea that the bug should be fixed in the new version, download the latest resin4.0.49 immediately, and the deployment still reports an error. If you run the resin of the test environment locally, it also reports an error ~

Although the problem is resin, what is the problem? Recall that beans cannot be injected, so it must have been an error when scanning and loading various beans during spring Initialization Configuration Files. Since bean cannot be found, it must have not been loaded. check the web configuration file. xml:

    <context-param>        <param-name>contextConfigLocation</param-name>        <param-value>classpath:applicationContext*.xml</param-value>    </context-param>

Suddenly I thought of a possibility that the configuration file was not loaded due to the wildcard format? Immediately change to the form of comma-separated file names, and the error "restart resin" disappears ~ This fault is resolved...

Supplement: during this period, I tried tomcat deployment and there was no problem.

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.