You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Rob Johnston <rj...@juniper.net> on 2002/11/05 20:48:08 UTC

Persistant user authentication data in portal (Take Two)

Hey all,

I'm attempting to get at authentication session data using the session
transformer in a installed portlet.  That is, I want to check something
stored in the user's authentication session data from a pipeline called
from the portal itself (and not me directly).

For instance, I have a simple "portlet" xml file that is called by the
portal framework that contains:

<portal-html>
  <session:include xmlns:session="http://cocoon.apache.org/session/1.0" ignoreErrors="true">
    <session:getxml context="authentication" path="/authentication/data"/>
  </session:include>
</portal-html>

if I call this directly by entering the proper url into my browser, I
get what is expected:

<portal-html>
  <session:include xmlns:session="http://cocoon.apache.org/session/1.0" ignoreErrors="true">
    <title>Mr.</title>
    <name>Paul</name>
  </session:include>
</portal-html>

However, if I go through the portal and load the main portal screen
(which should call the same pipeline I just manually issued), the XML
never comes up, and I get an error in my log file:

DEBUG   2002-11-05 14:35:36.900 [core.session-manager    ] (): BEGIN streamContextFragment name=authentication, path=/authentication/data, consumerorg.apache.cocoon.webapps.session.transformation.SessionTransformer@3a95af
DEBUG   2002-11-05 14:35:36.901 [core.manager            ] (): Got a org.apache.cocoon.webapps.authentication.components.AuthenticationManager from the pool.
DEBUG   2002-11-05 14:35:36.901 [core.roles              ] (): looking up shorthand authentication-manager, returning org.apache.cocoon.webapps.authentication.components.AuthenticationManager
DEBUG   2002-11-05 14:35:36.901 [core.roles              ] (): looking up shorthand authentication-manager, returning org.apache.cocoon.webapps.authentication.components.AuthenticationManager
DEBUG   2002-11-05 14:35:36.902 [core.manager            ] (): Put a org.apache.cocoon.webapps.authentication.components.AuthenticationManager back into the pool.
DEBUG   2002-11-05 14:35:36.902 [core.manager            ] (): Put a org.apache.cocoon.webapps.session.components.SessionManager back into the pool.
DEBUG   2002-11-05 14:35:36.903 [sitemap                 ] (): Put a org.apache.cocoon.generation.FileGenerator back into the pool.
DEBUG   2002-11-05 14:35:36.903 [sitemap                 ] (): Put a org.apache.cocoon.webapps.session.transformation.SessionTransformer back into the pool.
DEBUG   2002-11-05 14:35:36.903 [sitemap                 ] (): Put a org.apache.cocoon.serialization.XMLSerializer back into the pool.
DEBUG   2002-11-05 14:35:36.904 [core.manager            ] (): Put a org.apache.cocoon.components.sax.XMLByteStreamCompiler back into the pool.
DEBUG   2002-11-05 14:35:36.904 [sitemap                 ] (): Put a org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline back into the pool.
ERROR   2002-11-05 14:35:36.905 [core.portal-manager     ] (): Exception during processing of coplet: somethingelse
org.apache.cocoon.ProcessingException: SAXException: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.NullPointerException: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.NullPointerException
	at org.apache.cocoon.webapps.session.connector.ResourceConnectorImpl.streamXML(ResourceConnectorImpl.java:664)
	at org.apache.cocoon.webapps.portal.components.CopletThread.run(CopletThread.java:249)
	at java.lang.Thread.run(Thread.java:484)
org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.NullPointerException
	at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:380)
	at org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:532)
	at org.apache.cocoon.webapps.session.connector.ResourceConnectorImpl.streamXMLFromURI(ResourceConnectorImpl.java:620)
	at org.apache.cocoon.webapps.session.connector.ResourceConnectorImpl.streamXML(ResourceConnectorImpl.java:648)
	at org.apache.cocoon.webapps.portal.components.CopletThread.run(CopletThread.java:249)
	at java.lang.Thread.run(Thread.java:484)

Is this because for some reason the session data is not being persisted
unless I make the call directly to this pipeline?  It looks like the
authentication context is valid, because if I change that to say "foo",
I get an error saying the context isn't found.

Any help/insight would be appreciated.

thanks,
rob

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>