org.ocpsoft.rewrite.exception.RewriteException

Splash Forums Rewrite Users org.ocpsoft.rewrite.exception.RewriteException

This topic contains 0 replies, has 1 voice, and was last updated by  jimmy_anazco 2 years, 9 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #25316

    jimmy_anazco
    Participant

    Hey, Any idea about??
    org.ocpsoft.rewrite.exception.RewriteException: El provider [org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider] could not retrieve value from property [#{authentication.logout}]
    org.ocpsoft.rewrite.el.El$ElMethod.retrieve(El.java:213)
    org.ocpsoft.rewrite.config.Invoke.perform(Invoke.java:52)
    org.ocpsoft.rewrite.config.DefaultOperationBuilder$DefaultCompositeOperation.perform(DefaultOperationBuilder.java:86)
    org.ocpsoft.rewrite.config.DefaultOperationBuilder$DefaultCompositeOperation.perform(DefaultOperationBuilder.java:87)
    org.ocpsoft.rewrite.config.RuleBuilder.perform(RuleBuilder.java:108)
    org.ocpsoft.rewrite.config.DefaultOperationBuilder$DefaultCompositeOperation.perform(DefaultOperationBuilder.java:87)
    org.ocpsoft.rewrite.config.RuleBuilder.perform(RuleBuilder.java:108)
    org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider.rewriteHttp(DefaultHttpRewriteProvider.java:73)
    org.ocpsoft.rewrite.servlet.http.HttpRewriteProvider.rewrite(HttpRewriteProvider.java:44)
    org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:221)
    org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:177)
    edu.unl.sbe.web.filter.NocacheFilter.doFilter(NocacheFilter.java:41)
    edu.unl.sbe.web.filter.ResponseTimeLoggingFilter.doFilter(ResponseTimeLoggingFilter.java:25)
    edu.unl.sbe.web.filter.TransactionFilter.doFilter(TransactionFilter.java:47)
    org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
    org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
    JBWEB000071: root cause

    java.lang.IllegalArgumentException: FacesContext.getCurrentInstance() returned null. EL expressions can only be evaluated in the JSF lifecycle. You should use PhaseAction and PhaseBinding to perform an deferred operation instead.
    org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider.getFacesContext(FacesExpressionLanguageProvider.java:132)
    org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider.evaluateMethodExpression(FacesExpressionLanguageProvider.java:106)
    org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider.evaluateMethodExpression(FacesExpressionLanguageProvider.java:99)
    org.ocpsoft.rewrite.el.El$ElMethod.retrieve(El.java:204)
    org.ocpsoft.rewrite.config.Invoke.perform(Invoke.java:52)
    org.ocpsoft.rewrite.config.DefaultOperationBuilder$DefaultCompositeOperation.perform(DefaultOperationBuilder.java:86)
    org.ocpsoft.rewrite.config.DefaultOperationBuilder$DefaultCompositeOperation.perform(DefaultOperationBuilder.java:87)
    org.ocpsoft.rewrite.config.RuleBuilder.perform(RuleBuilder.java:108)
    org.ocpsoft.rewrite.config.DefaultOperationBuilder$DefaultCompositeOperation.perform(DefaultOperationBuilder.java:87)
    org.ocpsoft.rewrite.config.RuleBuilder.perform(RuleBuilder.java:108)
    org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider.rewriteHttp(DefaultHttpRewriteProvider.java:73)
    org.ocpsoft.rewrite.servlet.http.HttpRewriteProvider.rewrite(HttpRewriteProvider.java:44)
    org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:221)
    org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:177)
    edu.unl.sbe.web.filter.NocacheFilter.doFilter(NocacheFilter.java:41)
    edu.unl.sbe.web.filter.ResponseTimeLoggingFilter.doFilter(ResponseTimeLoggingFilter.java:25)
    edu.unl.sbe.web.filter.TransactionFilter.doFilter(TransactionFilter.java:47)
    org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
    org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)

    My class

    import javax.servlet.ServletContext;
    import org.ocpsoft.common.services.NonEnriching;
    import org.ocpsoft.rewrite.config.Configuration;
    import org.ocpsoft.rewrite.config.ConfigurationBuilder;
    import org.ocpsoft.rewrite.config.Direction;
    import org.ocpsoft.rewrite.config.Invoke;
    import org.ocpsoft.rewrite.el.El;
    import org.ocpsoft.rewrite.servlet.config.HttpConfigurationProvider;
    import org.ocpsoft.rewrite.servlet.config.Path;
    import org.ocpsoft.rewrite.servlet.config.Redirect;
    import org.ocpsoft.rewrite.servlet.config.Response;
    import org.ocpsoft.rewrite.servlet.config.rule.Join;
    /**
    * @author Lincoln Baxter, III
    * @adapter Jimmy Alexander AƱazco
    */
    public class AccessRewriteConfiguration extends HttpConfigurationProvider implements NonEnriching {

    @Override
    public Configuration getConfiguration(final ServletContext context) {
    return ConfigurationBuilder.begin()
    .addRule(Join.path(“/”).to(“/pages/home.xhtml”))
    .addRule(Join.path(“/responsable”).to(“/pages/homeResponsable.xhtml”))
    .addRule(Join.path(“/auxiliar”).to(“/pages/homeAuxiliar.xhtml”))
    .addRule(Join.path(“/director”).to(“/pages/homeDirector.xhtml”))
    .addRule(Join.path(“/signup”).to(“/pages/signup.xhtml”))
    .addRule(Join.path(“/login”).to(“/pages/login.xhtml”))
    // 404 and Error
    .addRule(Join.path(“/404”).to(“/pages/404.xhtml”).perform(Response.setCode(404)))
    .addRule(Join.path(“/error”).to(“/pages/error.xhtml”))
    // Authentication
    // .defineRule()
    // .when(Direction.isInbound().and(Path.matches(“/logout”)))
    // .perform(Invoke.binding(El.retrievalMethod(“authentication.logout”))
    // .and(Redirect.temporary(context.getContextPath() + “/”)))

    // //Authentication
    // .defineRule()
    // .when(Direction.isInbound().and(Path.matches(“/logout”)))
    // .perform(Invoke.binding(PhaseBinding.to(El.property(“#{authentication.logout}”)).after(PhaseId.RESTORE_VIEW))
    // .and(Redirect.temporary(context.getContextPath() + “/”)));
    // // Create a dynamic logout URL via EL
    .defineRule()
    .when(Direction.isInbound().and(Path.matches(“/logout”)))
    .perform(Invoke.binding(El.retrievalMethod(“#{authentication.logout}”))
    .and(Redirect.temporary(context.getContextPath() + “/”)));
    }

    @Override
    public int priority() {
    return 10;
    }
    }

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Comments are closed.