voyent
Exception running the .portal on the weblogic portal server 10.3.2 using jsf-portlet using icefaces  XML
Forum Index -> Portals & Portlets
Author Message
sunilk

Joined: 11/Mar/2010 00:00:00
Messages: 2
Offline


Hi Dery,

This are the below file that i have included in the porject.


login.jspx





<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component">

<jsp:directive.page contentType="text/html;charset=utf-8" />

<f:view>
<ice:outputDeclaration doctypeRoot="HTML"
doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />
<html>
<head>
<title>ICEfaces,Login Portlet</title>
<link rel="stylesheet" type="text/css"
href="./xmlhttp/css/rime/rime.css" />
</head>
<body>
<ice:portlet>
<ice:outputText value="Welcome to ICEfaces." />
<ice:form>
<ice:outputText value="Username" />
<ice:inputText id="name_t" value="#{Login.userName}"></ice:inputText>
<ice:outputText value="Password"/>
<ice:inputText id="password_t" value="#{Login.password}"></ice:inputText>
<ice:commandButton action="#{Login.checkUserPass}" value="OK"></ice:commandButton>
</ice:form>
</ice:portlet>
</body>
</html>
</f:view>
</jsp:root>










web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name></display-name>


<context-param>
<param-name>javax.faces.application.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param><!--

<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.iface</param-value>
</context-param>



--><context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.compressResources</param-name>
<param-value>true</param-value>
</context-param>

<!-- Specifies to the ICEfaces framework that synchronous update mode is to be
used. By default, ICEfaces uses asynchronous update mode to support
server-initiated updates (AJAX push). Setting to true will enable
synchronous update mode and disable AJAX push features. -->
<context-param>
<param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>true</param-value>
</context-param>

<!-- Specifies to the ICEfaces framework whether to support multiple views of a
single application from the same browser. When running in a Portlet
environment, this parameter must be set to true. -->
<context-param>
<param-name>com.icesoft.faces.concurrentDOMViews</param-name>
<param-value>true</param-value>
</context-param>

<!-- <context-param>
<param-name>com.icesoft.faces.compressResources</param-name>
<param-value>false</param-value>
</context-param>
-->
<!-- Specifies the amount of time in milliseconds that the bridge will wait for
a response from the server for a user-initiated request before declaring
the connection lost. Un-comment and change the default value, if necessary.
<context-param>
<param-name>com.icesoft.faces.connectionTimeout</param-name>
<param-value>60000</param-value>
</context-param>
-->

<!-- Specifies the amount of time in milliseconds that an idle asynchronous
blocking connection should be held open before being released. Normally,
the blocking connection is closed and re-opened with every communication to
the browser, such as user interaction or a heartbeat ping. The purpose of
this setting is to remove the possibility of threads being held blocked for
a long duration on a dead or completely inactive client connection. This
value should be longer than the heartbeat interval to avoid unnecessary
network traffic. Un-comment and change the default value, if necessary.
<context-param>
<param-name>com.icesoft.faces.blockingConnectionTimeout</param-name>
<param-value>90000</param-value>
</context-param>
-->

<!-- Specifies the amount of time in milliseconds between heartbeat messages.
Un-comment and change the default value, if necessary.
<context-param>
<param-name>com.icesoft.faces.heartbeatInterval</param-name>
<param-value>50000</param-value>
</context-param>
-->

<!-- Specifies how many consecutive heartbeat connection attempts may fail
before the connection is considered lost. Un-comment and change the
default value, if necessary.
<context-param>
<param-name>com.icesoft.faces.heartbeatRetries</param-name>
<param-value>3</param-value>
</context-param>
-->

<!-- Specifies the number of milliseconds that a heartbeat request waits for a
successful response before it is considered timed out. Un-comment and
change the default value, if necessary.
<context-param>
<param-name>com.icesoft.faces.heartbeatTimeout</param-name>
<param-value>30000</param-value>
</context-param>
-->

<!-- Specifies a page URI to redirect the client to when an asynchronous
connection is lost. The parameter value must be surrounded by single
quotes. Un-comment and change the default value, if necessary.
<context-param>
<param-name>com.icesoft.faces.connectionLostRedirectURI</param-name>
<param-value></param-value>
</context-param>
-->
<!-- We do, however, recommend deploying the Push Server even with only one asynchronous ICEfaces application deployed, to handle the case when another asynchronous ICEfaces application might be deployed in the future. If you're not planning on have an additional application deployed, you could tell your current asynchronous ICEfaces application to skip auto-detection and use normal Push without using the Push Server by adding the following to your application's web.xml: -->
<context-param>
<param-name>com.icesoft.faces.blockingRequestHandler</param-name>
<param-value>icefaces</param-value>
</context-param>

<!-- ConfigureListener is not generally required. Due to an apparent bug in
Tomcat users have reported seeing the following error "SEVERE: ICEfaces
could not initialize JavaServer Faces. Please check that the JSF .jar files
are installed correctly.". Specifying the ConfigureListener resolves the
issue.


<listener>
<listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
</listener>


<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>



