wood burning stoves 2.0*
The moose likes JSF and the fly likes Error while integrating Struts with JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Error while integrating Struts with JSF" Watch "Error while integrating Struts with JSF" New topic
Author

Error while integrating Struts with JSF

Ravindranath Chowdary
Ranch Hand

Joined: Nov 08, 2006
Posts: 71
Hi Ranchers,
I am encountering the following error when I try to integrate Struts with JSF. I am using jdk1.5.0_10 and Tomcat 5.0 and Eclipse 3.1.

Error:

2007-12-06 16:11:25 StandardContext[/poeticWeb]Exception sending context initialized event to listener instance of class org.apache.struts.faces.taglib.LifecycleListener
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267)

2007-12-06 16:11:25 StandardContext[/poeticWeb]Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;
at com.sun.faces.config.processor.AbstractConfigProcessor.getNodeText(AbstractConfigProcessor.java:126)
at com.sun.faces.config.processor.FactoryConfigProcessor.processFactories(FactoryConfigProcessor.java:148)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:125)

After I start the Tomcat I am getting the following error:

Dec 6, 2007 7:27:14 PM org.apache.struts.faces.taglib.LifecycleListener attributeAdded
INFO: attributeAdded(com.sun.faces.config.WebConfiguration,com.sun.faces.config.WebConfiguration@1de0c09)
Dec 6, 2007 7:27:14 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_07-b03-FCS) for context 'Poetic Web'
Dec 6, 2007 7:27:16 PM org.apache.struts.faces.taglib.LifecycleListener contextInitialized
INFO: contextInitialized()
Dec 6, 2007 7:27:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Dec 6, 2007 7:27:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Dec 6, 2007 7:27:16 PM org.apache.struts.faces.taglib.LifecycleListener conte..


Can you please help in this context.


Thanks,
Ravindra.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

It looks like your WAR is missing an XML DOM library used by the Sun JSF code.


Customer surveys are for companies who didn't pay proper attention to begin with.
Ryan Lubke
Ranch Hand

Joined: Jun 20, 2007
Posts: 36
Originally posted by Ravindranath Chowdary:
Hi Ranchers,
I am encountering the following error when I try to integrate Struts with JSF. I am using jdk1.5.0_10 and Tomcat 5.0 and Eclipse 3.1.

Error:

2007-12-06 16:11:25 StandardContext[/poeticWeb]Exception sending context initialized event to listener instance of class org.apache.struts.faces.taglib.LifecycleListener
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267)

2007-12-06 16:11:25 StandardContext[/poeticWeb]Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;
at com.sun.faces.config.processor.AbstractConfigProcessor.getNodeText(AbstractConfigProcessor.java:126)
at com.sun.faces.config.processor.FactoryConfigProcessor.processFactories(FactoryConfigProcessor.java:148)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:125)

After I start the Tomcat I am getting the following error:

Dec 6, 2007 7:27:14 PM org.apache.struts.faces.taglib.LifecycleListener attributeAdded
INFO: attributeAdded(com.sun.faces.config.WebConfiguration,com.sun.faces.config.WebConfiguration@1de0c09)
Dec 6, 2007 7:27:14 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_07-b03-FCS) for context 'Poetic Web'
Dec 6, 2007 7:27:16 PM org.apache.struts.faces.taglib.LifecycleListener contextInitialized
INFO: contextInitialized()
Dec 6, 2007 7:27:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Dec 6, 2007 7:27:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Dec 6, 2007 7:27:16 PM org.apache.struts.faces.taglib.LifecycleListener conte..


Can you please help in this context.


Thanks,
Ravindra.


Would be helpful to have the exact version of Tomcat 5.x you're using.
I just tried using Tomcat 5.5.25 and the application deployed.

Also note, if you are using Tomcat 5.x, you *must* be using Facelets and not JSP.
If you're using JSP, then you *must* use Tomcat 6.x.
Ryan Lubke
Ranch Hand

Joined: Jun 20, 2007
Posts: 36
Originally posted by Tim Holloway:
It looks like your WAR is missing an XML DOM library used by the Sun JSF code.


The JAXP implementation in JDK 1.5 and above will work fine with the RI. That said, older implementations of Tomcat provided their own JAXP implementation and overrode the JDK. If this is one of those Tomcat versions, then overriding the JDK's jaxp is going to cause failures.
sayali shah
Greenhorn

Joined: Jul 23, 2008
Posts: 1
hi. I am getting the same error as fol:
- contextInitialized()
- Exception sending context initialized event to listener instance of class org.apache.struts.faces.taglib.LifecycleListener
java.lang.NullPointerException
at org.apache.struts.faces.taglib.LifecycleListener.createPropertyResolver(LifecycleListener.java:241)
at org.apache.struts.faces.taglib.LifecycleListener.contextInitialized(LifecycleListener.java:198)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at vrts.tomcat.server.tomcat5.Tomcat5Impl.startApp(Tomcat5Impl.java:412)
at vrts.tomcat.server.VRTSweb.startApp(VRTSweb.java:2496)
at vrts.tomcat.server.VRTSweb.commandStartWebApp(VRTSweb.java:584)
at vrts.tomcat.server.CommandHandler.handleStartWebApp(CommandHandler.java:422)
at vrts.tomcat.server.CommandHandler.processCommand(CommandHandler.java:174)
at vrts.tomcat.server.CommandHandler.run(CommandHandler.java:115)
- attributeAdded(com.sun.faces.ApplicationAssociate,com.sun.faces.application.ApplicationAssociate@da5bc0)
-

I am using Tomcat 5.
JSF 1.1
And struts-faces 0.4 integration library
Could anyone help with the solution?
[ July 23, 2008: Message edited by: sayali shah ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Error while integrating Struts with JSF
 
Similar Threads
Regarding preconfigured tomcat 6.0.16.
Problem configuring RichFaces3.2.1GA, JSF1.2 and Tomcat6+Eclipse3.4
Richfaces
richfaces integration issue
Faces Exception with Hello-world(ish) application