[jboss-user] [JBoss Portal] - JSF 1.2 + Woodstock
viggo.navarsete
do-not-reply at jboss.com
Wed Jul 4 20:38:05 EDT 2007
Environment:
JBoss Portal Version: 2.6
Did you get Portal from CVS? or download it? Downloaded
JBoss AS Version: 4.2.0 GA
Database Vendor and Version: Postgres 8.1
JDBC Connector and Version: postgresql-8.1-404.jdbc3.jar
OS Platform: Ubuntu 7.0.4
Describe the problem:
I've developed a portlet which utilizes the woodstock components. I have the following code in my jsp:
<%@page contentType="text/html"%>
| <%@page pageEncoding="UTF-8"%>
|
| <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
| <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
|
| <%-- Uncomment below lines to add portlet taglibs to jsp --%>
| <%@ page import="javax.portlet.*"%>
| <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
|
| <portlet:defineObjects />
| <%PortletPreferences prefs = renderRequest.getPreferences();%>
|
| <f:view>
| <webuijsf:label id="label1" text="viggo" />
| </f:view>
The portlet deploys ok, but when I try to access it I get the following stacktrace:
| 02:19:53,900 INFO [DefaultLoadEventListener] Error performing load command
| org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jboss.portal.core.impl.model.portal.ObjectNode#38]
| at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377)
| at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:145)
| at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
| at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
| at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846)
| at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557)
| at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:196)
| at org.hibernate.cache.StandardQueryCache.get(StandardQueryCache.java:130)
| at org.hibernate.loader.Loader.getResultFromQueryCache(Loader.java:2161)
| at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2126)
| at org.hibernate.loader.Loader.list(Loader.java:2096)
| at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
| at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
| at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305)
| at org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNodeNoCache(PersistentPortalObjectContainer.java:262)
| at org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:290)
| at org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:242)
| at org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getObject(AbstractPortalObjectContainer.java:89)
| at org.jboss.portal.core.model.portal.command.PortalObjectCommand.acquireResources(PortalObjectCommand.java:68)
| at org.jboss.portal.core.model.portal.command.PortalCommand.acquireResources(PortalCommand.java:56)
| at org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:42)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
| at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:128)
| at org.jboss.portal.core.model.portal.command.render.RenderWindowCommand.render(RenderWindowCommand.java:68)
| at org.jboss.portal.core.model.portal.command.render.RenderPageCommand.execute(RenderPageCommand.java:203)
| at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
| at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:123)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.controller.ControlInterceptor.invoke(ControlInterceptor.java:57)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:118)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:77)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:50)
| at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
| at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:128)
| at org.jboss.portal.core.model.portal.PortalObjectResponseHandler.processCommandResponse(PortalObjectResponseHandler.java:74)
| at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processHandlers(ClassicResponseHandler.java:79)
| at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processCommandResponse(ClassicResponseHandler.java:53)
| at org.jboss.portal.core.controller.handler.ResponseHandlerSelector.processCommandResponse(ResponseHandlerSelector.java:72)
| at org.jboss.portal.core.controller.Controller.processCommandResponse(Controller.java:279)
| at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:267)
| at org.jboss.portal.core.controller.Controller.handle(Controller.java:226)
| at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
| at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:245)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.server.aspects.server.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:84)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:70)
| at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:131)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
| at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:380)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| 02:19:53,975 ERROR [STDERR] Jul 5, 2007 2:19:53 AM com.sun.faces.portlet.LifecycleImpl$RenderResponsePhase execute
| INFO: PS_CSFP0055:About to render view /WEB-INF/jsp/Search_view.jsp
Additional item:
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <web-app version="2.5" 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">
| <context-param>
| <param-name>com.sun.faces.verifyObjects</param-name>
| <param-value>false</param-value>
| </context-param>
| <context-param>
| <param-name>com.sun.faces.validateXml</param-name>
| <param-value>true</param-value>
| </context-param>
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
| <context-param>
| <param-name>javax.faces.application.CONFIG_FILES</param-name>
| <param-value>/WEB-INF/faces-config.xml</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>ThemeServlet</servlet-name>
| <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>
| <load-on-startup>2</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>ThemeServlet</servlet-name>
| <url-pattern>/theme/*</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>/faces/*</url-pattern>
| </servlet-mapping>
| <session-config>
| <session-timeout>
| 30
| </session-timeout>
| </session-config>
| <welcome-file-list>
| <welcome-file>faces/welcomeJSF.jsp</welcome-file>
| </welcome-file-list>
| </web-app>
portlet.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0">
|
| <portlet>
| <description>Search</description>
| <portlet-name>Search</portlet-name>
| <display-name>Search</display-name>
| <!-- You must use this Portlet implementation class -->
| <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
| <!-- This is a required parameter and must point to the first page of the JSF Application -->
| <init-param>
| <description>Portlet init view page</description>
| <name>com.sun.faces.portlet.INIT_VIEW</name>
| <value>/WEB-INF/jsp/Search_view.jsp</value>
| </init-param>
| <init-param>
| <description>Portlet init edit page</description>
| <name>com.sun.faces.portlet.INIT_EDIT</name>
| <value>/WEB-INF/jsp/Search_edit.jsp</value>
| </init-param>
| <init-param>
| <description>Portlet init help page</description>
| <name>com.sun.faces.portlet.INIT_HELP</name>
| <value>/WEB-INF/jsp/Search_help.jsp</value>
| </init-param>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| <portlet-mode>EDIT</portlet-mode>
| <portlet-mode>HELP</portlet-mode>
| </supports>
| <portlet-info>
| <title>Search</title>
| <short-title>Search</short-title>
| </portlet-info>
| </portlet>
| </portlet-app>
jars bundled in war file:
appbase.jar
commons-fileupload.jar
dataprovider.jar
dojo-0.4.3-ajax.jar
jsfcl.jar
jsf-extentions-common-0.1.jar
jsf-extentions-dynamic-faces-0.1.jar
jsf-portlet.jar
json.jar
prototype-1.5.0.jar
webui-jsf.jar
Questions:
1. How do I add support for woodstock in my portlet? (am I doing it correctly?)
2. How do I use a woodstock component correctly in my portlet jsp's?
Many thanks in advance:)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060612#4060612
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060612
More information about the jboss-user
mailing list