Great, it's working.  :-)
But I have detected something weird, or may be something that I don't
understand.
If you declare an application without the loadondemand, this application
is loaded at login time, but this loading fails in
[EMAIL PROTECTED] because the application name is not
set.
If I put the name in the sitemap like that the loading succeeds.
...
<map:act type="auth-login">
 <map:parameter name="handler" value="portalhandler"/>
 <map:parameter name="application" value="MyApp"/>
 <map:parameter name="parameter_name" value="{request-param:name}"/>
 <map:parameter name="parameter_password"
value="{request-param:password}"/>
 <map:redirect-to uri="portal"/>
</map:act> 
...
I think that this design is weird. In
[EMAIL PROTECTED], we have a loop on each
application in the handler but only one will be loaded.
Is it the right design or is it a bug?
Laurent Trillaud 
 
> -----Message d'origine-----
> De : Carsten Ziegeler [mailto:[EMAIL PROTECTED]
> Envoyé : jeudi 23 octobre 2003 16:54
> À : [EMAIL PROTECTED]
> Objet : RE: [auth-fw] NPE in Application Manager
> 
> I think I have fixed now the bug, so the NPE should not occur
> any more.
> 
> Please cross check.
> 
> Thanks
> Carsten
> 
> Carsten Ziegeler wrote:
> >
> > Hi,
> >
> > I guess you have found a bug :(
> > Your assumptions are right, except that the save uri is called
> > on logout. Currently you have to do it manually using the
> > session transformer.
> > But I think having a save on logout is a nice addition.
> >
> > So, I hope to have time in the next week to look at it,
> > but if you want you can of course send a patch.
> >
> > Carsten
> >
> > > -----Original Message-----
> > > From: Laurent Trillaud [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, October 22, 2003 9:46 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [auth-fw] NPE in Application Manager
> > >
> > >
> > > Hi cocooners
> > > I'm trying to add a new application in the portal engine's
> > > authentication handler. The goal is to activate a pipeline at
login
> and
> > > logout and put data in a separate session context. Here is the
sniplet
> > > of the sitemap
> > > ...
> > >             <authentication-manager>
> > >                 <handlers>
> > >                     <handler name="portalhandler">
> > >                        <redirect-to uri="cocoon:/login" />
> > >                        <authentication
> > > uri="cocoon:raw:/sunrise-authuser"/>
> > >                        <applications>
> > >                             <application loadondemand="true"
> > > name="portal">
> > >                                 <configuration name="portal">
> > >                                     <profiles>
> > >                                                   ...
> > >                                     </profiles>
> > >                                 </configuration>
> > >                             </application>
> > >                             <application name="MyApp">
> > >                                   <load
> > uri="cocoon:raw:/load-MyData"/>
> > >                                   <save
> > uri="cocoon:raw:/save-MyData"/>
> > >                             </application>
> > >                        </applications>
> > >                     </handler>
> > >                 </handlers>
> > >             </authentication-manager>
> > > ...
> > >             <map:match pattern="load-MyData">
> > >                 <map:generate src="profiles/MyData.xml" />
> > >                 <map:serialize type="xml" />
> > >             </map:match>
> > >             <map:match pattern="save-MyData">
> > >                 <map:generate src="resources/save-MyData.xml" />
> > >                 <map:transform type="session" />
> > >                 <map:transform type="write-source" />
> > >                 <map:serialize type="xml" />
> > >             </map:match>
> > > ...
> > > If I understand the documentation of the authentication framework
> > > http://localhost:8888/docs/developing/webapps/authentication.html
> > > the uri load-MyData is trigger at login and I hope save-MyData
trigger
> > > at logout. When I do a login I got this NPE.
> > >
> > > -----------------
> > > java.lang.NullPointerException
> > >   at
> > >
>
org.apache.cocoon.webapps.authentication.context.AuthenticationContext.c
> > > reateParameters(AuthenticationContext.java:771)
> > >   at
> > >
>
org.apache.cocoon.webapps.authentication.context.AuthenticationContext.l
> > > oadApplicationXML(AuthenticationContext.java:884)
> > >   at
> > >
>
org.apache.cocoon.webapps.authentication.components.PipelineAuthenticato
> > > r.authenticate(PipelineAuthenticator.java:265)
> > >   at
> > >
>
org.apache.cocoon.webapps.authentication.components.DefaultAuthenticatio
> > > nManager.login(DefaultAuthenticationManager.java:238)
> > >   at
> > >
>
org.apache.cocoon.webapps.authentication.acting.LoginAction.act(LoginAct
> > > ion.java:118)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(Ac
> > > tTypeNode.java:152)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> > > invokeNodes(AbstractParentProcessingNode.java:84)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i
> > > nvoke(PreparableMatchNode.java:164)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> > > invokeNodes(AbstractParentProcessingNode.java:108)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
> > > ipelineNode.java:163)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> > > invokeNodes(AbstractParentProcessingNode.java:108)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
> > > PipelinesNode.java:161)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
> > > cessor.java:351)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
> > > cessor.java:304)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(Moun
> > > tNode.java:132)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> > > invokeNodes(AbstractParentProcessingNode.java:84)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i
> > > nvoke(PreparableMatchNode.java:164)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> > > invokeNodes(AbstractParentProcessingNode.java:108)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
> > > ipelineNode.java:163)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> > > invokeNodes(AbstractParentProcessingNode.java:108)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
> > > PipelinesNode.java:161)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
> > > cessor.java:351)
> > >   at
> > >
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
> > > cessor.java:304)
> > >   at org.apache.cocoon.Cocoon.process(Cocoon.java:639)
> > >   at
> > >
>
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1104)
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >   at
> > >
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
> > >   at
> > >
>
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH
> > > andler.java:294)
> > >   at
> > >
>
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
> > >   at org.mortbay.http.HttpContext.handle(HttpContext.java:1776)
> > >   at
> > >
>
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon
> > > text.java:514)
> > >   at org.mortbay.http.HttpContext.handle(HttpContext.java:1726)
> > >   at org.mortbay.http.HttpServer.service(HttpServer.java:879)
> > >   at
> > > org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
> > >   at
> > >
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
> > >   at
> > > org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
> > >   at
> > >
>
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:196
> > > )
> > >   at
> > > org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
> > >   at
> > > org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:487)
> > > -----------------
> > >
> > > Obviously I miss something, but what?
> > >
> > > Laurent Trillaud
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to