Failed to load configuration

Splash Forums PrettyFaces Users Failed to load configuration

This topic contains 11 replies, has 3 voices, and was last updated by  Marcos Ivanechtchuk 3 years, 2 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #24066

    Marcos Ivanechtchuk
    Participant

    Rewrite/PrettyFaces fails to load configuration when using SeamFaces 3.x? I attempted to deploy in JBoss AS 7.1.1 with the faces integration jar, but no success:

    ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/test]] (MSC service thread 1-6) Exception sending context initialized event to listener instance of class org.ocpsoft.rewrite.servlet.impl.RewriteServletContextListener: com.ocpsoft.pretty.PrettyException: Failed to load configuration.
    at com.ocpsoft.pretty.faces.config.PrettyConfigurator.configure(PrettyConfigurator.java:90) [rewrite-config-prettyfaces-2.0.1.Final.jar:2.0.1.Final]
    at org.ocpsoft.rewrite.prettyfaces.PrettyConfigContextListener.contextInitialized(PrettyConfigContextListener.java:41) [rewrite-config-prettyfaces-2.0.1.Final.jar:2.0.1.Final]
    at org.ocpsoft.rewrite.servlet.impl.RewriteServletContextListener.contextInitialized(RewriteServletContextListener.java:38) [rewrite-servlet-2.0.1.Final.jar:2.0.1.Final]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
    Caused by: java.lang.NullPointerException
    at org.jboss.seam.faces.util.BeanManagerUtils.getContextualInstance(BeanManagerUtils.java:103) [seam-faces.jar:3.1.0.Final]
    at org.jboss.seam.faces.rewrite.RewriteConfiguration.loadConfiguration(RewriteConfiguration.java:57) [seam-faces.jar:3.1.0.Final]
    at com.ocpsoft.pretty.faces.config.PrettyConfigurator.configure(PrettyConfigurator.java:63) [rewrite-config-prettyfaces-2.0.1.Final.jar:2.0.1.Final]
    ... 10 more

    Attached the project.

    Do you know something about it? Could help?

    Regards,

    Marcos

    Attachments:
    1. test2.zip
    #24069

    If I remember correctly, you have to reorder your filters so that the Seam3 servlet filter is executed BEFORE the RewriteFilter. Could you try that?

    #24070

    Try adding this to your web.xml:

        <filter>
            <display-name>Servlet Event Bridge Filter</display-name>
            <filter-name>Servlet Event Bridge Filter</filter-name>
            <filter-class>org.jboss.solder.servlet.event.ServletEventBridgeFilter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>Servlet Event Bridge Filter</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
    
       <filter>
          <filter-name>OCPsoft Rewrite Filter</filter-name>
          <filter-class>org.ocpsoft.rewrite.servlet.RewriteFilter</filter-class>
          <async-supported>true</async-supported>
       </filter>
       <filter-mapping>
          <filter-name>OCPsoft Rewrite Filter</filter-name>
          <url-pattern>/*</url-pattern>
          <dispatcher>FORWARD</dispatcher>
          <dispatcher>REQUEST</dispatcher>
          <dispatcher>INCLUDE</dispatcher>
          <dispatcher>ASYNC</dispatcher>
          <dispatcher>ERROR</dispatcher>
       </filter-mapping>
    #24071

    Marcos Ivanechtchuk
    Participant

    I tried, gives me the same error.

    #24072

    You should also update Seam Faces to 3.2.0.Final. Seems like you are still using 3.1.0.Final.

    If this doesn’t fix the error, please post a new stacktrace with the current Seam Faces version.

    #24073

    Marcos Ivanechtchuk
    Participant

    FINALLY! Thanks very much, that’s it.

    With Seam Faces 3.2.1 works fine.

    #24074

    You are very welcome (from Christian)! (I personally did the release of Seam Faces 3.2.1 to fix this issue, so you’re doubly welcome 😉

    #24075

    Christian did all of the rest of the work though 😛

    #24076

    And by all of the rest of it, I pretty much mean all of it 🙂

    #24077

    Marcos Ivanechtchuk
    Participant

    Yeah, fixed just in time! Double thanks from Brazil!

    #24078

    You’re welcome. 🙂

    I’m curious. Do you have to add the filter configuration to your web.xml like I described or did you just update the version? I remember I had to do something like this in one of my projects to get it work.

    #24095

    Marcos Ivanechtchuk
    Participant

    Just update the Seam Faces jars resolves the issue.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

Comments are closed.