1 Reply Latest reply on Jun 16, 2010 10:01 AM by ilya_shaikovsky

    no web.xml present error on startup

    andyn

      Hi all,

       

      if I start my Tomcat, i get the following exception:

       

      16.06.2010 14:21:08 org.apache.catalina.core.AprLifecycleListener init
      INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Programme\dev-tools\java\jdk1.6.0_13\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Programme\dev-tools\java\jdk1.6.0_13\jre\bin;C:\Python26\Scripts;C:\Python26\;C:\oracle\product\11.1.0\db_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\QuickTime\QTSystem\;C:\Programme\Oracle\jre\1.1.7\bin;C:\Programme\VMware\VMware Player;C:\Programme\Windows Resource Kits\Tools;C:\Programme\Windows Imaging\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\ant\bin;%APPDATA%\Python\Scripts
      16.06.2010 14:21:08 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
      INFO: Using a shared selector for servlet write/read
      16.06.2010 14:21:08 org.apache.coyote.http11.Http11NioProtocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      16.06.2010 14:21:09 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
      INFO: Using a shared selector for servlet write/read
      16.06.2010 14:21:09 org.apache.coyote.http11.Http11NioProtocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8443
      16.06.2010 14:21:09 org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 3276 ms
      16.06.2010 14:21:09 org.apache.catalina.core.StandardService start
      INFO: Starting service Catalina
      16.06.2010 14:21:09 org.apache.catalina.core.StandardEngine start
      INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
      16.06.2010 14:21:09 org.apache.catalina.startup.HostConfig deployDescriptor
      INFO: Deploying configuration descriptor host-manager.xml
      16.06.2010 14:21:11 org.apache.catalina.startup.HostConfig deployDescriptor
      INFO: Deploying configuration descriptor manager.xml
      16.06.2010 14:21:12 org.apache.catalina.startup.HostConfig deployDescriptor
      INFO: Deploying configuration descriptor testapp.xml
      16.06.2010 14:21:13 com.sun.faces.config.ConfigureListener contextInitialized
      INFO: Mojarra 2.0.2 (FCS b10) für Kontext '/testapp' wird initialisiert.
      - Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      - Creating LRUMap cache instance using parameters: {org.richfaces.CONTROL_SKINNING=enable, org.richfaces.SKIN=blueSky, javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
      - Creating LRUMap cache instance of default capacity
      - Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      - Creating LRUMap cache instance using parameters: {org.richfaces.CONTROL_SKINNING=enable, org.richfaces.SKIN=blueSky, javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
      - Creating LRUMap cache instance of default capacity
      16.06.2010 14:21:19 org.apache.catalina.core.ApplicationContext log
      INFO: Initializing Spring FrameworkServlet 'Spring MVC Dispatcher Servlet'
      - FrameworkServlet 'Spring MVC Dispatcher Servlet': initialization started
      - Refreshing WebApplicationContext for namespace 'Spring MVC Dispatcher Servlet-servlet': startup date [Wed Jun 16 14:21:19 CEST 2010]; root of context hierarchy
      - Loading XML bean definitions from ServletContext resource [/WEB-INF/config/web-application-config.xml]
      - Loading XML bean definitions from ServletContext resource [/WEB-INF/config/webflow-config.xml]
      - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3a4422: defining beans [flowExecutor,flowRegistry,org.springframework.faces.model.converter.FacesConversionService#0,org.springframework.webflow.expression.spel.WebFlowSpringELExpressionParser#0,org.springframework.faces.webflow.JsfViewFactoryCreator#0,facesFlowBuilderServices]; root of factory hierarchy
      - FrameworkServlet 'Spring MVC Dispatcher Servlet': initialization completed in 2359 ms
      16.06.2010 14:21:25 org.apache.catalina.startup.HostConfig deployDescriptor
      INFO: Deploying configuration descriptor probe.xml
      16.06.2010 14:21:26 org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory .svn
      16.06.2010 14:21:27 org.apache.catalina.core.StandardContext listenerStart
      SCHWERWIEGEND: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      com.sun.faces.config.ConfigurationException: no web.xml present
          at com.sun.faces.config.ConfigureListener$WebXmlProcessor.scanForFacesServlet(ConfigureListener.java:784)
          at com.sun.faces.config.ConfigureListener$WebXmlProcessor.<init>(ConfigureListener.java:744)
          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:176)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
          at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
          at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
          at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
          at org.apache.catalina.core.StandardService.start(StandardService.java:516)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      16.06.2010 14:21:27 org.apache.catalina.core.StandardContext start
      SCHWERWIEGEND: Error listenerStart
      16.06.2010 14:21:27 org.apache.catalina.core.StandardContext start
      SCHWERWIEGEND: Context [/.svn] startup failed due to previous errors

       

       

      Is this a bug of RichFaces? Do you know the cause of this error?

       

      To your info, I've configure the following files:

      pom.xml:

      ...

          <!-- ====== RichFaces Libraries and Dependencies on RichFaces ========== -->
              <dependency>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
                  <version>4.8.1</version>
                  <scope>test</scope>
              </dependency>
              <dependency>
                  <groupId>javax.servlet</groupId>
                  <artifactId>servlet-api</artifactId>
                  <version>2.5</version>
                  <scope>provided</scope>
              </dependency>
              <dependency>
                  <groupId>javax.servlet</groupId>
                  <artifactId>jsp-api</artifactId>
                  <version>2.0</version>
                  <scope>provided</scope>
              </dependency>
              <dependency>
                  <groupId>jstl</groupId>
                  <artifactId>jstl</artifactId>
                  <version>1.2</version>
              </dependency>
              <dependency>
                  <groupId>javax.servlet.jsp</groupId>
                  <artifactId>jsp-api</artifactId>
                  <version>2.1</version>
                  <scope>provided</scope>
              </dependency>
              <dependency>
                  <groupId>javax.faces</groupId>
                  <artifactId>jsf-api</artifactId>
                  <version>2.0.2-FCS</version>
              </dependency>
              <dependency>
                  <groupId>javax.faces</groupId>
                  <artifactId>jsf-impl</artifactId>
                  <version>2.0.2-FCS</version>
              </dependency>
              <dependency>
                  <groupId>javax.el</groupId>
                  <artifactId>el-api</artifactId>
                  <version>1.0</version>
                  <scope>provided</scope>
              </dependency>
              <dependency>
                  <groupId>el-impl</groupId>
                  <artifactId>el-impl</artifactId>
                  <version>1.0</version>
                  <scope>provided</scope>
              </dependency>
              <dependency>
                  <groupId>javax.annotation</groupId>
                  <artifactId>jsr250-api</artifactId>
                  <version>1.0</version>
              </dependency>
              <!-- JBoss RichFaces libraries -->
              <dependency>
                  <groupId>org.richfaces.framework</groupId>
                  <artifactId>richfaces-api</artifactId>
                  <version>3.3.3.Final</version>
              </dependency>
              <dependency>
                  <groupId>org.richfaces.framework</groupId>
                  <artifactId>richfaces-impl-jsf2</artifactId>
                  <version>3.3.3.Final</version>
              </dependency>
              <dependency>
                  <groupId>org.richfaces.ui</groupId>
                  <artifactId>richfaces-ui</artifactId>
                  <version>3.3.3.Final</version>
              </dependency>
             
             
              <!-- ====== Spring Web Flow Libraries and Dependencies on Spring Web Flow ========== -->
              <dependency>
                  <groupId>org.springframework.webflow</groupId>
                  <artifactId>spring-binding</artifactId>
                  <version>2.1.0.RC1</version>
              </dependency>
              <dependency>
                  <groupId>org.springframework.webflow</groupId>
                  <artifactId>spring-js</artifactId>
                  <version>2.1.0.RC1</version>
              </dependency>
              <dependency>
                  <groupId>org.springframework.webflow</groupId>
                  <artifactId>spring-webflow</artifactId>
                  <version>2.1.0.RC1</version>
              </dependency>
              <dependency>
                  <groupId>org.springframework.webflow</groupId>
                  <artifactId>spring-faces</artifactId>
                  <version>2.1.0.RC1</version>
              </dependency>
             
              <!-- ====== Spring Libraries and Dependencies on Spring ========== -->
              <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-context</artifactId>
                  <version>3.0.2.RELEASE</version>
                  <scope>runtime</scope>
              </dependency>
          </dependencies>
         
          <repositories>
              <!-- ====== Repositories of Spring and Spring Web Flow ========== -->
              <repository>
                  <id>com.springsource.repository.bundles.release</id>
                  <name>SpringSource Enterprise Bundle Repository - SpringSource Releases</name>
                  <url>http://repository.springsource.com/maven/bundles/release</url>
              </repository>
              <repository>
                  <id>com.springsource.repository.bundles.external</id>
                  <name>SpringSource Enterprise Bundle Repository - External Releases</name>
                  <url>http://repository.springsource.com/maven/bundles/external</url>
              </repository>
              <!-- Repository for Milestones of Spring and Spring Web Flow especially for Milestones of Spring Web Flow -->
              <repository>
                  <id>spring-milestone</id>
                  <name>Spring Maven Milestone Repository</name>
                  <url>http://s3.amazonaws.com/maven.springframework.org/milestone</url>
              </repository>
          </repositories>

          <profiles>
              <!-- ====== Profile for RichFaces Libraries and Dependencies on RichFaces ========== -->
              <profile>
                  <id>jsf-app-profile</id>
                  <repositories>
                      <repository>
                          <releases>
                              <enabled>true</enabled>
                          </releases>
                          <snapshots>
                              <enabled>true</enabled>
                              <updatePolicy>always</updatePolicy>
                          </snapshots>
                          <id>snapshots.jboss.org</id>
                          <name>Snapshot Jboss Repository for Maven</name>
                          <url>http://snapshots.jboss.org/maven2/</url>
                          <layout>default</layout>
                      </repository>
                      <repository>
                          <releases>
                              <enabled>true</enabled>
                          </releases>
                          <snapshots>
                              <enabled>true</enabled>
                              <updatePolicy>always</updatePolicy>
                          </snapshots>
                          <id>repository.jboss.com</id>
                          <name>Jboss Repository for Maven</name>
                          <url>http://repository.jboss.com/maven2/</url>
                          <layout>default</layout>
                      </repository>
                  </repositories>
              </profile>
          </profiles>

      ...

       

       

      web.xml in WEB-INF:

      ...

        <!-- Initializing JavaServer Faces, *NOT* used at runtime due to Spring Web Flow -->
        <!-- FacesServlet -->
        <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <!-- The servlet is loaded on startup to be reachable for requests. -->
          <load-on-startup>1</load-on-startup>
        </servlet>
       
        <!-- Mapping for FacesServlet -->
        <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
       
       
        <!-- Initializing JBoss RichFaces -->
        <!-- Plugging the "Blue Sky" skin into the project -->
        <context-param>
          <param-name>org.richfaces.SKIN</param-name>
          <param-value>blueSky</param-value>
        </context-param>

       

        <!-- Making the RichFaces skin spread to standard HTML controls -->
        <context-param>
          <param-name>org.richfaces.CONTROL_SKINNING</param-name>
          <param-value>enable</param-value>
        </context-param>

       

        <!-- Defining and mapping the RichFaces filter -->
        <filter>
          <filter-name>RichFaces Filter</filter-name>
          <filter-class>org.ajax4jsf.Filter</filter-class>
        </filter>

       

        <filter-mapping>
          <filter-name>RichFaces Filter</filter-name>
          <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
          <dispatcher>REQUEST</dispatcher>
          <dispatcher>FORWARD</dispatcher>
          <dispatcher>INCLUDE</dispatcher>
          <dispatcher>ERROR</dispatcher>
        </filter-mapping>
       
        <!-- Turn off the VDL viewhandler because of the limited JSF 2.0 support of RichFaces -->
        <context-param>
          <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
          <param-value>true</param-value>
        </context-param>
       
       
        <!-- Initializing Spring Web Flow -->
        <!-- The front controller of this Spring Web application, responsible for handling all application requests -->
        <servlet>
          <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
          <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
          <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/config/web-application-config.xml</param-value>
          </init-param>
          <load-on-startup>1</load-on-startup>
        </servlet>
       
        <!-- Map all /spring requests to the Dispatcher Servlet for handling -->
        <servlet-mapping>
          <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
          <url-pattern>/spring/*</url-pattern>
        </servlet-mapping>
       
        <!-- Serves static resource content from .jar files such as spring-faces.jar -->
        <servlet>
          <servlet-name>Resources Servlet</servlet-name>
          <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
          <load-on-startup>0</load-on-startup>
        </servlet>
       
        <!-- Map all /resources requests to the Resource Servlet for handling -->
        <servlet-mapping>
          <servlet-name>Resources Servlet</servlet-name>
          <url-pattern>/resources/*</url-pattern>
        </servlet-mapping>
       
        <!-- Use JSF view templates saved as *.xhtml, for use with Facelets -->
        <context-param>
          <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
          <param-value>.xhtml</param-value>
        </context-param>

      ...

       

       

      faces-config.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
                    version="2.0">
       
        <application>
        </application>
      </faces-config>

       

       

      web-application-config.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:context="http://www.springframework.org/schema/context"
             xsi:schemaLocation="http://www.springframework.org/schema/beans
                                 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                                 http://www.springframework.org/schema/context
                                 http://www.springframework.org/schema/context/spring-context-2.5.xsd">
       
        <!-- Imports the configurations of the different infrastructure systems of the application -->
        <import resource="webflow-config.xml" />
      </beans>

       

       

      webflow-config.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:webflow="http://www.springframework.org/schema/webflow-config"
             xmlns:faces="http://www.springframework.org/schema/faces"
             xsi:schemaLocation="http://www.springframework.org/schema/beans
                                 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                                 http://www.springframework.org/schema/webflow-config
                                 http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
                                 http://www.springframework.org/schema/faces
                                 http://www.springframework.org/schema/faces/spring-faces-2.0.xsd">
       
        <!-- Executes flows: the central entry point into the Spring Web Flow system -->
        <webflow:flow-executor id="flowExecutor" />
       
        <!-- The registry of executable flow definitions -->
        <webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/flows">
          <webflow:flow-location-pattern value="**/*-flow.xml" />
        </webflow:flow-registry>
       
        <!-- Configures the Spring Web Flow JSF integration -->
        <faces:flow-builder-services id="facesFlowBuilderServices" />
      </beans>

       

       

      Thx!

        • 1. Re: no web.xml present error on startup
          ilya_shaikovsky

          INFO: Deploying web application directory .svn

          ....

          16.06.2010 14:21:27 org.apache.catalina.core.StandardContext start
          SCHWERWIEGEND: Error listenerStart
          16.06.2010 14:21:27 org.apache.catalina.core.StandardContext start
          SCHWERWIEGEND: Context [/.svn] startup failed due to previous errors

           

           

          adjust your build in order not to package .svn folders.