Announcement Announcement Module
No announcement yet.
Error while deploying my application on Weblogic (BeanDefinitionStoreException) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error while deploying my application on Weblogic (BeanDefinitionStoreException)


    I'm developing a Web application based on AppFuse 1.9.4, and therefore on Spring 2.0, Struts and Hibernate.

    I am using Tomcat as a local server for my tests, and my project works fine. It compiles and runs on the Tomcat server without any problem.

    For production purpose, I need to create an EAR file that will be deployed on a Weblogic 8.1 server.

    I'm using an Ant task to generate the EAR file, and it worked fine till then... But now, when I deploy the EAR, I have this error in my Weblogic logs:

    2008-08-07 15:31:47,061 ERROR ContextLoader.initWebApplicationContext(205) | Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [/WEB-INF/applicationContext-*.xml]; nested exception is No such file or directory
    Caused by: No such file or directory
    	at Method)
    	at java.util.jar.JarFile.<init>(
    	at java.util.jar.JarFile.<init>(
    I really don't understand, since it works perfectly under Tomcat!

    I am using three different ApplicationContext-*.xml files:

    I looked for the string "/WEB-INF/applicationContext-*.xml" in my project files, and it only appears in web.xml file:

        <!-- Context Configuration locations for Spring XML files -->
    I haven't changed these lines since the previous version, and (I checked in my CVS) it always worked as is...

    I checked both my project's web.xml and the one included in the EAR file (in case it would have been modified by another Ant task?), and they are equals, obviously...

    Another thing: I included several new libraries, including spring-ldap. They're correctly sent to my Tomcat server, and they're included in the EAR file, but maybe it could be related?

    Does anyone know why such a problem appears? What can I do to avoid it?

    Thanks in advance!
    Last edited by Pierrre; Aug 7th, 2008, 10:06 AM.

  • #2
    OK, I solved this problem by correcting the web.xml line. I replaced it with:

        <!-- Context Configuration locations for Spring XML files -->
    And it worked! That's very strange since one of my colleague deployed a previous version (also including the wildcard "applicationContext-*.xml" property) and it worked fine...

    So if anybody has a clue on why it worked with him and not with me, I'd be thankful!