This discussion is archived
2 Replies Latest reply: Feb 10, 2009 5:16 AM by 652708 RSS

Exception while accesing a sample page

652708 Newbie
Currently Being Moderated
Hi,

Please help me in deploying and accessing an application in WebLogic Server 10.3 (Standalone).

Steps that I followed in deploying:

I had downloaded a sample Triniad application from MyFaces Trinidad website. eg: blank.war

Deployed the war file on WebLogic Server 10.3 through WebLogic Server Administration Console. But, when I'm tring to access the page- http://140.84.129.205:7001/blank/faces/page1.jspx
it's throwing me following exception.

I've added Exception and Faces-config.xml file and web.xml file contents also.. Can you please point out what I have skipped. Thanks in advance.

Error 500--Internal Server Error

java.lang.UnsupportedOperationException
+     at javax.faces.context.ExternalContext.setRequest(ExternalContext.java:368)+
+     at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._isSetRequestBugPresent(GlobalConfiguratorImpl.java:543)+
+     at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.getExternalContext(GlobalConfiguratorImpl.java:325)+
+     at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.(FacesContextFactoryImpl.java:86)+
+     at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64)+
+     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:260)+
+     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)+
+     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)+
+     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)+
+     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)+
+     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)+
+     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238)+
+     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195)+
+     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)+
+     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)+
+     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)+
+     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)+
+     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)+
+     at weblogic.security.service.SecurityManager.runAs(Unknown Source)+
+     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)+
+     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)+
+     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)+
+     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)+
+     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)+



Contents of faces-config.xml file is :



<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
     
-->
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd" >
<faces-config>

<application>
<!-- Use the Trinidad RenderKit -->
<default-render-kit-id>
org.apache.myfaces.trinidad.core
</default-render-kit-id>
</application>

<!-- Global preferences object that proxies to others -->
<managed-bean>
<managed-bean-name>helloWorldBacking</managed-bean-name>
<managed-bean-class>
org.apache.myfaces.trinidad.blank.HelloWorldBacking
</managed-bean-class>
<managed-bean-scope>
request
</managed-bean-scope>
</managed-bean>

<!-- navigation rules for index.jspx -->
<navigation-rule>
<from-view-id>/page1.jspx</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/page2.jspx</to-view-id>
</navigation-case>
</navigation-rule>
     
<!-- navigation rules for page2.jspx -->
<navigation-rule>
<from-view-id>/page2.jspx</from-view-id>
<navigation-case>
<from-outcome>back</from-outcome>
<to-view-id>/page1.jspx</to-view-id>
</navigation-case>
</navigation-rule>

</faces-config>


Contents of Web.xml file is :*


<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
     
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<!-- Use client-side state saving. In Trinidad, it is an
optimized, token-based mechanism that is almost always a
better choice than the standard JSF server-side state saving. -->
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
<!--param-value>server</param-value-->
</context-param>

<!-- Trinidad by default uses an optimized client-side state saving
mechanism. To disable that, uncomment the following -->
<!--context-param>
<param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>
<param-value>all</param-value>
</context-param-->

<!-- Trinidad also supports an optimized strategy for caching some
view state at an application level, which significantly improves
scalability. However, it makes it harder to develop (updates to
pages will not be noticed until the server is restarted), and in
some rare cases cannot be used for some pages (see Trinidad
documentation for more information) -->
<context-param>
<param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
<param-value>false</param-value>
</context-param>

<!-- If this parameter is enabled, Trinidad will automatically
check the modification date of your JSPs, and discard saved
state when they change; this makes development easier,
but adds overhead that should be avoided when your application
is deployed -->
<context-param>
<param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
<param-value>true</param-value>
</context-param>

<!-- Enables Change Persistence at a session scope. By default,
Change Persistence is entirely disabled. The ChangeManager is
an API, which can persist component modifications (like,
is a showDetail or tree expanded or collapsed). For providing
a custom Change Persistence implementation inherit from the
Trinidad API's ChangeManager class. As the value you have
to use the fullqualified class name. -->
<context-param>
<param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
<param-value>session</param-value>
</context-param>

<filter>
<filter-name>trinidad</filter-name>
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>trinidad</filter-name>
<servlet-name>faces</servlet-name>
</filter-mapping>

<!-- Faces Servlet -->
<servlet>
<servlet-name>faces</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>

<!-- resource loader servlet -->
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
</servlet>

<!-- Faces Servlet Mappings -->
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/adf/*</url-pattern>
</servlet-mapping>


<!-- Welcome Files -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

</web-app>



Thanks
- Sukumar

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points