| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 04:34:58
|
paulvr
Joined: 12/05/2008 00:00:00
Messages: 121
Offline
|
When calling SessionRenderer.render() sometimes (but difficult to reproduce) a java.lang.NoClassDefFoundError exception for javax/portlet/PortletSession is thrown. Do I miss a class? Can't find it in any of my libraries... Or is it a bug?
Using JSF 1.2 (in 1.1 compatability mode), IceFaces 1.7.1, FF3, facelets.
Exception in thread "Thread-12" java.lang.NoClassDefFoundError: javax/portlet/PortletSession
at com.icesoft.faces.async.render.GroupAsyncRenderer.requestRender(GroupAsyncRenderer.java:239)
at com.icesoft.faces.async.render.GroupAsyncRenderer.requestRender(GroupAsyncRenderer.java:196)
at org.icefaces.x.core.push.SessionRenderer.render(SessionRenderer.java:86)
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 08:22:51
|
jguglielmin
Joined: 20/07/2007 00:00:00
Messages: 181
Offline
|
Did you check to see if portlet.jar is included in your deployed package?
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 08:23:37
|
jguglielmin
Joined: 20/07/2007 00:00:00
Messages: 181
Offline
|
Of course, that is assuming you are doing a portlet application and have used this class in your application....
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 10:51:15
|
paulvr
Joined: 12/05/2008 00:00:00
Messages: 121
Offline
|
Thanks for your reply.
No, that's point, I don't use portlets, so I didn't include the portlet.jar. But there seems to be some reference to the PortletSession class from inside the SessionRenderer, such that the classloader is called for it, even if I'm not using it.
Regards and thanks, Paul.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 11:09:31
|
jguglielmin
Joined: 20/07/2007 00:00:00
Messages: 181
Offline
|
I have used the SessionRenderer (without Portlets) and didn't see this issue at all. Which AS are you using? Did you check to make sure a stray import statement isn't trying to import this class?
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 11:15:52
|
paulvr
Joined: 12/05/2008 00:00:00
Messages: 121
Offline
|
No stray imports, and Eclipse would warn me for that. What's an "AS"?
Paul.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 11:27:59
|
jguglielmin
Joined: 20/07/2007 00:00:00
Messages: 181
Offline
|
Application Server (for a lazy typist)
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 11:41:14
|
jguglielmin
Joined: 20/07/2007 00:00:00
Messages: 181
Offline
|
list the jars you are deploying with your app (if ear, list those in the ear and those in the war)
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/08/2008 13:37:44
|
paulvr
Joined: 12/05/2008 00:00:00
Messages: 121
Offline
|
AS = Tomcat 6.0.16
jars:
backport-util-concurrent
commons-beanutils
commons-collections
commons-digester
commons-fileupload
commons-logging
icefaces
icefaces-comps
icefaces-facelets
jsf-api-1.2
jsf-impl-1.2
jstl
krysalis-jCharts-1.0.0-alpha-1
mail
mysql-connector-java
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 29/08/2008 07:42:27
|
jguglielmin
Joined: 20/07/2007 00:00:00
Messages: 181
Offline
|
Looks like the problem may lie in SessionRenderer after all.
Could you please put some decode in com.icesoft.faces.asynch.render.GroupAsyncRenderer.java in the following block?
Code:
for (Iterator i = group.iterator(); !stopRequested && i.hasNext();) {
Object object = ((WeakReference) i.next()).get();
if (object instanceof Renderable) {
requestRender((Renderable) object);
} else if (object instanceof HttpSession) {
requestRender((HttpSession) object);
} else if (object instanceof PortletSession) {
requestRender((PortletSession) object);
}
}
You can see in the following block of code that the object you are receiving should meet one of the first 2 conditions and it isn't. It would be very helpful to find out what type/class of object you are getting.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 29/08/2008 08:42:05
|
paulvr
Joined: 12/05/2008 00:00:00
Messages: 121
Offline
|
Hi jguglielmin,
I would be glad to help you with debugging the SessionRenderer but I don't have the proper sources, though I did found a com.icesoft.faces.asynch.render.GroupAsyncRenderer.java on the Icefaces website (in the ICEfaces-1.7.1-src.zip library, is that the one?), but this file refers to some other sources I can't find...
Would it be possible for you to send me a jar that does the debug output you would require and that I could link to instead of the IceFaces jar and that writes the info you require to a file or such? Or do you have any better idea?
I tried to create a simple demo of the problem, but the simpler I make it, the less likely it runs into the problem. But there seems to be a positive correlation with the number of calls to the SessionRenderer.render().
############
I noticed that the GroupAsyncRenderer does an "if (object instanceof PortletSession)". This may result in the classloader wanting to load that PortletSession, even if no object of that class exists in the current context. That would already explain my problem. (I had a similar problem once...)
############
Thanks for your help anyway,
regards, Paul.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 29/08/2008 08:56:11
|
jguglielmin
Joined: 20/07/2007 00:00:00
Messages: 181
Offline
|
I don't have a lot of time today to devote to this problem. If you want a speedier resolution then you can either download the 1.7.1 source (sounds like you did) put some logging statements or step through your debugger (always a quicker solution) to see why your object is not one of the 2 that it should be. Not sure this is necessarily a buy yet (we'll see what the object is). To rebuild the core jar if you choose to use logging statements, just go into the core folder and type ant (of the Icefaces source code). Then use this jar in your application. You might also want to check and see what type of object your application is adding to the render group.
If you can't figure this out, please open a jira and attach a simple project (maybe scaled down if what you are working on is a large one) to the jira.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 07/09/2008 01:49:39
|
paulvr
Joined: 12/05/2008 00:00:00
Messages: 121
Offline
|
See http://jira.icefaces.org/browse/ICE-3488
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 08/09/2008 13:02:29
|
ted.goddard
Joined: 26/10/2004 00:00:00
Messages: 589
Offline
|
Are both SessionRenderer.render() and SessionRenderer.addCurrentSession() always called from threads executing the JSF lifecycle? (We are not sure how a null Session value can be added to the map.)
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 08/09/2008 14:49:22
|
paulvr
Joined: 12/05/2008 00:00:00
Messages: 121
Offline
|
I was calling SessionRenderer.addCurrentSession() in JSF context, but SessionRenderer.render() from an independent, asynchronous thread.
|
|
|
 |
|
|