Hi,
I have been getting an error related to the RSSPortlets. I think it may
be due to the way the FeedDeamon instanciates the portlets. I
managed to track the error back to a setContent() call in
RSSPortlet - line 197 (I'm working on last week's CVS version).
[...] -- ERROR -- RSSPortlet: Couldn't set items for XML document ->
http://10.am/Personal/PDA-rss
Exception: java.lang.NullPointerException
Stack Trace follows:
java.lang.NullPointerException
at org.apache.tomcat.core.RequestImpl.getSession(RequestImpl.java:407)
at
org.apache.tomcat.core.RequestImpl.isRequestedSessionIdValid(RequestImpl.jav
a:436)
at
org.apache.tomcat.core.HttpServletRequestFacade.isRequestedSessionIdValid(Ht
tpServletRequestFacade.java:317)
at
org.apache.jetspeed.capability.CapabilityMapFactory.getCapabilityMap(Capabil
ityMapFactory.java:106)
at
org.apache.jetspeed.portal.portlets.AbstractPortlet.setContent(AbstractPortl
et.java:242)
at
org.apache.jetspeed.portal.portlets.AbstractPortlet.setContent(AbstractPortl
et.java:223)
at org.apache.jetspeed.portal.portlets.RSSPortlet.init(RSSPortlet.java:208)
at
org.apache.jetspeed.portal.factory.PortletFactory.getPortlet(PortletFactory.
java:459)
at
org.apache.jetspeed.portal.factory.PortletFactory.getPortlet(PortletFactory.
java:160)
at
org.apache.jetspeed.portal.factory.PortletFactory.getPortlet(PortletFactory.
java:141)
at
org.apache.jetspeed.daemon.impl.util.feeddaemon.Instantiator.run(Instantiato
r.java:222)
at
org.apache.jetspeed.util.threadpool.RunnableThread.run(RunnableThread.java:1
24)
(BTW, 10.am has some mysql problem today... you won't go very far if you try
to reproduce the case with the same feeds)
setContent() retrieves the current CapabilityMap by calling
CapabilityMapFactory's "CapabilityMap getCapabilityMap( RunData rundata )"
function. This is where the exception is thrown.
Below is the guilty code:
// SGP: Tomcat gives a nullpointer exception sometimes
// unless we ask first if the session is valid.
if ( rundata.getRequest().isRequestedSessionIdValid() && !
rundata.getSession().isNew() ) {
cm =
CapabilityMap)rundata.getSession().getValue( CAPABILITY_MAP );
}
If I get rid of the rundata.getRequest().isRequestedSessionIdValid() check,
the nullpointerexception is not thrown... what about checking if
getRequest()
returns null ?
The "multithreading problems in the portlet drawing?" thread seems to be
dead
and I'm a bit confused by what came out. Since this problem is more or less
related, could someone tell me which post is "authoritative" and
where we are going WRT RunData, PortletConfig, ... ?
Hope this helps,
Cheers
Alex
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]