voyent
JBoss Seam + Tree Tutorial  XML
Forum Index -> JBoss Seam Integration
Author Message
gector

Joined: 15/Dec/2006 00:00:00
Messages: 27
Offline


I am trying to get the Tree Tutorial to work with Seam 1.1, I have already
changed:

attribute name="UseJBossWebLoader">true</attribute>

However, I still get the following error:

2006-12-21 17:14:55,109 ERROR [com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet] Exception executing lifecycle or setting up persistent context. Can't find stream for /styleTree.jsp

javax.faces.FacesException: Can't find stream for /styleTree.jsp

at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:472)

at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)

at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)

at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:390)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)

at java.lang.Thread.run(Thread.java:595)

Caused by: java.lang.NullPointerException

at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:462)

... 26 more

2006-12-21 17:14:55,109 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}

2006-12-21 17:14:55,109 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@322394, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@5db8ff{ url=null ,addedOrder=0}

2006-12-21 17:14:55,125 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@322394, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@3f472b{ url=null ,addedOrder=0}

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.contexts.Lifecycle] After request, destroying contexts

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing session context

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.EVENT

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.contexts.Contexts] destroying: servletkey

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.manager

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.EVENT

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request

2006-12-21 17:14:55,125 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception handled by Seam

javax.servlet.ServletException: Can't find stream for /styleTree.jsp

at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:437)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)

at java.lang.Thread.run(Thread.java:595)

2006-12-21 17:14:55,125 DEBUG [org.jboss.seam.servlet.SeamExceptionFilter] ended request

2006-12-21 17:14:55,125 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/cppms].[Persistent Faces Servlet]] Servlet.service() for servlet Persistent Faces Servlet threw exception

javax.faces.FacesException: Can't find stream for /styleTree.jsp

at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:472)

at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)

at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)

at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:390)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)

at java.lang.Thread.run(Thread.java:595)

Caused by: java.lang.NullPointerException

at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:462)

... 26 more

I am NOT using facelets, does this make a difference? Any ideas?

Here's the page code:

package gov.dot.marad.business.ejb;

import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.FacesMessages;
import org.jboss.seam.log.Log;

import com.icesoft.faces.component.tree.IceUserObject;

/**
* <p/>
* A basic backing bean for a ice:tree component. The only instance variable
* needed is a DefaultTreeModel Object which is bound to the icefaces tree
* component in the jspx code.</p>
* <p/>
* The tree created by this backing bean is used to control the selected
* panel in a ice:panelStack.
* </p>
*/
@Stateful
@Scope(ScopeType.SESSION)
@Name("tree")
public class TreeBeanAction implements NavigationTree {

@PersistenceContext
private EntityManager em;

@In(create = true)
private transient FacesMessages facesMessages;

@Logger
private Log log;

// tree default model, used as a value for the tree component
private DefaultTreeModel model;

// default node icons for xp thme
private static final String XP_BRANCH_CONTRACTED_ICON = "./xmlhttp/css/xp/css-images/tree_folder_open.gif";
private static final String XP_BRANCH_EXPANDED_ICON = "./xmlhttp/css/xp/css-images/tree_folder_close.gif";
private static final String XP_BRANCH_LEAF_ICON = "./xmlhttp/css/xp/css-images/tree_document.gif";

public TreeBeanAction() {
// create root node with its children expanded
DefaultMutableTreeNode rootTreeNode = new DefaultMutableTreeNode();
IceUserObject rootObject = new IceUserObject(rootTreeNode);
rootObject.setText("Root Node");
rootObject.setExpanded(true);
rootObject.setBranchContractedIcon(XP_BRANCH_CONTRACTED_ICON);
rootObject.setBranchExpandedIcon(XP_BRANCH_EXPANDED_ICON);
rootObject.setLeafIcon(XP_BRANCH_LEAF_ICON);
rootTreeNode.setUserObject(rootObject);

//model is accessed by by the ice:tree component
model = new DefaultTreeModel(rootTreeNode);

// add some child notes
for (int i = 0; i < 3; i++) {
DefaultMutableTreeNode branchNode = new DefaultMutableTreeNode();
IceUserObject branchObject = new IceUserObject(branchNode);
branchObject.setText("node-" + i);
branchObject.setBranchContractedIcon(XP_BRANCH_CONTRACTED_ICON);
branchObject.setBranchExpandedIcon(XP_BRANCH_EXPANDED_ICON);
branchObject.setLeafIcon(XP_BRANCH_LEAF_ICON);
branchNode.setUserObject(branchObject);
rootTreeNode.add(branchNode);
// add some more sub children
for (int k = 0; k < 2; k++) {
DefaultMutableTreeNode subBranchNode = new DefaultMutableTreeNode();
IceUserObject subBranchObject = new IceUserObject(subBranchNode);
subBranchObject.setText("sub-node-" + i + "-" + k);
subBranchObject.setBranchContractedIcon(XP_BRANCH_CONTRACTED_ICON);
subBranchObject.setBranchExpandedIcon(XP_BRANCH_EXPANDED_ICON);
subBranchObject.setLeafIcon(XP_BRANCH_LEAF_ICON);
subBranchNode.setUserObject(subBranchObject);
branchNode.add(subBranchNode);
}
}
}

/**
* Gets the tree's default model.
*
* @return tree model.
*/
public DefaultTreeModel getModel() {
return model;
}

@Destroy
@Remove
public void destroy() {
}
}

and the jsp:

<f:view xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component">

<ice:outputDeclaration doctypeRoot="HTML"
doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
doctypeSystem="http://www.w3.org/TR/html4/loose.dtd"/>

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"></meta>
<title>Tree Component Tutorial</title>
<link href="./xmlhttp/css/xp/xp.css" rel="stylesheet"
type="text/css"/>
</head>

<body>
<h2>Tree Style Example</h2>
<ice:form>

<!-- first column, for tree navigation -->
<ice:panelGroup style="border: 1px solid gray; height: 300px;">
<!--
Fully styled Xp themed tree.
-->
<ice:tree id="tree"
value="#{tree.model}"
var="item"
hideRootNode="false"
hideNavigation="false"
imageDir="./xmlhttp/css/xp/css-images/">
<ice:treeNode>
<f:facet name="icon">
<ice:panelGroup style="display: inline">
<h:graphicImage value="#{item.userObject.icon}"/>
</ice:panelGroup>
</f:facet>
<f:facet name="content">
<ice:panelGroup style="display: inline">
<ice:commandLink
value="#{item.userObject.text}"/>
</ice:panelGroup>
</f:facet>
</ice:treeNode>
</ice:tree>
</ice:panelGroup>

</ice:form>
</body>
</html>
</f:view>

Any help would be appreciated.
gector

Joined: 15/Dec/2006 00:00:00
Messages: 27
Offline


Uh, nevermind I found my problem. The page is styledTree not styleTree
 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team