permaculture playing cards*
The moose likes JSF and the fly likes Trinidad components - first time user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Trinidad components - first time user" Watch "Trinidad components - first time user" New topic
Author

Trinidad components - first time user

Ravi Chilakapati
Greenhorn

Joined: Apr 20, 2010
Posts: 10
Hi.
I currently need to have a project with both trinidad and ajax4jsf. I will give my web.xml and faces-config.xml below. Also, I have the basic trinidad-config.xml. I am getting this error when I try to access a page which contains no trinidad components but does contain rich faces components. I am also getting the same error if I have trinidad components.

I have trinidad jars along with jsf-api.jar, jsf-impl.jar and jsf-facelets.jar.

Error:
java.lang.IllegalStateException: No RenderingContext
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:217)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:693)
at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1262)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:713)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:856)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:566)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
at java.lang.Thread.run(Unknown Source)




My Jboss console shows this followed by the same stack trace as above:

12:29:19,370 ERROR [STDERR] Jan 19, 2011 12:29:19 PM org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit createResponseWriter
SEVERE: No RenderingContext has been created.
12:29:20,120 ERROR [STDERR] Jan 19, 2011 12:29:20 PM com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View[/pages/common/Log-in.xhtml]



My web.xml


My faces-config.xml


Another question: Will a server side state saving have a huge impact of performance and scalability? I read that Trinidad recommends client side state saving and the advantages and disadvantages of both the methods, but I want to know if any one has some real-world scenarios?

Any inputs will be greatly appreciated!

Regards,
Ravi
Ravi Chilakapati
Greenhorn

Joined: Apr 20, 2010
Posts: 10
OK.. Looks like I resolved this.. My faces-config.xml file had the following entry twice - one commented and one uncommented. And apparently, Trinidad crashes with that setting.



Today's lesson: Check your files for duplicate entries like this. Don't stop searching because you found a commented out entry.

zzzz..

Regards,
Ravi Kiran.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trinidad components - first time user