voyent
Error calling backing bean for tree  XML
Forum Index -> JBoss Seam Integration
Author Message
diablo341

Joined: 12/Nov/2006 00:00:00
Messages: 11
Offline


I'm working through the tree tutorial. I created my backing bean, which is a SFSB in Seam. I added the code to my view and get the following error:
Code:
14:09:11,107 ERROR [STDERR] java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
 14:09:11,107 ERROR [STDERR]     at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:427)
 14:09:11,107 ERROR [STDERR]     at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:66)
 14:09:11,157 ERROR [STDERR]     at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
 14:09:11,157 ERROR [STDERR]     at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:209)
 14:09:11,157 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulContainer.createSession(StatefulContainer.java:229)
 14:09:11,157 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulLocalProxyFactory.createProxy(StatefulLocalProxyFactory.java:100)
 14:09:11,157 ERROR [STDERR]     at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
 14:09:11,157 ERROR [STDERR]     at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
 14:09:11,157 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
 14:09:11,157 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
 14:09:11,157 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
 14:09:11,157 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
 14:09:11,157 ERROR [STDERR]     at javax.naming.InitialContext.lookup(InitialContext.java:351)
 14:09:11,157 ERROR [STDERR]     at org.jboss.seam.Component.instantiateSessionBean(Component.java:992)
 14:09:11,157 ERROR [STDERR]     at org.jboss.seam.Component.instantiate(Component.java:979)
 14:09:11,157 ERROR [STDERR]     at org.jboss.seam.Component.newInstance(Component.java:1658)
 14:09:11,157 ERROR [STDERR]     at org.jboss.seam.Component.getInstance(Component.java:1576)
 14:09:11,157 ERROR [STDERR]     at org.jboss.seam.Component.getInstance(Component.java:1550)
 14:09:11,157 ERROR [STDERR]     at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:45)
 14:09:11,157 ERROR [STDERR]     at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
 14:09:11,157 ERROR [STDERR]     at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
 14:09:11,157 ERROR [STDERR]     at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
 14:09:11,157 ERROR [STDERR]     at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
 14:09:11,157 ERROR [STDERR]     at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
 14:09:11,157 ERROR [STDERR]     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
 14:09:11,157 ERROR [STDERR]     at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.component.tree.TreeRenderer.encodeBegin(TreeRenderer.java:140)
 14:09:11,157 ERROR [STDERR]     at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:339)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:97)
 14:09:11,157 ERROR [STDERR]     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:537)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:274)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
 14:09:11,157 ERROR [STDERR]     at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
 14:09:11,157 ERROR [STDERR]     at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:392)
 14:09:11,167 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 14:09:11,167 ERROR [STDERR]     at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 14:09:11,167 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 14:09:11,167 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
 14:09:11,167 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 14:09:11,167 ERROR [STDERR]     at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 14:09:11,167 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 14:09:11,167 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 14:09:11,167 ERROR [STDERR]     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 14:09:11,167 ERROR [STDERR]     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 14:09:11,167 ERROR [STDERR]     at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
 14:09:11,167 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)
 14:09:11,167 ERROR [STDERR] Caused by: java.lang.reflect.InvocationTargetException
 14:09:11,167 ERROR [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 14:09:11,167 ERROR [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 14:09:11,167 ERROR [STDERR]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 14:09:11,167 ERROR [STDERR]     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
 14:09:11,167 ERROR [STDERR]     at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:415)
 14:09:11,167 ERROR [STDERR]     ... 66 more
 14:09:11,167 ERROR [STDERR] Caused by: java.lang.NoClassDefFoundError: com/icesoft/faces/component/tree/IceUserObject
 14:09:11,167 ERROR [STDERR]     at com.halliburton.workforce.TreeBeanAction.<init>(TreeBeanAction.java:54)
 14:09:11,167 ERROR [STDERR]     ... 71 more
 14:09:11,167 ERROR [D2DFaceletViewHandler] Problem in renderResponse: Could not instantiate Seam component: treeBean
 org.jboss.seam.InstantiationException: Could not instantiate Seam component: treeBean
         at org.jboss.seam.Component.newInstance(Component.java:1662)
         at org.jboss.seam.Component.getInstance(Component.java:1576)
         at org.jboss.seam.Component.getInstance(Component.java:1550)
         at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:45)
         at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
         at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
         at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
         at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
         at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
         at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
         at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
         at com.icesoft.faces.component.tree.TreeRenderer.encodeBegin(TreeRenderer.java:140)
         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512)
         at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:339)
         at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:97)
         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:537)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:274)
         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:392)
         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: javax.naming.NamingException: Could not dereference object [Root exception is javax.ejb.EJBException: java.lang.RuntimeException: java.lang
 .reflect.InvocationTargetException]
         at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at org.jboss.seam.Component.instantiateSessionBean(Component.java:992)
         at org.jboss.seam.Component.instantiate(Component.java:979)
         at org.jboss.seam.Component.newInstance(Component.java:1658)
         ... 51 more
 Caused by: javax.ejb.EJBException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
         at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:225)
         at org.jboss.ejb3.stateful.StatefulContainer.createSession(StatefulContainer.java:229)
         at org.jboss.ejb3.stateful.StatefulLocalProxyFactory.createProxy(StatefulLocalProxyFactory.java:100)
         at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
         at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
         ... 57 more
 Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
         at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:427)
         at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:66)
         at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
         at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:209)
         ... 63 more
 Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:415)
         ... 66 more
 Caused by: java.lang.NoClassDefFoundError: com/icesoft/faces/component/tree/IceUserObject
         at com.halliburton.workforce.TreeBeanAction.<init>(TreeBeanAction.java:54)
         ... 71 more


