Issue with Evaluation binding

Splash Forums Rewrite Users Issue with Evaluation binding

This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 2 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24782

    urs_rajesh
    Participant

    Hi,
    I am seeing the below error for the my configuration provider. urlRewriter mentioned in the class is a request scoped bean.

    public class PageConfigurationProvider extends HttpConfigurationProvider {
    
       private CMessageLog messageLog = CMessageLog.getInstance();
    
      @Override
      public Configuration getConfiguration(ServletContext context)
       {
          messageLog.println(IMessage.DEBUG1, "Rewrite is active");
          return ConfigurationBuilder.begin()
                   .addRule(Join.path("/faces/{folderName}/pages/{pageName}").to("/faces/base/pages/{pageName}"))
                   .where("folderName").bindsTo(Evaluation.property("#{urlRewriter.folderName}"))
                   .where("pageName").bindsTo(Evaluation.property("#{urlRewriter.pageName}"));
              
       }
       @Override
      public int priority() {
         return 10;
      }
    }
    

    Log

    22:59:31,243 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
    java.lang.IllegalArgumentException: null source
            at java.util.EventObject.<init>(EventObject.java:38)
            at javax.faces.event.SystemEvent.<init>(SystemEvent.java:67)
            at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69)
            at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69)
            at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256)
            at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245)
            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
            at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:199)
            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:638)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
            at org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler.handleResult(HttpRewriteResultHandler.java:38)
            at org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:262)
            at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:187)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.cashedge.onfn.ui.parser.PageAccessFilter.doFilter(PageAccessFilter.java:84)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            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:235)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
            at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
            at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
            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:158)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:662)
    
    #24790

    Seems like this NPE is thrown somewhere within the Mojarra code. Which Mojarra version are you using?

    The only thing which looks a bit weird is how your bindings look like. Could you try to use this instead:

    .where("folderName").bindsTo(El.property("urlRewriter.folderName"))
    .where("pageName").bindsTo(El.property("urlRewriter.pageName"));
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.