myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject java.lang.IllegalStateException: No Factories configured for this Application
Date Thu, 13 Sep 2007 20:30:38 GMT
Hi,

I get a java.lang.IllegalStateException: No Factories configured for this Application when
adding a dependency to my webapp.  Someone mentioned on the users list that deleting the tomcat
work directory might solve it, but this is different.  It seems like it's a class loading
issue.

I'm running with tomcat 6.0.14 and jdk 1.6

To isolate what's happening I first created a maven project from scratch (component.test)
and added it as a dependency to the webapp.  The webapp runs fine with this dependency.  Then
I added a jsf component and renderer to the component.test project, updated this projects
dependencies, and ran 
mvn clean install on component.test.  

Then I did a 
mvn clean package 
on the corresponding webapp and redeployed it.  Now I get this in the log:

INFO: Deploying web application archive test0.war
Sep 13, 2007 2:55:54 PM org.apache.myfaces.webapp.DefaultFacesInitializer initFaces
SEVERE: Error initializing MyFaces: null
java.lang.NullPointerException
        at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
        at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
        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:525)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

The pom for the component.test project looks like this:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>test</groupId>
  <artifactId>component.test</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>component.test</name>
  <url>http://maven.apache.org</url>
  <dependencies>
        <dependency>
            <groupId>org.apache.myfaces.core</groupId>
            <artifactId>myfaces-api</artifactId>
            <version>1.2.0</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.myfaces.core</groupId>
            <artifactId>myfaces-impl</artifactId>
            <version>1.2.0</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.4</version>
            <scope>test</scope>
        </dependency>
  </dependencies>
</project>

Any thoughts on why this is happening?

Thanks,
- Ole




Mime
View raw message