Any ideas? I've got the 3 ICE jars in my web-inf/lib folder of my project.

Thanks,
John
[Email]
diablo341

Joined: 12/Nov/2006 00:00:00
Messages: 11
Offline


I noticed the line:
Code:
14:09:11,167 ERROR [D2DFaceletViewHandler] Problem in renderResponse: Could not instantiate Seam component: treeBean

I'm using Seam. I recall when I was first configuring my setup, I got an exception that it couldn't find the D2DSeamFaceletViewHandler class. I downloaded the proper icefaces.jar file and got it working. Is the right DOM handler being called above?

John
[Email]
diablo341

Joined: 12/Nov/2006 00:00:00
Messages: 11
Offline


I realized that the icefaces-comps.jar has to be in my jar file with my classes. Now I get the following error:
Code:
02:09:03,213 ERROR [D2DFaceletViewHandler] Problem in renderResponse: com.icesoft.faces.component.tree.IceUserObject
 java.lang.ClassCastException: com.icesoft.faces.component.tree.IceUserObject
         at com.icesoft.faces.component.tree.TreeRenderer.encodeNode(TreeRenderer.java:358)
         at com.icesoft.faces.component.tree.TreeRenderer.encodeParentAndChildNodes(TreeRenderer.java:285)
         at com.icesoft.faces.component.tree.TreeRenderer.encodeChildren(TreeRenderer.java:238)
         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
         at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:341)
         at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:97)
         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:537)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
         at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:274)
         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:392)
         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)

It seems to me that the code inside the <ice:treeNode> tag is where the problem is happening.
Code:
<ice:tree id="tree"
                       value="#{treeBean.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>

Is the error caused by the item.userObject references above? Has anyone had this type of error?

Any help is appreciated.
[Email]
diablo341

Joined: 12/Nov/2006 00:00:00
Messages: 11
Offline


I need some help here. I'm stuck on getting the basic example working. Why is a classcastexception thrown when trying to access the userobject attached to the defaultmutabletreenode? The userObject field can be any object, so I'm thinking the <ice:treeNode> tag is where the problem is happening. Is this caused by my use of MyFaces vs. Sun's JSF RI? I need some direction here!!!

John
[Email]
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi John,

The userObject in our Tree implementation, unlike the userObject in the Swing tree model, has to be a IceUserObject class or its subclass. If you take a look at the Component Showcase source of com.icesoft.icefaces.samples.showcase.components.tree.NodeUserObject, which subclasses the IceUserObject, you'll see what the sort of functionality is.

Thanks,
Philip


.
diablo341

Joined: 12/Nov/2006 00:00:00
Messages: 11
Offline


