Reply To: Weblogic prettyfaces deployment problem

Splash Forums PrettyFaces Users Weblogic prettyfaces deployment problem Reply To: Weblogic prettyfaces deployment problem

#25839

sumithra-r
Participant

I have the same problem still. I have done the following:

1. Downloaded the newer 3.3.4 snapshot version from https://github.com/ocpsoft/prettyfaces/archive/prettyfaces3.zip and did a local build:
My console output for Maven install:
[INFO] Replacing C:\prettyFaces\prettyfaces-prettyfaces3\impl-jsf12\target\prettyfaces-jsf12-3.3.4-SN
APSHOT.jar with C:\prettyFaces\prettyfaces-prettyfaces3\impl-jsf12\target\prettyfaces-jsf12-3.3.4-SNA
PSHOT-shaded.jar
[INFO] Replacing C:\prettyFaces\prettyfaces-prettyfaces3\impl-jsf12\target\prettyfaces-jsf12-3.3.4-SN
APSHOT-sources.jar with C:\prettyFaces\prettyfaces-prettyfaces3\impl-jsf12\target\prettyfaces-jsf12-3
.3.4-SNAPSHOT-shaded-sources.jar
[INFO] [install:install {execution: default-install}]
[INFO] Installing C:\prettyFaces\prettyfaces-prettyfaces3\impl-jsf12\target\prettyfaces-jsf12-3.3.4-S
NAPSHOT.jar to C:\.m2\repository\com\ocpsoft\prettyfaces-jsf12\3.3.4-SNAPSHOT\prettyfaces-jsf12-3.3.4-SNAP
SHOT.jar
[INFO] Installing C:\prettyFaces\prettyfaces-prettyfaces3\impl-jsf12\target\prettyfaces-jsf12-3.3.4-S
NAPSHOT-sources.jar to C:\.m2\repository\com\ocpsoft\prettyfaces-jsf12\3.3.4-SNAPSHOT\prettyfaces-jsf12-3.
3.4-SNAPSHOT-sources.jar
[INFO] Installing C:\prettyFaces\prettyfaces-prettyfaces3\impl-jsf12\target\prettyfaces-jsf12-3.3.4-S
NAPSHOT-sources.jar to C:\.m2\repository\com\ocpsoft\prettyfaces-jsf12\3.3.4-SNAPSHOT\prettyfaces-jsf12-3.
3.4-SNAPSHOT-sources.jar

2. Updated my pom.xml to use the snapshot version as follows:
<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>prettyfaces-jsf12</artifactId>
<version>3.3.4-SNAPSHOT</version>
</dependency>

3. Updated my web.xml to include the <param-name>com.ocpsoft.pretty.DISABLE_SERVLET_3.0_SUPPORT</param-name>
as follows:
<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<distributable/>
<filter>
<filter-name>Pretty Filter</filter-name>
<filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Pretty Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/application-faces-config.xml,
/WEB-INF/homepage-faces-config.xml,
/WEB-INF/ucl-faces-config.xml,
/WEB-INF/literature/config/orderlit-faces-config.xml</param-value>
</context-param>
<context-param>
<param-name>com.ocpsoft.pretty.CONFIG_FILES</param-name>
<param-value>/WEB-INF/pretty-config.xml,
/WEB-INF/pretty-app-config.xml,
/WEB-INF/literature/config/orderlit-pretty-config.xml</param-value>
</context-param>
<context-param>
<param-name>com.ocpsoft.pretty.DISABLE_SERVLET_3.0_SUPPORT</param-name>
<param-value>true</param-value>
</context-param>

4. I still get the same error:
<Feb 12, 2014 12:44:24 PM PST> <Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: com.ocpsoft.p
retty.PrettyFilter.
com.ocpsoft.pretty.PrettyException: Failed to load configuration.
at com.ocpsoft.pretty.faces.config.PrettyConfigurator.configure(PrettyConfigurator.java:90)
at com.ocpsoft.pretty.PrettyFilter.init(PrettyFilter.java:337)
at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:577)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
Truncated. see log file for complete stacktrace
Caused By: com.ocpsoft.pretty.PrettyException: Could not retrieve DynaViewId.
at com.ocpsoft.pretty.faces.config.PrettyConfigurator.getFacesDynaViewId(PrettyConfigurator.java:103)
at com.ocpsoft.pretty.faces.config.PrettyConfigurator.configure(PrettyConfigurator.java:67)
at com.ocpsoft.pretty.PrettyFilter.init(PrettyFilter.java:337)
at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:577)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
Truncated. see log file for complete stacktrace
Caused By: java.lang.UnsupportedOperationException: [HTTP:101388]The ServletContext was passed to the ServletContextList
ener.contextInitialized method of a ServletContextListener that was neither declared in web.xml or web-fragment.xml, nor
annotated with javax.servlet.annotation.WebListener.
at weblogic.servlet.internal.WebAppServletContext.checkNotifyDynamicContext(WebAppServletContext.java:3917)
at weblogic.servlet.internal.WebAppServletContext.getServletRegistrations(WebAppServletContext.java:3810)
at com.ocpsoft.pretty.faces.config.servlet.WebXmlParser.parse(WebXmlParser.java:54)
at com.ocpsoft.pretty.faces.config.PrettyConfigurator.getFacesDynaViewId(PrettyConfigurator.java:98)
at com.ocpsoft.pretty.faces.config.PrettyConfigurator.configure(PrettyConfigurator.java:67)
Truncated. see log file for complete stacktrace
>

Am I missing anything here? Any idea? what else can I do to get rid of this error?

I am deploying in Weblogic 12c. Any help will be appreciated.