Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004387 [Resin] crash always 02-11-11 04:16 02-11-11 12:55
Reporter matzew View Status public  
Assigned To ferg
Priority normal Resolution no change required  
Status closed   Product Version 4.0.15
Summary 0004387: Unable to install simple JSF2 application, that uses JPA + CDI extensions (Apache MyFaces CoDI)
Description Trying to deploy the attached WAR file fails always.

It is a simple JSF2 application that uses CDI, JPA and CDI extensions (from the Apache MyFaces CoDI project)


[11-02-11 13:10:11.014] {http://*:8080-1} [^] QuercusServlet starting as ResinQuercusServlet
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:800)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:302)
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:162)
    at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:1346)
    at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:1194)
    at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:232)
    at com.caucho.server.webapp.WebApp.start(WebApp.java:3143)
    at com.caucho.env.deploy.DeployController.startImpl(DeployController.java:630)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.request(StartAutoRedeployAutoStrategy.java:129)
    at com.caucho.env.deploy.DeployController.request(DeployController.java:545)
    at com.caucho.server.webapp.WebAppVersioningController.startImpl(WebAppVersioningController.java:145)
    at com.caucho.server.webapp.WebAppVersioningController.startImpl(WebAppVersioningController.java:45)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:77)
    at com.caucho.env.deploy.DeployController.startOnInit(DeployController.java:493)
    at com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:171)
    at com.caucho.server.webapp.WebAppContainer.start(WebAppContainer.java:713)
    at com.caucho.server.host.Host.start(Host.java:675)
    at com.caucho.env.deploy.DeployController.startImpl(DeployController.java:630)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:77)
    at com.caucho.env.deploy.DeployController.startOnInit(DeployController.java:493)
    at com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:171)
    at com.caucho.server.host.HostContainer.start(HostContainer.java:542)
    at com.caucho.server.cluster.Server.start(Server.java:1211)
    at com.caucho.server.cluster.ServletService.start(ServletService.java:72)
    at com.caucho.env.service.ResinSystem.startServices(ResinSystem.java:508)
    at com.caucho.env.service.ResinSystem.start(ResinSystem.java:476)
    at com.caucho.server.resin.Resin.start(Resin.java:892)
    at com.caucho.server.resin.Resin.initMain(Resin.java:1020)
    at com.caucho.server.resin.Resin.main(Resin.java:1287)
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:800)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:302)
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:162)
    at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:1346)
    at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:1194)
    at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:232)
    at com.caucho.server.webapp.WebApp.start(WebApp.java:3143)
    at com.caucho.env.deploy.DeployController.startImpl(DeployController.java:630)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.request(StartAutoRedeployAutoStrategy.java:129)
    at com.caucho.env.deploy.DeployController.request(DeployController.java:545)
    at com.caucho.server.webapp.WebAppVersioningController.startImpl(WebAppVersioningController.java:145)
    at com.caucho.server.webapp.WebAppVersioningController.startImpl(WebAppVersioningController.java:45)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:77)
    at com.caucho.env.deploy.DeployController.startOnInit(DeployController.java:493)
    at com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:171)
    at com.caucho.server.webapp.WebAppContainer.start(WebAppContainer.java:713)
    at com.caucho.server.host.Host.start(Host.java:675)
    at com.caucho.env.deploy.DeployController.startImpl(DeployController.java:630)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:77)
    at com.caucho.env.deploy.DeployController.startOnInit(DeployController.java:493)
    at com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:171)
    at com.caucho.server.host.HostContainer.start(HostContainer.java:542)
    at com.caucho.server.cluster.Server.start(Server.java:1211)
    at com.caucho.server.cluster.ServletService.start(ServletService.java:72)
    at com.caucho.env.service.ResinSystem.startServices(ResinSystem.java:508)
    at com.caucho.env.service.ResinSystem.start(ResinSystem.java:476)
    at com.caucho.server.resin.Resin.start(Resin.java:892)
    at com.caucho.server.resin.Resin.initMain(Resin.java:1020)
    at com.caucho.server.resin.Resin.main(Resin.java:1287)
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:800)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:302)
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:162)
    at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:1346)
    at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:1194)
    at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:232)
    at com.caucho.server.webapp.WebApp.start(WebApp.java:3143)
    at com.caucho.env.deploy.DeployController.startImpl(DeployController.java:630)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.request(StartAutoRedeployAutoStrategy.java:129)
    at com.caucho.env.deploy.DeployController.request(DeployController.java:545)
    at com.caucho.server.webapp.WebAppVersioningController.startImpl(WebAppVersioningController.java:145)
    at com.caucho.server.webapp.WebAppVersioningController.startImpl(WebAppVersioningController.java:45)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:77)
    at com.caucho.env.deploy.DeployController.startOnInit(DeployController.java:493)
    at com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:171)
    at com.caucho.server.webapp.WebAppContainer.start(WebAppContainer.java:713)
    at com.caucho.server.host.Host.start(Host.java:675)
    at com.caucho.env.deploy.DeployController.startImpl(DeployController.java:630)
    at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:77)
    at com.caucho.env.deploy.DeployController.startOnInit(DeployController.java:493)
    at com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:171)
    at com.caucho.server.host.HostContainer.start(HostContainer.java:542)
    at com.caucho.server.cluster.Server.start(Server.java:1211)
    at com.caucho.server.cluster.ServletService.start(ServletService.java:72)
    at com.caucho.env.service.ResinSystem.startServices(ResinSystem.java:508)
    at com.caucho.env.service.ResinSystem.start(ResinSystem.java:476)
    at com.caucho.server.resin.Resin.start(Resin.java:892)
    at com.caucho.server.resin.Resin.initMain(Resin.java:1020)
    at com.caucho.server.resin.Resin.main(Resin.java:1287)