I'm using the basic example from the tree tutorial. I've got my backing bean, which is a SFSB:
Code:
package com.halliburton.workforce;
 
 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("treeBean")
 public class TreeBeanAction implements TreeBean {
 
 	@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 xhtml page:
Code:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <ui:composition xmlns="http://www.w3.org/1999/xhtml"
 	    		xmlns:ui="http://java.sun.com/jsf/facelets"
 	  			xmlns:h="http://java.sun.com/jsf/html"
 	  			xmlns:f="http://java.sun.com/jsf/core"
 	  			xmlns:s="http://jboss.com/products/seam/taglib"
                 xmlns:ice="http://www.icesoft.com/icefaces/component"
 				template="template.xhtml">
 
 <!-- content -->
 <ui:define name="content">
 
 	<div class="section">
 		<h1>Tree Hierarchy</h1>
 	</div>
 
 	<div class="section">
 		<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="#{treeBean.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>
 
 	</div>
 
 </ui:define>
 </ui:composition>

Shouldn't this work without any modifications??
[Email]
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi John,

This sounds similar to a few other issues we're having with Seam. It seems that the IceUserObject loaded by the EJB in one classloader doesn't agree with the class loaded by the renderkit, which uses a different classloader. I've passed this issue on to our Seam-integration developers, and we'll keep you updated.

Thanks,
Philip

.
atzbert

Joined: 11/Dec/2006 00:00:00
Messages: 13
Offline


I am experiencing the same problem. Any news here? Some sort of work around or anything?
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi,

Try using the JBossWebLoader setting. Check out this posting.

Thanks,
Philip

.
atzbert

Joined: 11/Dec/2006 00:00:00
Messages: 13
Offline


After struggling with the right placement of various jar files I got it running. Thanks a lot!!
vkovalyuk

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


Could you explain what is the cause of the following NPE:

I had a look at tree-selection-tutorial and realized that it uses Sun JSF implementation.
My project (that was created by seam-gen) uses MyFaces implementation.
Could it be the cause of the problem?

19:12:21,092 ERROR [D2DFaceletViewHandler] Problem in renderResponse: null
java.lang.NullPointerException
at com.icesoft.faces.component.tree.TreeRenderer.encodeChildren(TreeRenderer.java:225)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:341)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:97)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:531)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:273)
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(Unknown Source)
uwildner

Joined: 16/Jan/2007 00:00:00
Messages: 2
Offline


Same problem with Sun Creator 2.1.
I just installed the 1.5.2 framework version and the problem is still persisting.

Description:
I can drop a tree onto the JSP page.
When I change the value binding from the DefaultTreeModel
to the Beans defined model:DefaultTreeModel the GUI builder barfs.

This looks very much like a tool integration problem to me.

java.lang.NullPointerException
at com.icesoft.faces.component.tree.TreeRenderer.encodeChildren(TreeRenderer.java:225)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:341)
at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:197)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
 
[Email]
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi,

Well, it looks like it's complaining that the treeModel is null. How did you change the binding from the DefaultTreeModel? What did you change it to?

Thanks,
Philip

.
uwildner

Joined: 16/Jan/2007 00:00:00
Messages: 2
Offline


After quickly realising that changing the jsp tags is quite risky in Creator since the java code does not get synchronously updated with it
I continued working in the design view only.

I opened the property page of the tree node and changed the assignment from the defaultTree.model to my treeBean.model.
(3 levels deep with 4 children on each node)
Immediately the display barfed as mentioned before.

I am suspecting that some other properties are needed for this other than the swing treemodel which is supplied by the bean.
I was looking at the com.icesoft.faces.components.jsfcl.data.DefaultTree class. I did not find any documentation so I had to decompile it to find extra properties other than the model in it. Are those needed by creator to make the GUI builder work?

In the running application my swing tree model is working fine!!


Regards,
UV
[Email]
frank.ye

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


In the design view,
com.icesoft.faces.components.jsfcl.data.DefaultTree

is created by using design time API:
http://developers.sun.com/prodtech/javatools/jscreator/reference/docs/apis/

the bean has to create as Design Bean inside IDE where you could see it in the outline view.

If only change the tree model, it is possible by writing some code in the Java Source code view.

You could add your tree class like following and using the same format.


private DefaultTree tree1Model = new DefaultTree();

public DefaultTree getTree1Model() {
return tree1Model;
}

public void setTree1Model(DefaultTree dt) {
this.tree1Model = dt;
}

also change the following in JSP page

value="#{Page1.tree1Model.model}" var="item"


You might need to save the page and close the project. and reopen it again.
[Email]
 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team