4 Replies Latest reply on Apr 30, 2010 4:06 PM by Amgad Hanafy

    JSFUnit and Trinidad support

    simon aaa Newbie

      Hello,

       

      I would like to know if JSFUnit is ever going to support Trinidad? There's an issue in JIRA (dated 03/09) about it, but is it ever going to be implemented/fixed?

       

      You can find the issue here: https://jira.jboss.org/jira/si/jira.issueviews:issue-html/JSFUNIT-198/JSFUNIT-198.html

       

      Thanks, Simon.

        • 1. Re: JSFUnit and Trinidad support
          Stan Silvert Master

          I haven't seen the kind of demand for Trinidad that we get for RichFaces or even for IceFaces.  However, it should mostly work and I'd be happy to support it if someone is willing to write test cases and do the analysis on whatever is needed to make it work 100%.

           

          Are you having a specific problem with Trinidad?  Are you running into the same problem decribed in the Jira?

           

          Stan

          • 2. Re: JSFUnit and Trinidad support
            simon aaa Newbie

            Hello,

             

            Thank you for your answer.

             

            I have the same exact problem as described in Jira. As soon as I use a Trinidad component I get the NullPointerException when I run my tests.


            java.lang.NullPointerException
                 at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.getRenderKit(RenderKitDecorator.java:119)
                 at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.findRenderer(RenderKitDecorator.java:90)
                 at org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase.getRenderer(RenderKitBase.java:129)
                 at org.apache.myfaces.trinidad.component.UIXComponentBase._getRendererImpl(UIXComponentBase.java:1131)
                 at org.apache.myfaces.trinidad.component.UIXComponentBase.getRenderer(UIXComponentBase.java:1161)
                 at org.apache.myfaces.trinidad.component.UIXComponentBase.getClientId(UIXComponentBase.java:346)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAncestors(ClientIDs.java:106)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:87)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.addAllIDs(ClientIDs.java:88)
                 at org.jboss.jsfunit.jsfsession.ClientIDs.<init>(ClientIDs.java:67)
                 at org.jboss.jsfunit.jsfsession.JSFServerSession.pageCreated(JSFServerSession.java:179)
                 at org.jboss.jsfunit.jsfsession.JSFServerSession.<init>(JSFServerSession.java:54)
                 at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:82)
                 at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:57)
                 at lvbd.test.LVBDTest.testInitialPage(LVBDTest.java:22)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
                 at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
                 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
            
            at
            org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
                 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
                 at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
                 at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
                 at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
                 at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
                 at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
                 at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
                 at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
                 at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
                 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.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:116)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
                 at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
                 at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
                 at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
                 at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
                 at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
                 at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
                 at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
                 at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                 at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
                 at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                 at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
                 at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
                 at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
                 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:228)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
                 at java.lang.Thread.run(Thread.java:595)
            

             

            Here is my test (pretty simple...):

               public void testInitialPage() throws IOException
               {
                  JSFSession jsfSession = new JSFSession("/LVBD/Pieces/Pieces.jsp");
                  JSFClientSession client = jsfSession.getJSFClientSession();
                  assertTrue(client.getPageAsText().contains("LVBD"));
               }
            

             

            However, when I make a new project with standard JSF I can get it to work.

            • 3. Re: JSFUnit and Trinidad support
              Stan Silvert Master

              Hi Simon,

               

              I hate to say "no" but at this point I can't commit the time and effort to make sure Trinidad works properly.  However, if you are willing to dig in and figure out what is needed then I would love to work with you to make the changes in JSFUnit that would make it work well with Trinidad.  I just need someone else to do the legwork.

               

              Stan

              • 4. Re: JSFUnit and Trinidad support
                Amgad Hanafy Newbie

                Hi stan

                 

                how can i help for getting trinidad supported in jsfunit since i have the sam problem

                 

                I got the same error on the line

                 

                {code}JSFSession jsfSession = new JSFSession(/index.xhtml);{code}

                 

                Isn't it faceletes problem or it's just a trinidad problem