5 Replies Latest reply on Nov 29, 2012 2:30 AM by Felix Siegrist

    empty war directory in standalone/tmp/vfs/ when deploying ear file with JBoss 7.1.1

    Felix Siegrist Newbie

      Hi

       

      I try to deploy an ear-file containing a war-file on JBoss 7.1.1.

       

      The application.xml within the ear's META-INF/ directory looks like this:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <application

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xmlns="http://java.sun.com/xml/ns/javaee"

              xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd"

              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"

              version="6">

       

               <module>

                      <web>

                              <web-uri>bof-war.war</web-uri>

                              <context-root>/bof-war</context-root>

                      </web>

              </module>

       

      </application>

       

       

      The deployment fails with the following exception:

       

      14:06:21,265 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "bof-ear.ear"

      14:06:21,313 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "bof-war.war"

      14:06:22,835 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'

      14:06:22,835 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'

      14:06:22,836 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'

      14:06:23,027 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)

      14:06:23,037 INFO  [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.

      14:06:23,039 INFO  [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.

      14:06:23,041 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/bof-war]] (MSC service thread 1-1) No Spring WebApplicationInitializer types detected on classpath

      14:06:23,057 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/bof-war]] (MSC service thread 1-1) Initializing Spring root WebApplicationContext

      14:06:23,057 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Root WebApplicationContext: initialization started

      14:06:23,104 INFO  [ch.homegate.base.jsf2.spring.PrimaryResolverXmlWebApplicationContext] (MSC service thread 1-1) Refreshing Root WebApplicationContext: startup date [Tue Nov 27 14:06:23 CET 2012]; root of context hierarchy

      14:06:23,123 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-1) Loading XML bean definitions from ServletContext resource [/WEB-INF/spring.context.cfg.xml]

      14:06:23,124 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Context initialization failed: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/spring.context.cfg.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/spring.context.cfg.xml]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) [spring-beans-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) [spring-beans-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) [spring-beans-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) [spring-beans-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

              at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

              at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131) [spring-context-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:530) [spring-context-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:444) [spring-context-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

              at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

              at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

              at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]

      Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/spring.context.cfg.xml]

              at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:140) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328) [spring-beans-3.1.3.RELEASE.jar:3.1.3.RELEASE]

              ... 20 more

       

       

      During the deployment process, JBoss creates an exploded version of the ear and war file:

      $JBOSS_HOME/standalone/tmp/vfs/tempe4d6b1edc6852af5/bof-ear.ear-870d0776055a3379/contents/bof-war.war/

       

      This war-directory is empty. That's the reason, why the file /WEB-INF/spring.context.cfg.xml cannot be found.

       

      Any suggestions what might be wrong or missing in my ear-file?

      Thanks a lot in advance!

       

      Regards,

      Felix