File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while integrating Struts with JSF

 
Ravindranath Chowdary
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like your WAR is missing an XML DOM library used by the Sun JSF code.
 
Ryan Lubke
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic