<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "SessionRenderer.render() throws NoClassDefFoundError"]]></title>
		<link>http://www.icefaces.org/JForum/posts/list/12.page</link>
		<description><![CDATA[Latest messages posted in the topic "SessionRenderer.render() throws NoClassDefFoundError"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ 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)
]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#39978</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#39978</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 04:34:58]]> GMT</pubDate>
				<author><![CDATA[ paulvr]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ Did you check to see if portlet.jar is included in your deployed package?]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#39986</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#39986</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 08:22:51]]> GMT</pubDate>
				<author><![CDATA[ jguglielmin]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ Of course, that is assuming you are doing a portlet application and have used this class in your application....]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#39988</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#39988</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 08:23:37]]> GMT</pubDate>
				<author><![CDATA[ jguglielmin]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ 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.]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#39999</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#39999</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 10:51:15]]> GMT</pubDate>
				<author><![CDATA[ paulvr]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ 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?]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40001</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40001</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 11:09:31]]> GMT</pubDate>
				<author><![CDATA[ jguglielmin]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ No stray imports, and Eclipse would warn me for that. What's an "AS"?
Paul.]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40002</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40002</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 11:15:52]]> GMT</pubDate>
				<author><![CDATA[ paulvr]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ Application Server (for a lazy typist)]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40003</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40003</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 11:27:59]]> GMT</pubDate>
				<author><![CDATA[ jguglielmin]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ list the jars you are deploying with your app (if ear, list those in the ear and those in the war)]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40004</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40004</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 11:41:14]]> GMT</pubDate>
				<author><![CDATA[ jguglielmin]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ 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]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40014</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40014</link>
				<pubDate><![CDATA[Thu, 28 Aug 2008 13:37:44]]> GMT</pubDate>
				<author><![CDATA[ paulvr]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ 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?

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
        for &#40;Iterator i = group.iterator&#40;&#41;; !stopRequested && i.hasNext&#40;&#41;;&#41; {
            Object object = &#40;&#40;WeakReference&#41; i.next&#40;&#41;&#41;.get&#40;&#41;;
            if &#40;object instanceof Renderable&#41; {
                requestRender&#40;&#40;Renderable&#41; object&#41;;
            } else if &#40;object instanceof HttpSession&#41; {
                requestRender&#40;&#40;HttpSession&#41; object&#41;;
            } else if &#40;object instanceof PortletSession&#41; {
                requestRender&#40;&#40;PortletSession&#41; object&#41;;
            }
        }</pre>
		</div>
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.
]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40046</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40046</link>
				<pubDate><![CDATA[Fri, 29 Aug 2008 07:42:27]]> GMT</pubDate>
				<author><![CDATA[ jguglielmin]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ 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.]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40048</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40048</link>
				<pubDate><![CDATA[Fri, 29 Aug 2008 08:42:05]]> GMT</pubDate>
				<author><![CDATA[ paulvr]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ 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.]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40049</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40049</link>
				<pubDate><![CDATA[Fri, 29 Aug 2008 08:56:11]]> GMT</pubDate>
				<author><![CDATA[ jguglielmin]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ See http://jira.icefaces.org/browse/ICE-3488]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40311</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40311</link>
				<pubDate><![CDATA[Sun, 7 Sep 2008 01:49:39]]> GMT</pubDate>
				<author><![CDATA[ paulvr]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ 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.)]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40350</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40350</link>
				<pubDate><![CDATA[Mon, 8 Sep 2008 13:02:29]]> GMT</pubDate>
				<author><![CDATA[ ted.goddard]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ I was calling SessionRenderer.addCurrentSession() in JSF context, but SessionRenderer.render() from an independent, asynchronous thread. ]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40355</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40355</link>
				<pubDate><![CDATA[Mon, 8 Sep 2008 14:49:22]]> GMT</pubDate>
				<author><![CDATA[ paulvr]]></author>
			</item>
			<item>
				<title>Re:SessionRenderer.render() throws NoClassDefFoundError</title>
				<description><![CDATA[ That sounds fine -- SessionRenderer.render() is intended to be called from a non-JSF context (I didn't intend to indicate this as I did in my post above).

Looking at the code, it appears that we may have the referent of a WeakReference going null partway through, leading to an unnecessary test for a PortletSession.  We'll check in a fix for this.  Can you test ICEfaces from a subversion checkout?]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/9619.page#40367</guid>
				<link>http://www.icefaces.org/JForum/posts/list/9619.page#40367</link>
				<pubDate><![CDATA[Mon, 8 Sep 2008 17:00:09]]> GMT</pubDate>
				<author><![CDATA[ ted.goddard]]></author>
			</item>
	</channel>
</rss>