-->
<listener>
<listener-class>
com.icesoft.faces.util.event.servlet.ContextEventRepeater
</listener-class>
</listener>



<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>false</param-value>
</context-param>


<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>Blocking Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>Persistent Faces Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

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

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.iface</url-pattern>
</servlet-mapping>


<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>



<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>


<welcome-file-list>
<welcome-file>login.iface</welcome-file>
</welcome-file-list>
</web-app>


faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<faces-config
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-facesconfig_1_2.xsd"
version="1.2">

<application>
<view-handler>
com.icesoft.faces.facelets.D2DFaceletViewHandler
</view-handler>

<locale-config>
<supported-locale>de</supported-locale>
<supported-locale>en</supported-locale>
</locale-config>

</application>

<managed-bean>
<managed-bean-name>Login</managed-bean-name>
<managed-bean-class>com.pack.login.Login</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>userName</property-name>
<property-class>java.lang.String</property-class>
<value></value>
</managed-property>
<managed-property>
<property-name>password</property-name>
<property-class>java.lang.String</property-class>
<value></value>
</managed-property>
</managed-bean>

<navigation-rule>
<from-view-id>/login.jspx</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/success.iface</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/failure.iface</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>


portlet.xml

<?xml version="1.0" encoding="UTF-8"?>

<faces-config
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-facesconfig_1_2.xsd"
version="1.2">

<application>
<view-handler>
com.icesoft.faces.facelets.D2DFaceletViewHandler
</view-handler>

<locale-config>
<supported-locale>de</supported-locale>
<supported-locale>en</supported-locale>
</locale-config>

</application>

<managed-bean>
<managed-bean-name>Login</managed-bean-name>
<managed-bean-class>com.pack.login.Login</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>userName</property-name>
<property-class>java.lang.String</property-class>
<value></value>
</managed-property>
<managed-property>
<property-name>password</property-name>
<property-class>java.lang.String</property-class>
<value></value>
</managed-property>
</managed-bean>

<navigation-rule>
<from-view-id>/login.jspx</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/success.iface</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/failure.iface</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>


Login.java

package com.pack.login;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;


public class Login {

public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
private String userName;
private String password;



public String checkUserPass(){

FacesContext facesContext = FacesContext.getCurrentInstance();

if("icefaces".equals(getUserName()) && "icefaces".equals(getPassword())) {
return"success";
}
FacesMessage facesMessage = new FacesMessage(
"You have entered an invalid user name and/or password");
facesContext.addMessage("Login", facesMessage);

return "failure";

}


}



What are the classes or interfaces that we need to use to render the content and to the process the action in jsf-portlet + icefaces libraris + weblogic portal server 10.3.2


I have created the .portal file and i have included the instance of the .portlet file in the portal page. When i run .portal file on the server it will throw the below exception.

<Warning> <netuix> <BEA-423319> <A default JSP response character encoding was not found for webapp [/Portal]. Defaulting to [UTF-8]. You can override this default response character encoding for all portals in netuix-config.xml or for each portal or desktop in each portal or desktop definition.>
12, 2010 9:57:05 AM com.sun.faces.lifecycle.Phase doPhase
SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /login.jspx) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@18fddac]
<Error> <netuix> <BEA-423405> <An exception [java.lang.NullPointerException] was thrown while rendering the content at [/login.jspx].
javax.faces.FacesException: java.lang.NullPointerException
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(FacesContentStubImpl.java:354)
at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(FacesContent.java:424)
at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
Truncated. see log file for complete stacktrace

Caused By: java.lang.NullPointerException
at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:188)
at com.icesoft.faces.renderkit.D2DRenderKit.createResponseWriter(D2DRenderKit.java:87)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:194)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
at org.apache.myfaces.portlet.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:257)
Truncated. see log file for complete stacktrace
>
<Error> <netuix> <BEA-423137> <There was an error loading the requested URI /login.jspx.>


Login Error opening /login.jspx.
The source of this error is:
javax.faces.FacesException: java.lang.NullPointerException
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(FacesContentStubImpl.java:354)
at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(FacesContent.java:424)
at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326)
at com.bea.netuix.nf.UIControl.render(UIControl.java:582)
at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:488)
at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:152)
at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63)
at jsp_servlet._framework._skeletons._bighorn.__flowlayout._jspService(__flowlayout.java:175)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
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.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:429)
at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:148)
at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72)
at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65)
at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:168)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291)
at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:231)
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:216)
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275)
at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:719)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
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:56)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.NullPointerException
at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:188)
at com.icesoft.faces.renderkit.D2DRenderKit.createResponseWriter(D2DRenderKit.java:87)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:194)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
at org.apache.myfaces.portlet.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:257)
at com.bea.portlet.adapter.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:77)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
... 71 more



Regards,
Sunil.
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


These two lines:
Code:
...
 at org.apache.myfaces.portlet.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:257) 
 at com.bea.portlet.adapter.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:77) 
 ...
 


indicate that you have the MyFaces JSF Portlet Bridge and perhaps a WebLogic portlet bridge libraries in your project. ICEfaces won't run with other, platform specific, portlet bridges. You'll likely need to remove a couple of .jar files from your project.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team