1 2 Previous Next 16 Replies Latest reply on Sep 29, 2009 4:25 AM by Ilya Shaikovsky

    Richfaces and trinidad not working together

    Sushant Saini Novice

      I have created an Application with Richfaces and it works fine but since Richfaces is not section 508 compliant I am trying to use Trinidad for Menus and Tabs as Trinidad is 508 compliance. As soon I add Trinidad configuration some of the components of Richfaces stop working. Clicking on calendar which was working fine earlier is not working. Suggestion box which was working earlier is now not working. When I try to use these component I get a Java script error saying "Component not found". I think Trinidad is killing the java script of Richfaces. Some of the components like collapseble tabs are working fine. I have seen couple of articles mentioining how to configure web.xml and faces-config.xml and I have made sure that my files are in accordance of these. I have also made sure that my a4J Filter appears before Trinidad Filter.

      Does anyone had faced this issues earlier or knows about it ?

        • 1. Re: Richfaces and trinidad not working together
          Sushant Saini Novice

          Just to give more information. I am using Richfaces 3.3.2.CR1. Trinidad 1.2.12. JSF 1.2 and JDK 1.6. I can even attach the project code if required.

          • 2. Re: Richfaces and trinidad not working together
            Nick Belaevski Master

            Hello,

            Looks like JavaScript conflict. Type this in address bar

            javascript:alert(Prototype.Version)
            after the page is loaded and press enter key, then post here result.

            • 3. Re: Richfaces and trinidad not working together
              Sushant Saini Novice

              Hi,
              After running the javascript:alert(Prototype.Version) as provided by you the output is "1.6.0.3".

              • 4. Re: Richfaces and trinidad not working together
                Nick Belaevski Master

                Yes, that's the correct version of prototype.js for 3.3.2.CR1. Please check whether SCRIPT/LINK tags for resources are output to the page.

                • 5. Re: Richfaces and trinidad not working together
                  Sushant Saini Novice



                  window.RICH_FACES_EXTENDED_SKINNING_ON=true;<script src="/JsfImpl1/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/skinning.js.jsf"

                  • 6. Re: Richfaces and trinidad not working together
                    Sushant Saini Novice

                    window.RICH_FACES_EXTENDED_SKINNING_ON=true;<script src="/JsfImpl1/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/skinning.js.jsf"

                    • 7. Re: Richfaces and trinidad not working together
                      Sushant Saini Novice

                      Hi,
                      I was trying to post the view source of my pages here but somehow only the first line shows up. in the post. Anyways I compared the view source of both the pages 1 Richfaces only which is working perfectly and 1 with a combination of Richfaces + Trinidad which has problems. SCRIPT/LINK are same. What should we do now?

                      • 8. Re: Richfaces and trinidad not working together
                        Nick Belaevski Master

                        Check whether resources are loaded ok using Firebug "Net" tab.

                        • 9. Re: Richfaces and trinidad not working together
                          Sushant Saini Novice

                          Hi,
                          Following is the list of all the JS files loaded properly. Everything looks good to me. Even Calendar.js.Jsf is there, still Calendar is breaking.


                          AjaxScript.jsf, Form.js.jsf, PrototypeScript.jsf ,Menu.js.jsf , Util.js.jsf , Browserinfo.js.jsf ,Tabpanel.js.jsf ,Jquery.js.jsf ,Available.js.jsf, Smartpoaitionscript.jsf ,Effect.js.jsf ,Suggestionbox.js.jsf , Event.js.jsf
                          Json-dom.jsf ,Calendar.js.Jsf ,Simpletogglepanel.js.jsf


                          Any suggestions. I have a working project. I can sent the project to you guys if required.

                          • 10. Re: Richfaces and trinidad not working together
                            Nick Belaevski Master

                            Ok, can you please put it sendspace.com?

                            • 11. Re: Richfaces and trinidad not working together
                              Sushant Saini Novice


                              Here is the link to the project code. This is ready to deploy atleast on tom cat. If you remove the trinidad mapping from web.xml this works fine. You would see 2 versions of Richfaces Jars in the lib, thats not causing any issues. You can remove any one if you feel like. The url for the application will be "http://localhost:8080/JsfImpl1/index.jsf"



                              http://www.sendspace.com/file/4syw67[/url]

                              • 12. Re: Richfaces and trinidad not working together
                                Nick Belaevski Master

                                Hi,

                                I've downloaded it, but cannot open index.jsf due to database connection error.

                                SEVERE: Error Rendering View[/index.xhtml]
                                javax.faces.FacesException: com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean user
                                 at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:257)
                                 at org.jboss.seam.jsf.SeamApplication.createComponent(SeamApplication.java:394)
                                 at com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)
                                 at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)
                                 at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
                                 at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
                                 at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
                                 at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
                                 at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
                                 at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                                 at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
                                 at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
                                 at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
                                 at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
                                 at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
                                 at com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:60)
                                 at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
                                 at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)
                                 at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:310)
                                 at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:280)
                                 at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
                                 at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
                                 at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
                                 at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
                                 at com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)
                                 at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
                                 at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
                                 at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                                 at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
                                 at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
                                 at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
                                 at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
                                 at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
                                 at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
                                 at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                                 at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
                                 at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
                                 at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
                                 at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
                                 at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
                                 at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
                                 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:110)
                                 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                                 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
                                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
                                 at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                                 at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                                 at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
                                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                                 at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                                 at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                                 at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
                                 at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
                                 at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
                                 at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
                                 at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                                 at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                                 at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                                 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.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
                                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
                                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
                                 at java.lang.Thread.run(Thread.java:619)
                                Caused by: com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean user
                                 at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:226)
                                 at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:108)
                                 at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
                                 at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
                                 at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
                                 at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
                                 at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
                                 at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                                 at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
                                 at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                                 at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                                 at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:246)
                                 ... 83 more
                                Caused by: com.sun.faces.spi.InjectionProviderException: java.lang.reflect.InvocationTargetException
                                 at com.sun.faces.vendor.Tomcat6InjectionProvider.invokePostConstruct(Tomcat6InjectionProvider.java:120)
                                 at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:220)
                                 ... 94 more
                                Caused by: java.lang.reflect.InvocationTargetException
                                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                 at java.lang.reflect.Method.invoke(Method.java:597)
                                 at org.apache.catalina.util.DefaultAnnotationProcessor.postConstruct(DefaultAnnotationProcessor.java:96)
                                 at com.sun.faces.vendor.Tomcat6InjectionProvider.invokePostConstruct(Tomcat6InjectionProvider.java:118)
                                 ... 95 more
                                Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
                                 at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
                                 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
                                 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
                                 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
                                 at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
                                 at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
                                 at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
                                 at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
                                 at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)
                                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                 at java.lang.reflect.Method.invoke(Method.java:597)
                                 at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)
                                 at $Proxy36.beginTransaction(Unknown Source)
                                 at buildingDaoImpl.getBuildings(buildingDaoImpl.java:34)
                                 at buildingServiceImpl.getBuildings(buildingServiceImpl.java:27)
                                 at user.init(user.java:201)
                                 ... 101 more
                                Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
                                 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
                                 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
                                 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
                                 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
                                 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
                                 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
                                 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
                                 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
                                 at java.sql.DriverManager.getConnection(DriverManager.java:582)
                                 at java.sql.DriverManager.getConnection(DriverManager.java:154)
                                 at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
                                 at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
                                 ... 114 more


                                • 13. Re: Richfaces and trinidad not working together
                                  Sushant Saini Novice

                                  I have refactored the application to exclude any database stuff and run on hardcoded data. Here is the link to new application in sendSpace.com

                                  http://www.sendspace.com/file/rpefbx

                                  1 2 Previous Next