Additional Information
Attached Files

- Relationships

- Notes
(0005043)
matzew
02-11-11 04:19

Please note that in "resin-web.xml" you need to complete the URL to a MySQL database:

         <database>
           <jndi-name>jdbc/mysql</jndi-name>
           <driver type="com.mysql.jdbc.Driver">
             <url>jdbc:mysql://REMOTE_SERVER:3306/schema</url> [^]
             <user>MYUSER</user>
             <password>MYPASSWD</password>
            </driver>
            <prepared-statement-cache-size>8</prepared-statement-cache-size>
            <max-connections>20</max-connections>
            <max-idle-time>30s</max-idle-time>
          </database>



(I copied the mysql driver to $RESIN_HOME/lib)
 
(0005044)
matzew
02-11-11 04:22

For some reason, I can not upload the WAR file.

I copied it to this URL:

http://people.apache.org/~matzew/RESIN [^]
 
(0005049)
ferg
02-11-11 12:55

Because of the way the JSF RI works, you need to add the faces servlet to a web.xml (using standard web.xml syntax, not Resin's short cuts.)

At initialization time, the JSF RI looks for WEB-INF/web.xml and checks for a faces servlet definition. If it doesn't find the definition, it doesn't initialize JSF. (If you turn logging to "finer" you should see a log message like "No FacesServlet found in deployment descriptor").

Since the JSF RI doesn't know about Resin's resin-web.xml, it won't fine the servlet in your configuration.

So, although this is annoying behavior of the JSF RI, there's nothing I can think of for Resin itself to work around it.
 

- Issue History
Date Modified Username Field Change
02-11-11 04:16 matzew New Issue
02-11-11 04:19 matzew Note Added: 0005043
02-11-11 04:22 matzew Note Added: 0005044
02-11-11 12:55 ferg Note Added: 0005049
02-11-11 12:55 ferg Assigned To  => ferg
02-11-11 12:55 ferg Status new => closed
02-11-11 12:55 ferg Resolution open => no change required


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker