voyent
does <ace:tree> work with JBoss 7.1.1  XML
Forum Index -> General Help
Author Message
ianfeldberg

Joined: 04/Oct/2012 20:51:42
Messages: 16
Offline


I've been trying to debug an <ace:tree> component that was working on Glassfish but now shows up empty in JBoss. No matter what I put in the <ice:node> element the tree never shows up. I eventually gave up and just tried the <ace:tree> example in the IceFaces Showcase and it's still empty!

We're using JBoss 7.1.1, IceFaces 3.3.0 and Mojarra 2.1.7.

Help!
ted.goddard

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


If you run the complete showcase.war from the bundle, does the tree still show up empty? Any other components that fail in that case?
[Email]
ianfeldberg

Joined: 04/Oct/2012 20:51:42
Messages: 16
Offline


ted.goddard wrote:
If you run the complete showcase.war from the bundle, does the tree still show up empty? Any other components that fail in that case? 


Unfortunately I'm on a computer not connected to the Internet so I typed in the JSF page and TreeBean.java file by hand. I can tell that my tree of DefaultMutableTreeNode's is getting populated so I really don't know what's happening. If I put in an <ace:node> not only does the tree come up null but no component at all is drawn. No stacktrace is coming out though. I've pared down the <ace:tree> element to only contain id, value, expansion(true) and var attributes. Do I need to have more?
ted.goddard

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


As the simplest possible test, I would try adding an h:outputText to the page to see if it shows up, next try with something else simple like ace:pushButton.
[Email]
ianfeldberg

Joined: 04/Oct/2012 20:51:42
Messages: 16
Offline


ted.goddard wrote:
As the simplest possible test, I would try adding an h:outputText to the page to see if it shows up, next try with something else simple like ace:pushButton. 


The rest of the page shows up fine. The tree is in one tab of an <ace:tabSet> within a dialog. The other tab shows up fine if I specify the <ace:tree> with no <ace:node>. If I specify the simplest of <ace:node>'s inside the tree no tabs show up at all. If I bring up the debug console it shows both tabs being there with the tree in the first tab. News to me!
judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


If you look at the release notes for 3.3.0, you will see the following
JSF Runtimes
Oracle Mojarra JSF 2.1.3-2.1.6, 2.1.18, 2.1.19 (included), 2.1.21.

2.1.17 is not supported for that release.

You can either update your jboss server for this version of mojarra, (there are several links for this...here is one..
http://stackoverflow.com/questions/17085717/upgrade-and-use-mojarra-as-the-jsf-implementation-with-jboss-server)
ianfeldberg

Joined: 04/Oct/2012 20:51:42
Messages: 16
Offline


judy.guglielmin wrote:
If you look at the release notes for 3.3.0, you will see the following
JSF Runtimes
Oracle Mojarra JSF 2.1.3-2.1.6, 2.1.18, 2.1.19 (included), 2.1.21.

2.1.17 is not supported for that release.

You can either update your jboss server for this version of mojarra, (there are several links for this...here is one..
http://stackoverflow.com/questions/17085717/upgrade-and-use-mojarra-as-the-jsf-implementation-with-jboss-server)
 


OK, I've tried a few different versions of JSF (2.1.6, 2.1.18, 2.1.21) and none of them work correctly. With the newer versions I am noticing different behavior though. When you try to bring up the dialog with the <ace:tree> in it I get a long stacktrace with the error message:

Navigating to first root of empty model

with the line that bombed out being:

org.icefaces.ace.model.tree.ListNodeDataModel.navToKey(ListNodeDataModel.java:88)

It seems like it's trying to render an empty data model. This would be strange since the <ace:tabPane> that contains the <ace:tree> has an attribute of:

rendered="#{bean.roots != null}"

which means that it should only be rendered when the model has roots!

Any idea what this error message means?
judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


Can you please first confirm that the showcase demo in your distribution bundle is working correctly on this server first? We should ensure there are no further configuration issues.
When you deploy the application to the server, there will be some configuration logging written to the server log (with ICEfaces version, jsf version, etc). Please paste that in here with any issues you maybe seeing with showcase application first.

Thanks.
ianfeldberg

Joined: 04/Oct/2012 20:51:42
Messages: 16
Offline


judy.guglielmin wrote:
Can you please first confirm that the showcase demo in your distribution bundle is working correctly on this server first? We should ensure there are no further configuration issues.
When you deploy the application to the server, there will be some configuration logging written to the server log (with ICEfaces version, jsf version, etc). Please paste that in here with any issues you maybe seeing with showcase application first.

Thanks. 


OK, problem solved. The showcase version of <ace:tree> worked fine so I added pieces of it into my webapp until it failed again. There were a couple problems.

1) The version of JSTL installed by JBoss was old and didn't recognize method names in their test attribute, that is:

Code:
 <c:if test="bean.hasRoots()"/>


didn't work because it didn't recognize the hasRoots() method.

2) It seems that IceFaces is calling my initializeState() method for the NodeStateCreationCallback and handing in a null object. I now account for that.

Of course the biggest problem was that the stack trace that was being displayed didn't reference any of my code so I had no way to figure out where the problem was. Is there some way to let me know where in my code I was getting the NPE when the stack trace doesn't reference any of my code? Using the JSF debug mode (Shift-Ctrl-D) didn't help since it printed the same stack trace.
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team