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

  • Error while deploying my application on Weblogic (BeanDefinitionStoreException)

    Hello!

    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:

    Code:
    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 java.util.zip.ZipException: No such file or directory
    Caused by: 
    java.util.zip.ZipException: No such file or directory
    	at java.util.zip.ZipFile.open(Native Method)
    	at java.util.zip.ZipFile.<init>(ZipFile.java:111)
    	at java.util.jar.JarFile.<init>(JarFile.java:127)
    	at java.util.jar.JarFile.<init>(JarFile.java:65)
    (...)
    I really don't understand, since it works perfectly under Tomcat!

    I am using three different ApplicationContext-*.xml files:
    applicationContext-hibernate.xml
    applicationContext-resources.xml
    applicationContext-service.xml

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

    Code:
        <!-- Context Configuration locations for Spring XML files -->
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/applicationContext-*.xml,/WEB-INF/security.xml</param-value>
        </context-param>
    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, 09:06 AM.

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

    Code:
        <!-- Context Configuration locations for Spring XML files -->
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/applicationContext-hibernate.xml,/WEB-INF/applicationContext-resources.xml,/WEB-INF/applicationContext-service.xml,/WEB-INF/security.xml</param-value>
        </context-param>
    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!

    Comment

    Working...
    X