[seam-issues] [JBoss JIRA] (SEAMFACES-191) PrettyFaces cannot find ApplicationFactory
Jason Porter (Commented) (JIRA)
jira-events at lists.jboss.org
Tue Jan 3 04:30:10 EST 2012
[ https://issues.jboss.org/browse/SEAMFACES-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653444#comment-12653444 ]
Jason Porter commented on SEAMFACES-191:
----------------------------------------
Still a problem?
> PrettyFaces cannot find ApplicationFactory
> ------------------------------------------
>
> Key: SEAMFACES-191
> URL: https://issues.jboss.org/browse/SEAMFACES-191
> Project: Seam Faces
> Issue Type: Bug
> Components: URL Rewriting
> Affects Versions: 3.0.2
> Environment: Windows 7, JBoss AS Head, prettyfaces-jsf2 3.3.0
> Reporter: xylocore
>
> After deploying a webapp, the first access to a page throws the following exception:
> java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
> javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)
> javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
> com.ocpsoft.pretty.faces.util.FacesFactory.getApplication(FacesFactory.java:30)
> com.ocpsoft.pretty.faces.config.PrettyConfigListener.requestInitialized(PrettyConfigListener.java:47)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
> java.lang.Thread.run(Thread.java:662)
> This exception is not consistent. If I restart the server, the exception may or may not occur again. I created a stripped down webapp and tested with that. The problem occurs there too.
> pom.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <modelVersion>4.0.0</modelVersion>
> <groupId>a1</groupId>
> <artifactId>a1</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> <packaging>war</packaging>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <maven.test.failure.ignore>true</maven.test.failure.ignore>
> <seam.faces.version>3.0.2.Final</seam.faces.version>
> <seam.catch.version>3.0.0.Final</seam.catch.version>
> </properties>
> <dependencies>
> <dependency>
> <groupId>org.jboss.spec</groupId>
> <artifactId>jboss-javaee-6.0</artifactId>
> <version>1.0.0.Final</version>
> <type>pom</type>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.seam.persistence</groupId>
> <artifactId>seam-persistence</artifactId>
> <version>3.0.0.Final</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.seam.faces</groupId>
> <artifactId>seam-faces-api</artifactId>
> <version>${seam.faces.version}</version>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.seam.faces</groupId>
> <artifactId>seam-faces-impl</artifactId>
> <version>${seam.faces.version}</version>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.seam.catch</groupId>
> <artifactId>seam-catch-api</artifactId>
> <version>${seam.catch.version}</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.seam.catch</groupId>
> <artifactId>seam-catch-impl</artifactId>
> <version>${seam.catch.version}</version>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>joda-time</groupId>
> <artifactId>joda-time</artifactId>
> <version>1.6.2</version>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>com.ocpsoft</groupId>
> <artifactId>prettyfaces-jsf2</artifactId>
> <version>3.3.0</version>
> <scope>runtime</scope>
> </dependency>
> </dependencies>
> <repositories>
> <repository>
> <id>JBOSS_NEXUS</id>
> <url>http://repository.jboss.org/nexus/content/groups/public</url>
> </repository>
> </repositories>
> <build>
> <finalName>a1</finalName>
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.3.2</version>
> <configuration>
> <source>1.6</source>
> <target>1.6</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> ViewPersonalityBean.java:
> package com.xylocore.ebco.web.model;
> import java.io.Serializable;
> import java.util.UUID;
> import javax.enterprise.context.RequestScoped;
> import javax.inject.Inject;
> import javax.inject.Named;
> @Named( "viewPersonality" )
> @RequestScoped
> public class ViewPersonalityBean
> implements
> Serializable
> {
> private static final long serialVersionUID = 2493114173508560424L;
> private String personalityUuid;
> public String getPersonalityUuid() {
> return personalityUuid;
> }
> public void setPersonalityUuid( String aPersonalityUuid ) {
> personalityUuid = aPersonalityUuid;
> }
>
> public String getFullName() {
> return "Bob Johnson";
> }
> public void loadPersonality() {
> }
> }
> viewPersonality:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns ="http://www.w3.org/1999/xhtml"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:s="http://jboss.org/seam/faces">
> <f:view>
> <f:metadata>
> <f:viewParam name="id" value="#{viewPersonality.personalityUuid}"/>
> <s:viewAction action="#{viewPersonality.loadPersonality}"/>
> </f:metadata>
> <h:head>
> <title>Welcome</title>
> </h:head>
> <h:body>
> <h:form>
> <h3>#{viewPersonality.fullName}!</h3>
> </h:form>
> </h:body>
> </f:view>
> </html>
> beans.xml:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <beans 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/beans_1_0.xsd">
> <interceptors>
> <class>org.jboss.seam.transaction.TransactionInterceptor</class>
> </interceptors>
> </beans>
> 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">
> </faces-config>
> web.xml:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <web-app xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> version="3.0"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
> <display-name>a1</display-name>
> <session-config>
> <session-timeout>30</session-timeout>
> </session-config>
> <welcome-file-list>
> <welcome-file>/index.html</welcome-file>
> </welcome-file-list>
> <context-param>
> <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
> <param-value>false</param-value>
> </context-param>
> </web-app>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list