You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Arnaud MERGEY <am...@sunopsis.com> on 2006/07/18 09:05:43 UTC
/faces/* url pattern : Trying to attach AdfRenderingContext to a
thread that already had one
Hi,
I'm trying to use an <af:selectInputDate>.
When I click on calendar icon to select a date I'had a 404
_/lwd/__ADFv__.faces Not Found _error page.
I have replaced in my web.xml Faces Servlet url pattern *.faces by /faces/*.
Now everything works fine but now in my tomcat logs this message appears
again.
ATTENTION: Trying to attach AdfRenderingContext to a thread that already
had one.
18 juil. 2006 10:41:19
org.apache.myfaces.adfinternal.renderkit.core.CoreRenderKit encodeFinally
ATTENTION: No AdfRenderingContext available
I haven't RI and Myfaces twice in my classpath. I think my web.xml and
faces-config.xml are correct
The only way to remove this error log is to use *.faces url pattern but
af:selectInputDate doesn't work with this pattern
Thanks for help
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.adf.CHANGE_PERSISTENCE</param-name>
<param-value>session</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.adf.USE_APPLICATION_VIEW_CACHE</param-name>
<param-value>false</param-value>
</context-param>
<filter>
<filter-name>adfFaces</filter-name>
<filter-class>org.apache.myfaces.adf.webapp.AdfFacesFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>adfFaces</filter-name>
<servlet-name>FacesServlet</servlet-name>
</filter-mapping>
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>org.apache.myfaces.adf.webapp.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/adf/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Catch errors by error code, -->
<!-- redirecting to the error JSP -->
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
<security-constraint>
<display-name>
Prevent access to raw JSP pages that are for JSF pages.
</display-name>
<web-resource-collection>
<web-resource-name>Raw-JSF-JSP-Pages</web-resource-name>
<!-- Add url-pattern for EACH raw JSP page -->
<url-pattern>/header.jsp</url-pattern>
<url-pattern>/layout.jsp</url-pattern>
<url-pattern>/logon.jsp</url-pattern>
<url-pattern>/menu.jsp</url-pattern>
<url-pattern>/form.jsp</url-pattern>
<url-pattern>/about.jsp</url-pattern>
<url-pattern>/scenarii.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<description>No roles, so no direct access</description>
</auth-constraint>
</security-constraint>
</web-app>
faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<application>
<default-render-kit-id>org.apache.myfaces.adf.core</default-render-kit-id>
</application>
<!--<converter>
<converter-id>snpsLoginConverter</converter-id>
<converter-class>
com.sunopsis.lwd.converter.SnpsLoginConverter
</converter-class>
<converter-id>DEFAULT_CONVERTER</converter-id>
<converter-class>com.sunopsis.lwd.converter.SnpsIdentityConverter</converter-class>
</converter>
<converter>
<converter-id>TEST_MAP_CONVERTER</converter-id>
<converter-class>com.sunopsis.metadata.impl.test.TestSnpsFormPropertyRendererMapCodes</converter-class>
</converter-->
<managed-bean>
<managed-bean-name>snpsLogonBean</managed-bean-name>
<managed-bean-class>
com.sunopsis.lwd.model.SnpsLogonBean
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>All information needed in a session.</description>
<managed-bean-name>snpsWebSessionContext</managed-bean-name>
<managed-bean-class>
com.sunopsis.lwd.model.SnpsWebSessionContext
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>Initializes the app in the web mode.</description>
<managed-bean-name>snpsWebAppInitializer</managed-bean-name>
<managed-bean-class>
com.sunopsis.lwd.model.SnpsWebAppInitializer
</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
<managed-property>
<property-name>skinName</property-name>
<property-class>java.lang.String</property-class>
<value>sunopsis</value>
</managed-property>
<managed-property>
<property-name>version</property-name>
<property-class>java.lang.String</property-class>
<value>alpha 2.0</value>
</managed-property>
<managed-property>
<property-name>textAreaRows</property-name>
<property-class>int</property-class>
<value>5</value>
</managed-property>
<managed-property>
<property-name>defaultInputSizeMax</property-name>
<property-class>int</property-class>
<value>250</value>
</managed-property>
<managed-property>
<property-name>sizeLongText</property-name>
<property-class>int</property-class>
<value>50</value>
</managed-property>
</managed-bean>
<managed-bean>
<description>Used to construct list form page</description>
<managed-bean-name>formModel</managed-bean-name>
<managed-bean-class>
com.sunopsis.lwd.model.FormModel
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>
snpsNotUpToDateScenariiModel</managed-bean-name>
<managed-bean-class>
com.sunopsis.lwd.model.SnpsNotUpToDateScenariiModel</managed-bean-class>
<managed-bean-scope>
session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<display-name>logon</display-name>
<from-view-id>/logon.jsp</from-view-id>
<navigation-case>
<from-outcome>ok</from-outcome>
<to-view-id>/layout.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>KO</from-outcome>
<to-view-id>/logon.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<display-name>form</display-name>
<from-view-id>/form.jsp</from-view-id>
<navigation-case>
<from-outcome>detail</from-outcome>
<to-view-id>/form.jsp</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>projects</from-outcome>
<to-view-id>/form.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
<navigation-rule>
<display-name>menu</display-name>
<from-view-id>/menu.jsp</from-view-id>
<navigation-case>
<from-outcome>projects</from-outcome>
<to-view-id>/form.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>logon</from-outcome>
<to-view-id>/logon.jsp</to-view-id>
<redirect />
</navigation-case>
<navigation-case>
<from-outcome>about</from-outcome>
<to-view-id>/about.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>scenario</from-outcome>
<to-view-id>/scenarii.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Re: /faces/* url pattern : Trying to attach AdfRenderingContext to
a thread that already had one
Posted by Arnaud MERGEY <am...@sunopsis.com>.
Hi, thanks for reply but like I described in my mail, it isn't a
classpath issue because with *.faces url-pattern for Faces Servlet in
web.xml, I haven't anymore warning logs.
Checking Tomcat startup (cf below) logs FacesConfigurator seems to load
faces-config.xml in adf-faces-impl twice. But it is very Strange, I have
tested many times
And I 'have always same issue with
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
No "Trying to attach AdfRenderingContext to a thread that already"
messages in my logs
End with
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
I 'have plenty "Trying to attach AdfRenderingContext to a thread that
already message" logs.
It is very Strange !!!
I'd like to use *.faces pattern in order to haven't warning logs but I
can't because of the Http 404 _/lwd/__ADFv__.faces Not Found with
selectInputDate component
Tomcat logs:
2006-07-19 10:33:45,377 - INFO -
org.apache.myfaces.config.FacesConfigurator - Reading standard config
org/apache/myfaces/resource/standard-faces-config.xml
2006-07-19 10:33:45,471 - INFO -
org.apache.myfaces.config.FacesConfigurator - Reading config
jar:file:/C:/dev/workspace_WEB/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Sunopsis%20LightWeight%20Designer/WEB-INF/lib/adf-faces-impl-incubator-m1-SNAPSHOT.jar!/META-INF/faces-config.xml
2006-07-19 10:33:45,908 - INFO -
org.apache.myfaces.config.FacesConfigurator - Reading config
/WEB-INF/faces-config.xml
2006-07-19 10:33:46,002 - WARN -
org.apache.myfaces.shared_impl.util.LocaleUtils - Locale name in
faces-config.xml null or empty, setting locale to default locale : fr_FR
2006-07-19 10:33:46,986 - INFO -
org.apache.myfaces.webapp.StartupServletContextListener - ServletContext
'C:\dev\workspace_WEB\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\Sunopsis
LightWeight Designer\' initialized.
2006-07-19 10:33:47,705 - INFO -
org.apache.myfaces.config.FacesConfigurator - Reading standard config
org/apache/myfaces/resource/standard-faces-config.xml
2006-07-19 10:33:47,752 - INFO -
org.apache.myfaces.config.FacesConfigurator - Reading config
jar:file:/C:/dev/workspace_WEB/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Sunopsis%20LightWeight%20Designer/WEB-INF/lib/adf-faces-impl-incubator-m1-SNAPSHOT.jar!/META-INF/faces-config.xml
2006-07-19 10:33:48,127 - INFO -
org.apache.myfaces.config.FacesConfigurator - Reading config
/WEB-INF/faces-config.xml
2006-07-19 10:33:48,471 - WARN -
org.apache.myfaces.shared_impl.util.LocaleUtils - Locale name in
faces-config.xml null or empty, setting locale to default locale : fr_FR
2006-07-19 10:33:49,393 - INFO -
org.apache.myfaces.webapp.StartupServletContextListener - ServletContext
'C:\dev\workspace_WEB\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\Sunopsis
LightWeight Designer\' initialized.
Cosma Colanicchia a écrit :
> Make also sure you haven't registered the ADF view-handler in your
> descriptors, as the ADF jar META-INF/faces-config.xml do it as well.
>
> Cosma
>
> 2006/7/18, Adam Winer <aw...@gmail.com>:
>> This would happen if you've got two copies of the adf-faces-impl
>> JAR lying around on the classpath, so the ViewHandlerImpl gets
>> registered twice.
>>
>> -- Adam
>>
>>
>> On 7/18/06, Arnaud MERGEY <am...@sunopsis.com> wrote:
>> >
>> > Hi,
>> >
>> > I'm trying to use an <af:selectInputDate>.
>> > When I click on calendar icon to select a date I'had a 404
>> > _/lwd/__ADFv__.faces Not Found _error page.
>> >
>> > I have replaced in my web.xml Faces Servlet url pattern *.faces by
>> > /faces/*.
>> > Now everything works fine but now in my tomcat logs this message
>> appears
>> > again.
>> >
>> > ATTENTION: Trying to attach AdfRenderingContext to a thread that
>> already
>> > had one.
>> > 18 juil. 2006 10:41:19
>> > org.apache.myfaces.adfinternal.renderkit.core.CoreRenderKit
>> encodeFinally
>> > ATTENTION: No AdfRenderingContext available
>> >
>> > I haven't RI and Myfaces twice in my classpath. I think my web.xml and
>> > faces-config.xml are correct
>> > The only way to remove this error log is to use *.faces url pattern
>> but
>> > af:selectInputDate doesn't work with this pattern
>> >
>> > Thanks for help
>> >
>> > web.xml:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <web-app id="WebApp_ID" version="2.4"
>> > xmlns="http://java.sun.com/xml/ns/j2ee"
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>> >
>> > <context-param>
>> > <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>> > <param-value>client</param-value>
>> > </context-param>
>> >
>> > <context-param>
>> >
>> > <param-name>org.apache.myfaces.adf.CHANGE_PERSISTENCE</param-name>
>> > <param-value>session</param-value>
>> > </context-param>
>> >
>> > <context-param>
>> >
>> >
>> <param-name>org.apache.myfaces.adf.USE_APPLICATION_VIEW_CACHE</param-name>
>>
>> > <param-value>false</param-value>
>> > </context-param>
>> >
>> > <filter>
>> > <filter-name>adfFaces</filter-name>
>> >
>> >
>> <filter-class>org.apache.myfaces.adf.webapp.AdfFacesFilter</filter-class>
>>
>> > </filter>
>> >
>> > <filter-mapping>
>> > <filter-name>adfFaces</filter-name>
>> > <servlet-name>FacesServlet</servlet-name>
>> > </filter-mapping>
>> >
>> > <servlet>
>> > <servlet-name>FacesServlet</servlet-name>
>> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>> > </servlet>
>> > <servlet-mapping>
>> > <servlet-name>FacesServlet</servlet-name>
>> > <url-pattern>/faces/*</url-pattern>
>> > </servlet-mapping>
>> >
>> > <servlet>
>> > <servlet-name>resources</servlet-name>
>> >
>> > <servlet-class>org.apache.myfaces.adf.webapp.ResourceServlet
>> > </servlet-class>
>> > </servlet>
>> > <servlet-mapping>
>> > <servlet-name>resources</servlet-name>
>> > <url-pattern>/adf/*</url-pattern>
>> > </servlet-mapping>
>> >
>> > <welcome-file-list>
>> > <welcome-file>index.jsp</welcome-file>
>> > </welcome-file-list>
>> >
>> > <!-- Catch errors by error code, -->
>> > <!-- redirecting to the error JSP -->
>> > <error-page>
>> > <error-code>500</error-code>
>> > <location>/error.jsp</location>
>> > </error-page>
>> >
>> > <security-constraint>
>> > <display-name>
>> > Prevent access to raw JSP pages that are for JSF pages.
>> > </display-name>
>> > <web-resource-collection>
>> > <web-resource-name>Raw-JSF-JSP-Pages</web-resource-name>
>> > <!-- Add url-pattern for EACH raw JSP page -->
>> > <url-pattern>/header.jsp</url-pattern>
>> > <url-pattern>/layout.jsp</url-pattern>
>> > <url-pattern>/logon.jsp</url-pattern>
>> > <url-pattern>/menu.jsp</url-pattern>
>> > <url-pattern>/form.jsp</url-pattern>
>> > <url-pattern>/about.jsp</url-pattern>
>> > <url-pattern>/scenarii.jsp</url-pattern>
>> > </web-resource-collection>
>> > <auth-constraint>
>> > <description>No roles, so no direct access</description>
>> > </auth-constraint>
>> > </security-constraint>
>> > </web-app>
>> >
>> > faces-config.xml:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> >
>> > <!DOCTYPE faces-config PUBLIC
>> > "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
>> > "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
>> >
>> > <faces-config>
>> > <application>
>> >
>> >
>> <default-render-kit-id>org.apache.myfaces.adf.core</default-render-kit-id>
>>
>> > </application>
>> > <!--<converter>
>> > <converter-id>snpsLoginConverter</converter-id>
>> > <converter-class>
>> > com.sunopsis.lwd.converter.SnpsLoginConverter
>> > </converter-class>
>> > <converter-id>DEFAULT_CONVERTER</converter-id>
>> >
>> > <converter-class>com.sunopsis.lwd.converter.SnpsIdentityConverter
>> > </converter-class>
>> > </converter>
>> > <converter>
>> > <converter-id>TEST_MAP_CONVERTER</converter-id>
>> >
>> > <converter-class>
>> > com.sunopsis.metadata.impl.test.TestSnpsFormPropertyRendererMapCodes
>> > </converter-class>
>> > </converter-->
>> > <managed-bean>
>> > <managed-bean-name>snpsLogonBean</managed-bean-name>
>> > <managed-bean-class>
>> > com.sunopsis.lwd.model.SnpsLogonBean
>> > </managed-bean-class>
>> > <managed-bean-scope>session</managed-bean-scope>
>> > </managed-bean>
>> > <managed-bean>
>> > <description>All information needed in a
>> session.</description>
>> > <managed-bean-name>snpsWebSessionContext</managed-bean-name>
>> > <managed-bean-class>
>> > com.sunopsis.lwd.model.SnpsWebSessionContext
>> > </managed-bean-class>
>> > <managed-bean-scope>session</managed-bean-scope>
>> > </managed-bean>
>> > <managed-bean>
>> > <description>Initializes the app in the web
>> mode.</description>
>> > <managed-bean-name>snpsWebAppInitializer</managed-bean-name>
>> > <managed-bean-class>
>> > com.sunopsis.lwd.model.SnpsWebAppInitializer
>> > </managed-bean-class>
>> > <managed-bean-scope>application</managed-bean-scope>
>> > <managed-property>
>> > <property-name>skinName</property-name>
>> > <property-class>java.lang.String</property-class>
>> > <value>sunopsis</value>
>> > </managed-property>
>> > <managed-property>
>> > <property-name>version</property-name>
>> > <property-class>java.lang.String</property-class>
>> > <value>alpha 2.0</value>
>> > </managed-property>
>> > <managed-property>
>> > <property-name>textAreaRows</property-name>
>> > <property-class>int</property-class>
>> > <value>5</value>
>> > </managed-property>
>> > <managed-property>
>> > <property-name>defaultInputSizeMax</property-name>
>> > <property-class>int</property-class>
>> > <value>250</value>
>> > </managed-property>
>> > <managed-property>
>> > <property-name>sizeLongText</property-name>
>> > <property-class>int</property-class>
>> > <value>50</value>
>> > </managed-property>
>> > </managed-bean>
>> > <managed-bean>
>> > <description>Used to construct list form page</description>
>> > <managed-bean-name>formModel</managed-bean-name>
>> > <managed-bean-class>
>> > com.sunopsis.lwd.model.FormModel
>> > </managed-bean-class>
>> > <managed-bean-scope>session</managed-bean-scope>
>> > </managed-bean>
>> > <managed-bean>
>> > <managed-bean-name>
>> > snpsNotUpToDateScenariiModel</managed-bean-name>
>> > <managed-bean-class>
>> >
>> >
>> com.sunopsis.lwd.model.SnpsNotUpToDateScenariiModel</managed-bean-class>
>> > <managed-bean-scope>
>> > session</managed-bean-scope>
>> > </managed-bean>
>> > <navigation-rule>
>> > <display-name>logon</display-name>
>> > <from-view-id>/logon.jsp</from-view-id>
>> > <navigation-case>
>> > <from-outcome>ok</from-outcome>
>> > <to-view-id>/layout.jsp</to-view-id>
>> > </navigation-case>
>> > <navigation-case>
>> > <from-outcome>KO</from-outcome>
>> > <to-view-id>/logon.jsp</to-view-id>
>> > </navigation-case>
>> > </navigation-rule>
>> > <navigation-rule>
>> > <display-name>form</display-name>
>> > <from-view-id>/form.jsp</from-view-id>
>> > <navigation-case>
>> > <from-outcome>detail</from-outcome>
>> > <to-view-id>/form.jsp</to-view-id>
>> > <redirect/>
>> > </navigation-case>
>> > <navigation-case>
>> > <from-outcome>projects</from-outcome>
>> > <to-view-id>/form.jsp</to-view-id>
>> > <redirect/>
>> > </navigation-case>
>> > </navigation-rule>
>> > <navigation-rule>
>> > <display-name>menu</display-name>
>> > <from-view-id>/menu.jsp</from-view-id>
>> > <navigation-case>
>> > <from-outcome>projects</from-outcome>
>> > <to-view-id>/form.jsp</to-view-id>
>> > </navigation-case>
>> > <navigation-case>
>> > <from-outcome>logon</from-outcome>
>> > <to-view-id>/logon.jsp</to-view-id>
>> > <redirect />
>> > </navigation-case>
>> > <navigation-case>
>> > <from-outcome>about</from-outcome>
>> > <to-view-id>/about.jsp</to-view-id>
>> > </navigation-case>
>> > <navigation-case>
>> > <from-outcome>scenario</from-outcome>
>> > <to-view-id>/scenarii.jsp</to-view-id>
>> > </navigation-case>
>> > </navigation-rule>
>> > </faces-config>
>> >
>> >
>>
>>
>
Re: /faces/* url pattern : Trying to attach AdfRenderingContext to a thread that already had one
Posted by Cosma Colanicchia <co...@gmail.com>.
Make also sure you haven't registered the ADF view-handler in your
descriptors, as the ADF jar META-INF/faces-config.xml do it as well.
Cosma
2006/7/18, Adam Winer <aw...@gmail.com>:
> This would happen if you've got two copies of the adf-faces-impl
> JAR lying around on the classpath, so the ViewHandlerImpl gets
> registered twice.
>
> -- Adam
>
>
> On 7/18/06, Arnaud MERGEY <am...@sunopsis.com> wrote:
> >
> > Hi,
> >
> > I'm trying to use an <af:selectInputDate>.
> > When I click on calendar icon to select a date I'had a 404
> > _/lwd/__ADFv__.faces Not Found _error page.
> >
> > I have replaced in my web.xml Faces Servlet url pattern *.faces by
> > /faces/*.
> > Now everything works fine but now in my tomcat logs this message appears
> > again.
> >
> > ATTENTION: Trying to attach AdfRenderingContext to a thread that already
> > had one.
> > 18 juil. 2006 10:41:19
> > org.apache.myfaces.adfinternal.renderkit.core.CoreRenderKit encodeFinally
> > ATTENTION: No AdfRenderingContext available
> >
> > I haven't RI and Myfaces twice in my classpath. I think my web.xml and
> > faces-config.xml are correct
> > The only way to remove this error log is to use *.faces url pattern but
> > af:selectInputDate doesn't work with this pattern
> >
> > Thanks for help
> >
> > web.xml:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app id="WebApp_ID" version="2.4"
> > xmlns="http://java.sun.com/xml/ns/j2ee"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> >
> > <context-param>
> > <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> > <param-value>client</param-value>
> > </context-param>
> >
> > <context-param>
> >
> > <param-name>org.apache.myfaces.adf.CHANGE_PERSISTENCE</param-name>
> > <param-value>session</param-value>
> > </context-param>
> >
> > <context-param>
> >
> > <param-name>org.apache.myfaces.adf.USE_APPLICATION_VIEW_CACHE</param-name>
> > <param-value>false</param-value>
> > </context-param>
> >
> > <filter>
> > <filter-name>adfFaces</filter-name>
> >
> > <filter-class>org.apache.myfaces.adf.webapp.AdfFacesFilter</filter-class>
> > </filter>
> >
> > <filter-mapping>
> > <filter-name>adfFaces</filter-name>
> > <servlet-name>FacesServlet</servlet-name>
> > </filter-mapping>
> >
> > <servlet>
> > <servlet-name>FacesServlet</servlet-name>
> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> > </servlet>
> > <servlet-mapping>
> > <servlet-name>FacesServlet</servlet-name>
> > <url-pattern>/faces/*</url-pattern>
> > </servlet-mapping>
> >
> > <servlet>
> > <servlet-name>resources</servlet-name>
> >
> > <servlet-class>org.apache.myfaces.adf.webapp.ResourceServlet
> > </servlet-class>
> > </servlet>
> > <servlet-mapping>
> > <servlet-name>resources</servlet-name>
> > <url-pattern>/adf/*</url-pattern>
> > </servlet-mapping>
> >
> > <welcome-file-list>
> > <welcome-file>index.jsp</welcome-file>
> > </welcome-file-list>
> >
> > <!-- Catch errors by error code, -->
> > <!-- redirecting to the error JSP -->
> > <error-page>
> > <error-code>500</error-code>
> > <location>/error.jsp</location>
> > </error-page>
> >
> > <security-constraint>
> > <display-name>
> > Prevent access to raw JSP pages that are for JSF pages.
> > </display-name>
> > <web-resource-collection>
> > <web-resource-name>Raw-JSF-JSP-Pages</web-resource-name>
> > <!-- Add url-pattern for EACH raw JSP page -->
> > <url-pattern>/header.jsp</url-pattern>
> > <url-pattern>/layout.jsp</url-pattern>
> > <url-pattern>/logon.jsp</url-pattern>
> > <url-pattern>/menu.jsp</url-pattern>
> > <url-pattern>/form.jsp</url-pattern>
> > <url-pattern>/about.jsp</url-pattern>
> > <url-pattern>/scenarii.jsp</url-pattern>
> > </web-resource-collection>
> > <auth-constraint>
> > <description>No roles, so no direct access</description>
> > </auth-constraint>
> > </security-constraint>
> > </web-app>
> >
> > faces-config.xml:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <!DOCTYPE faces-config PUBLIC
> > "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
> > "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
> >
> > <faces-config>
> > <application>
> >
> > <default-render-kit-id>org.apache.myfaces.adf.core</default-render-kit-id>
> > </application>
> > <!--<converter>
> > <converter-id>snpsLoginConverter</converter-id>
> > <converter-class>
> > com.sunopsis.lwd.converter.SnpsLoginConverter
> > </converter-class>
> > <converter-id>DEFAULT_CONVERTER</converter-id>
> >
> > <converter-class>com.sunopsis.lwd.converter.SnpsIdentityConverter
> > </converter-class>
> > </converter>
> > <converter>
> > <converter-id>TEST_MAP_CONVERTER</converter-id>
> >
> > <converter-class>
> > com.sunopsis.metadata.impl.test.TestSnpsFormPropertyRendererMapCodes
> > </converter-class>
> > </converter-->
> > <managed-bean>
> > <managed-bean-name>snpsLogonBean</managed-bean-name>
> > <managed-bean-class>
> > com.sunopsis.lwd.model.SnpsLogonBean
> > </managed-bean-class>
> > <managed-bean-scope>session</managed-bean-scope>
> > </managed-bean>
> > <managed-bean>
> > <description>All information needed in a session.</description>
> > <managed-bean-name>snpsWebSessionContext</managed-bean-name>
> > <managed-bean-class>
> > com.sunopsis.lwd.model.SnpsWebSessionContext
> > </managed-bean-class>
> > <managed-bean-scope>session</managed-bean-scope>
> > </managed-bean>
> > <managed-bean>
> > <description>Initializes the app in the web mode.</description>
> > <managed-bean-name>snpsWebAppInitializer</managed-bean-name>
> > <managed-bean-class>
> > com.sunopsis.lwd.model.SnpsWebAppInitializer
> > </managed-bean-class>
> > <managed-bean-scope>application</managed-bean-scope>
> > <managed-property>
> > <property-name>skinName</property-name>
> > <property-class>java.lang.String</property-class>
> > <value>sunopsis</value>
> > </managed-property>
> > <managed-property>
> > <property-name>version</property-name>
> > <property-class>java.lang.String</property-class>
> > <value>alpha 2.0</value>
> > </managed-property>
> > <managed-property>
> > <property-name>textAreaRows</property-name>
> > <property-class>int</property-class>
> > <value>5</value>
> > </managed-property>
> > <managed-property>
> > <property-name>defaultInputSizeMax</property-name>
> > <property-class>int</property-class>
> > <value>250</value>
> > </managed-property>
> > <managed-property>
> > <property-name>sizeLongText</property-name>
> > <property-class>int</property-class>
> > <value>50</value>
> > </managed-property>
> > </managed-bean>
> > <managed-bean>
> > <description>Used to construct list form page</description>
> > <managed-bean-name>formModel</managed-bean-name>
> > <managed-bean-class>
> > com.sunopsis.lwd.model.FormModel
> > </managed-bean-class>
> > <managed-bean-scope>session</managed-bean-scope>
> > </managed-bean>
> > <managed-bean>
> > <managed-bean-name>
> > snpsNotUpToDateScenariiModel</managed-bean-name>
> > <managed-bean-class>
> >
> > com.sunopsis.lwd.model.SnpsNotUpToDateScenariiModel</managed-bean-class>
> > <managed-bean-scope>
> > session</managed-bean-scope>
> > </managed-bean>
> > <navigation-rule>
> > <display-name>logon</display-name>
> > <from-view-id>/logon.jsp</from-view-id>
> > <navigation-case>
> > <from-outcome>ok</from-outcome>
> > <to-view-id>/layout.jsp</to-view-id>
> > </navigation-case>
> > <navigation-case>
> > <from-outcome>KO</from-outcome>
> > <to-view-id>/logon.jsp</to-view-id>
> > </navigation-case>
> > </navigation-rule>
> > <navigation-rule>
> > <display-name>form</display-name>
> > <from-view-id>/form.jsp</from-view-id>
> > <navigation-case>
> > <from-outcome>detail</from-outcome>
> > <to-view-id>/form.jsp</to-view-id>
> > <redirect/>
> > </navigation-case>
> > <navigation-case>
> > <from-outcome>projects</from-outcome>
> > <to-view-id>/form.jsp</to-view-id>
> > <redirect/>
> > </navigation-case>
> > </navigation-rule>
> > <navigation-rule>
> > <display-name>menu</display-name>
> > <from-view-id>/menu.jsp</from-view-id>
> > <navigation-case>
> > <from-outcome>projects</from-outcome>
> > <to-view-id>/form.jsp</to-view-id>
> > </navigation-case>
> > <navigation-case>
> > <from-outcome>logon</from-outcome>
> > <to-view-id>/logon.jsp</to-view-id>
> > <redirect />
> > </navigation-case>
> > <navigation-case>
> > <from-outcome>about</from-outcome>
> > <to-view-id>/about.jsp</to-view-id>
> > </navigation-case>
> > <navigation-case>
> > <from-outcome>scenario</from-outcome>
> > <to-view-id>/scenarii.jsp</to-view-id>
> > </navigation-case>
> > </navigation-rule>
> > </faces-config>
> >
> >
>
>
Re: /faces/* url pattern : Trying to attach AdfRenderingContext to a thread that already had one
Posted by Adam Winer <aw...@gmail.com>.
This would happen if you've got two copies of the adf-faces-impl
JAR lying around on the classpath, so the ViewHandlerImpl gets
registered twice.
-- Adam
On 7/18/06, Arnaud MERGEY <am...@sunopsis.com> wrote:
>
> Hi,
>
> I'm trying to use an <af:selectInputDate>.
> When I click on calendar icon to select a date I'had a 404
> _/lwd/__ADFv__.faces Not Found _error page.
>
> I have replaced in my web.xml Faces Servlet url pattern *.faces by
> /faces/*.
> Now everything works fine but now in my tomcat logs this message appears
> again.
>
> ATTENTION: Trying to attach AdfRenderingContext to a thread that already
> had one.
> 18 juil. 2006 10:41:19
> org.apache.myfaces.adfinternal.renderkit.core.CoreRenderKit encodeFinally
> ATTENTION: No AdfRenderingContext available
>
> I haven't RI and Myfaces twice in my classpath. I think my web.xml and
> faces-config.xml are correct
> The only way to remove this error log is to use *.faces url pattern but
> af:selectInputDate doesn't work with this pattern
>
> Thanks for help
>
> web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
> <context-param>
> <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> <param-value>client</param-value>
> </context-param>
>
> <context-param>
>
> <param-name>org.apache.myfaces.adf.CHANGE_PERSISTENCE</param-name>
> <param-value>session</param-value>
> </context-param>
>
> <context-param>
>
> <param-name>org.apache.myfaces.adf.USE_APPLICATION_VIEW_CACHE</param-name>
> <param-value>false</param-value>
> </context-param>
>
> <filter>
> <filter-name>adfFaces</filter-name>
>
> <filter-class>org.apache.myfaces.adf.webapp.AdfFacesFilter</filter-class>
> </filter>
>
> <filter-mapping>
> <filter-name>adfFaces</filter-name>
> <servlet-name>FacesServlet</servlet-name>
> </filter-mapping>
>
> <servlet>
> <servlet-name>FacesServlet</servlet-name>
> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>FacesServlet</servlet-name>
> <url-pattern>/faces/*</url-pattern>
> </servlet-mapping>
>
> <servlet>
> <servlet-name>resources</servlet-name>
>
> <servlet-class>org.apache.myfaces.adf.webapp.ResourceServlet
> </servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>resources</servlet-name>
> <url-pattern>/adf/*</url-pattern>
> </servlet-mapping>
>
> <welcome-file-list>
> <welcome-file>index.jsp</welcome-file>
> </welcome-file-list>
>
> <!-- Catch errors by error code, -->
> <!-- redirecting to the error JSP -->
> <error-page>
> <error-code>500</error-code>
> <location>/error.jsp</location>
> </error-page>
>
> <security-constraint>
> <display-name>
> Prevent access to raw JSP pages that are for JSF pages.
> </display-name>
> <web-resource-collection>
> <web-resource-name>Raw-JSF-JSP-Pages</web-resource-name>
> <!-- Add url-pattern for EACH raw JSP page -->
> <url-pattern>/header.jsp</url-pattern>
> <url-pattern>/layout.jsp</url-pattern>
> <url-pattern>/logon.jsp</url-pattern>
> <url-pattern>/menu.jsp</url-pattern>
> <url-pattern>/form.jsp</url-pattern>
> <url-pattern>/about.jsp</url-pattern>
> <url-pattern>/scenarii.jsp</url-pattern>
> </web-resource-collection>
> <auth-constraint>
> <description>No roles, so no direct access</description>
> </auth-constraint>
> </security-constraint>
> </web-app>
>
> faces-config.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!DOCTYPE faces-config PUBLIC
> "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
> "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
>
> <faces-config>
> <application>
>
> <default-render-kit-id>org.apache.myfaces.adf.core</default-render-kit-id>
> </application>
> <!--<converter>
> <converter-id>snpsLoginConverter</converter-id>
> <converter-class>
> com.sunopsis.lwd.converter.SnpsLoginConverter
> </converter-class>
> <converter-id>DEFAULT_CONVERTER</converter-id>
>
> <converter-class>com.sunopsis.lwd.converter.SnpsIdentityConverter
> </converter-class>
> </converter>
> <converter>
> <converter-id>TEST_MAP_CONVERTER</converter-id>
>
> <converter-class>
> com.sunopsis.metadata.impl.test.TestSnpsFormPropertyRendererMapCodes
> </converter-class>
> </converter-->
> <managed-bean>
> <managed-bean-name>snpsLogonBean</managed-bean-name>
> <managed-bean-class>
> com.sunopsis.lwd.model.SnpsLogonBean
> </managed-bean-class>
> <managed-bean-scope>session</managed-bean-scope>
> </managed-bean>
> <managed-bean>
> <description>All information needed in a session.</description>
> <managed-bean-name>snpsWebSessionContext</managed-bean-name>
> <managed-bean-class>
> com.sunopsis.lwd.model.SnpsWebSessionContext
> </managed-bean-class>
> <managed-bean-scope>session</managed-bean-scope>
> </managed-bean>
> <managed-bean>
> <description>Initializes the app in the web mode.</description>
> <managed-bean-name>snpsWebAppInitializer</managed-bean-name>
> <managed-bean-class>
> com.sunopsis.lwd.model.SnpsWebAppInitializer
> </managed-bean-class>
> <managed-bean-scope>application</managed-bean-scope>
> <managed-property>
> <property-name>skinName</property-name>
> <property-class>java.lang.String</property-class>
> <value>sunopsis</value>
> </managed-property>
> <managed-property>
> <property-name>version</property-name>
> <property-class>java.lang.String</property-class>
> <value>alpha 2.0</value>
> </managed-property>
> <managed-property>
> <property-name>textAreaRows</property-name>
> <property-class>int</property-class>
> <value>5</value>
> </managed-property>
> <managed-property>
> <property-name>defaultInputSizeMax</property-name>
> <property-class>int</property-class>
> <value>250</value>
> </managed-property>
> <managed-property>
> <property-name>sizeLongText</property-name>
> <property-class>int</property-class>
> <value>50</value>
> </managed-property>
> </managed-bean>
> <managed-bean>
> <description>Used to construct list form page</description>
> <managed-bean-name>formModel</managed-bean-name>
> <managed-bean-class>
> com.sunopsis.lwd.model.FormModel
> </managed-bean-class>
> <managed-bean-scope>session</managed-bean-scope>
> </managed-bean>
> <managed-bean>
> <managed-bean-name>
> snpsNotUpToDateScenariiModel</managed-bean-name>
> <managed-bean-class>
>
> com.sunopsis.lwd.model.SnpsNotUpToDateScenariiModel</managed-bean-class>
> <managed-bean-scope>
> session</managed-bean-scope>
> </managed-bean>
> <navigation-rule>
> <display-name>logon</display-name>
> <from-view-id>/logon.jsp</from-view-id>
> <navigation-case>
> <from-outcome>ok</from-outcome>
> <to-view-id>/layout.jsp</to-view-id>
> </navigation-case>
> <navigation-case>
> <from-outcome>KO</from-outcome>
> <to-view-id>/logon.jsp</to-view-id>
> </navigation-case>
> </navigation-rule>
> <navigation-rule>
> <display-name>form</display-name>
> <from-view-id>/form.jsp</from-view-id>
> <navigation-case>
> <from-outcome>detail</from-outcome>
> <to-view-id>/form.jsp</to-view-id>
> <redirect/>
> </navigation-case>
> <navigation-case>
> <from-outcome>projects</from-outcome>
> <to-view-id>/form.jsp</to-view-id>
> <redirect/>
> </navigation-case>
> </navigation-rule>
> <navigation-rule>
> <display-name>menu</display-name>
> <from-view-id>/menu.jsp</from-view-id>
> <navigation-case>
> <from-outcome>projects</from-outcome>
> <to-view-id>/form.jsp</to-view-id>
> </navigation-case>
> <navigation-case>
> <from-outcome>logon</from-outcome>
> <to-view-id>/logon.jsp</to-view-id>
> <redirect />
> </navigation-case>
> <navigation-case>
> <from-outcome>about</from-outcome>
> <to-view-id>/about.jsp</to-view-id>
> </navigation-case>
> <navigation-case>
> <from-outcome>scenario</from-outcome>
> <to-view-id>/scenarii.jsp</to-view-id>
> </navigation-case>
> </navigation-rule>
> </faces-config>
>
>