You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Laurent Trillaud <lt...@jouve.fr> on 2003/10/24 14:35:25 UTC

RE : [auth-fw] NPE in Application Manager

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
AuthenticationContext@setXML#255 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
DefaultAuthenticationManager@login#259, 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:cziegeler@s-und-n.de]
> Envoyé : jeudi 23 octobre 2003 16:54
> À : users@cocoon.apache.org
> 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:ltrillaud@jouve.fr]
> > > Sent: Wednesday, October 22, 2003 9:46 AM
> > > To: users@cocoon.apache.org
> > > 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: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : [auth-fw] NPE in Application Manager

Posted by Laurent Trillaud <lt...@jouve.fr>.
> > But if, in the application, the pipeline associated to the load is
> > started automatically at login, at logout the pipeline associated to
the
> > save isn't triggered.
> Yes, currently. I'm +1 for adding this feature, but there is of course
the
> potential that the user never logs out and simply leaves the site (by
> closing the browser).
> 
> I think - not only to be compatible - we should make this
configurable,
> which means, like the loadOnDemand you can specify a "saveOnLogout"
> attribute and then the application is saved on logout.
> 
> What do you think?
> 
Yes of course I'm +1. It's much much better, but ... I'm not sure to be
able to do it by myself, because I'm still fighting with the auth-fw
that isn't a piece of cake for me.
And I guess that I found another bug: applications declare in an handler
can generate multiple xml roots.
To reproduce this issue, go inside the authentication-fw example add an
application
...
<authentication-manager>
   ...
   <handler name="demohandler">
      <redirect-to ...
      <authentication ...
      <applications>
         <application name="MyApp">
            <load uri="cocoon:raw:load-myApp"/>
         </application>
      <applications>
   </handler>
   ...
</authentication-mabager>

The protected page that came after the login shows 2 roots
<authentication> and <application> instead of
/authentication/applications
I run it under the debugger but I haven't found what is wrong!
Laurent Trillaud



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: RE : [auth-fw] NPE in Application Manager

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Laurent Trillaud wrote:
> 
> It wasn't a so bad day because it works.  :-)  Thanks a lot.
You're welcome.

> But if, in the application, the pipeline associated to the load is
> started automatically at login, at logout the pipeline associated to the
> save isn't triggered.
Yes, currently. I'm +1 for adding this feature, but there is of course the
potential that the user never logs out and simply leaves the site (by 
closing the browser).

> I guess that we need a loop, in DefaultAuthenticationManager@logout,
> like this one:
> // And now save applications
> Iterator applications =
> handler.getHandlerConfiguration().getApplications().values().iterator();
> while ( applications.hasNext() ) {
>    ApplicationConfiguration appHandler =
>      (ApplicationConfiguration)applications.next();
>    if ( !appHandler.getLoadOnDemand() ) {
>       handler.getContext().saveApplicationXML( appHandler, this.resolver
> );
>    }
> }
> But I don't know exactly where and if it's enough.

I think - not only to be compatible - we should make this configurable,
which means, like the loadOnDemand you can specify a "saveOnLogout"
attribute and then the application is saved on logout.

What do you think?

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : [auth-fw] NPE in Application Manager

Posted by Laurent Trillaud <lt...@jouve.fr>.
It wasn't a so bad day because it works.  :-)  Thanks a lot.
But if, in the application, the pipeline associated to the load is
started automatically at login, at logout the pipeline associated to the
save isn't triggered.
I guess that we need a loop, in DefaultAuthenticationManager@logout,
like this one:
// And now save applications
Iterator applications =
handler.getHandlerConfiguration().getApplications().values().iterator();
while ( applications.hasNext() ) {
   ApplicationConfiguration appHandler =
     (ApplicationConfiguration)applications.next();
   if ( !appHandler.getLoadOnDemand() ) {
      handler.getContext().saveApplicationXML( appHandler, this.resolver
);
   }
}
But I don't know exactly where and if it's enough.
Laurent

> Ups, you're right again - sorry, it's not my best day today...
> 
> Ok, now I fixed the other method as well and no, I don't say this
> time that it should work :)
> 
> Carsten


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : [auth-fw] NPE in Application Manager

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Laurent Trillaud wrote:
> 
> OK, I found line 710 but I guess that is the same for you.
> The lastest version of AuthenticationContext.java is 1.12 at 30/10/03
> 11.06 with the comment 'Applying NPE fix again'. 
> The previous version is 1.11 at 21/10/03 14:36 with the comment 'Moving
> to Serviceable'
> When I make a diff between the v1.11 and the v1.12, only one line of
> code has changed. The line #710 from 
> this.setXML(path, fragment);
> to
> this.authContext.setXML("/applications/" + applicationName + '/',
> fragment);
> 
> In fact we have 2 loadApplicationXML, one public and one private.
> The modification #710 belong to the private function #679-#714
> But as you can see in the call stack the
> DefaultAuthenticationMananager.login call the public loadApplicationXML
> #892 and in this scope the application name is null.
> 
Ups, you're right again - sorry, it's not my best day today...

Ok, now I fixed the other method as well and no, I don't say this
time that it should work :)

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : [auth-fw] NPE in Application Manager

Posted by Laurent Trillaud <lt...@jouve.fr>.
OK, I found line 710 but I guess that is the same for you.
The lastest version of AuthenticationContext.java is 1.12 at 30/10/03
11.06 with the comment 'Applying NPE fix again'. 
The previous version is 1.11 at 21/10/03 14:36 with the comment 'Moving
to Serviceable'
When I make a diff between the v1.11 and the v1.12, only one line of
code has changed. The line #710 from 
this.setXML(path, fragment);
to
this.authContext.setXML("/applications/" + applicationName + '/',
fragment);

In fact we have 2 loadApplicationXML, one public and one private.
The modification #710 belong to the private function #679-#714
But as you can see in the call stack the
DefaultAuthenticationMananager.login call the public loadApplicationXML
#892 and in this scope the application name is null.

...
org.apache.cocoon.ProcessingException: Application is required the login
function of the Defau
	at
org.apache.cocoon.webapps.authentication.context.AuthenticationContext.s
etXML(AuthenticationContext.java:255)
	at
org.apache.cocoon.webapps.authentication.context.AuthenticationContext.l
oadApplicationXML(AuthenticationContext.java:892)
	at
org.apache.cocoon.webapps.authentication.components.DefaultAuthenticatio
nManager.login(DefaultAuthenticationManager.java:303)
...

Laurent


> No, in the latest change from today, I changed line 707 that did call
> the setXML (containing line 255) but now doesn't call setXML anymore.
> So the NPE can't occur.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : [auth-fw] NPE in Application Manager

Posted by Carsten Ziegeler <cz...@s-und-n.de>.

> -----Original Message-----
> From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
> Sent: Thursday, October 30, 2003 2:08 PM
> To: users@cocoon.apache.org
> Subject: RE : RE : RE : RE : [auth-fw] NPE in Application Manager
> 
> 
> It's not working!!! But I probably I miss something.
> I got auth-fw from the CVS.
> I saw that you have change only the AuthenticationContext.java#266 but
> the exception is before at #255, because the application name is null.
> Laurent

No, in the latest change from today, I changed line 707 that did call
the setXML (containing line 255) but now doesn't call setXML anymore.
So the NPE can't occur.

Carsten


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : RE : RE : RE : [auth-fw] NPE in Application Manager

Posted by Laurent Trillaud <lt...@jouve.fr>.
It's not working!!! But I probably I miss something.
I got auth-fw from the CVS.
I saw that you have change only the AuthenticationContext.java#266 but
the exception is before at #255, because the application name is null.
Laurent

> -----Message d'origine-----
> De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> Envoyé : jeudi 30 octobre 2003 11:10
> À : users@cocoon.apache.org
> Objet : RE: RE : RE : RE : [auth-fw] NPE in Application Manager
> 
> You're right, the fix is missing...hmmm...and I couldn't find
> it in the CVS history...hmmm again
> 
> Anyway, I just committed it (again?), please cross check.
> 
> Thanks
> Carsten
> 
> > -----Original Message-----
> > From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
> > Sent: Thursday, October 30, 2003 10:12 AM
> > To: users@cocoon.apache.org
> > Subject: RE : RE : RE : [auth-fw] NPE in Application Manager
> >
> >
> > Sure
> > org.apache.cocoon.ProcessingException: Application is required
> > at
> >
org.apache.cocoon.webapps.authentication.context.AuthenticationContext.s
> > etXML(AuthenticationContext.java:255)
> > 	at
> >
org.apache.cocoon.webapps.authentication.context.AuthenticationContext.l
> > oadApplicationXML(AuthenticationContext.java:892)
> > 	at
> >
org.apache.cocoon.webapps.authentication.components.DefaultAuthenticatio
> > nManager.login(DefaultAuthenticationManager.java:303)
> > 	at
> >
org.apache.cocoon.webapps.authentication.acting.LoginAction.act(LoginAct
> > ion.java:117)
> > Laurent
> >
> > > -----Message d'origine-----
> > > De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> > > Envoyé : jeudi 30 octobre 2003 10:10
> > > À : users@cocoon.apache.org
> > > Objet : RE: RE : RE : [auth-fw] NPE in Application Manager
> > >
> > > Hmm, are you sure? I'm not aware of any changes in the
authentication
> > > framework after I committed the patch. Hmm, can you please show
> > > the stack trace again?
> > >
> > > Thanks
> > > Carsten
> > >
> > > > -----Original Message-----
> > > > From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
> > > > Sent: Thursday, October 30, 2003 9:40 AM
> > > > To: users@cocoon.apache.org
> > > > Subject: RE : RE : [auth-fw] NPE in Application Manager
> > > >
> > > >
> > > > Hmmm, the fix worked, but I just going to build a brand new
cocoon
> > from
> > > > the Cocoon-2.1 CVS and the bug is still here.
> > > > It seems that the fix has been overwritten!
> > > > Laurent Trillaud
> > > >
> > > > > -----Message d'origine-----
> > > > > De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> > > > > Envoyé : vendredi 24 octobre 2003 15:03
> > > > > À : users@cocoon.apache.org
> > > > > Objet : RE : [auth-fw] NPE in Application Manager
> > > > >
> > > > > Laurent Trillaud wrote:
> > > > > > 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
> > > > > > AuthenticationContext@setXML#255 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
> > > > > > DefaultAuthenticationManager@login#259, 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?
> > > > >
> > > > > It's another bug :) I just committed a fix, so it should now
> > > > > work for you (hopefully). You shouldn't need to specify
> > > > > the application in the login action.
> > > > >
> > > > > Thanks for spotting this!
> > > > >
> > > > > Carsten
> > > > >
> > > > >
> >
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > >
> > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > >
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: RE : RE : RE : [auth-fw] NPE in Application Manager

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
You're right, the fix is missing...hmmm...and I couldn't find
it in the CVS history...hmmm again

Anyway, I just committed it (again?), please cross check.

Thanks
Carsten

> -----Original Message-----
> From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
> Sent: Thursday, October 30, 2003 10:12 AM
> To: users@cocoon.apache.org
> Subject: RE : RE : RE : [auth-fw] NPE in Application Manager
>
>
> Sure
> org.apache.cocoon.ProcessingException: Application is required
> at
> org.apache.cocoon.webapps.authentication.context.AuthenticationContext.s
> etXML(AuthenticationContext.java:255)
> 	at
> org.apache.cocoon.webapps.authentication.context.AuthenticationContext.l
> oadApplicationXML(AuthenticationContext.java:892)
> 	at
> org.apache.cocoon.webapps.authentication.components.DefaultAuthenticatio
> nManager.login(DefaultAuthenticationManager.java:303)
> 	at
> org.apache.cocoon.webapps.authentication.acting.LoginAction.act(LoginAct
> ion.java:117)
> Laurent
>
> > -----Message d'origine-----
> > De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> > Envoyé : jeudi 30 octobre 2003 10:10
> > À : users@cocoon.apache.org
> > Objet : RE: RE : RE : [auth-fw] NPE in Application Manager
> >
> > Hmm, are you sure? I'm not aware of any changes in the authentication
> > framework after I committed the patch. Hmm, can you please show
> > the stack trace again?
> >
> > Thanks
> > Carsten
> >
> > > -----Original Message-----
> > > From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
> > > Sent: Thursday, October 30, 2003 9:40 AM
> > > To: users@cocoon.apache.org
> > > Subject: RE : RE : [auth-fw] NPE in Application Manager
> > >
> > >
> > > Hmmm, the fix worked, but I just going to build a brand new cocoon
> from
> > > the Cocoon-2.1 CVS and the bug is still here.
> > > It seems that the fix has been overwritten!
> > > Laurent Trillaud
> > >
> > > > -----Message d'origine-----
> > > > De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> > > > Envoyé : vendredi 24 octobre 2003 15:03
> > > > À : users@cocoon.apache.org
> > > > Objet : RE : [auth-fw] NPE in Application Manager
> > > >
> > > > Laurent Trillaud wrote:
> > > > > 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
> > > > > AuthenticationContext@setXML#255 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
> > > > > DefaultAuthenticationManager@login#259, 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?
> > > >
> > > > It's another bug :) I just committed a fix, so it should now
> > > > work for you (hopefully). You shouldn't need to specify
> > > > the application in the login action.
> > > >
> > > > Thanks for spotting this!
> > > >
> > > > Carsten
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : RE : RE : [auth-fw] NPE in Application Manager

Posted by Laurent Trillaud <lt...@jouve.fr>.
Sure
org.apache.cocoon.ProcessingException: Application is required
at
org.apache.cocoon.webapps.authentication.context.AuthenticationContext.s
etXML(AuthenticationContext.java:255)
	at
org.apache.cocoon.webapps.authentication.context.AuthenticationContext.l
oadApplicationXML(AuthenticationContext.java:892)
	at
org.apache.cocoon.webapps.authentication.components.DefaultAuthenticatio
nManager.login(DefaultAuthenticationManager.java:303)
	at
org.apache.cocoon.webapps.authentication.acting.LoginAction.act(LoginAct
ion.java:117)
Laurent

> -----Message d'origine-----
> De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> Envoyé : jeudi 30 octobre 2003 10:10
> À : users@cocoon.apache.org
> Objet : RE: RE : RE : [auth-fw] NPE in Application Manager
> 
> Hmm, are you sure? I'm not aware of any changes in the authentication
> framework after I committed the patch. Hmm, can you please show
> the stack trace again?
> 
> Thanks
> Carsten
> 
> > -----Original Message-----
> > From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
> > Sent: Thursday, October 30, 2003 9:40 AM
> > To: users@cocoon.apache.org
> > Subject: RE : RE : [auth-fw] NPE in Application Manager
> >
> >
> > Hmmm, the fix worked, but I just going to build a brand new cocoon
from
> > the Cocoon-2.1 CVS and the bug is still here.
> > It seems that the fix has been overwritten!
> > Laurent Trillaud
> >
> > > -----Message d'origine-----
> > > De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> > > Envoyé : vendredi 24 octobre 2003 15:03
> > > À : users@cocoon.apache.org
> > > Objet : RE : [auth-fw] NPE in Application Manager
> > >
> > > Laurent Trillaud wrote:
> > > > 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
> > > > AuthenticationContext@setXML#255 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
> > > > DefaultAuthenticationManager@login#259, 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?
> > >
> > > It's another bug :) I just committed a fix, so it should now
> > > work for you (hopefully). You shouldn't need to specify
> > > the application in the login action.
> > >
> > > Thanks for spotting this!
> > >
> > > Carsten
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: RE : RE : [auth-fw] NPE in Application Manager

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Hmm, are you sure? I'm not aware of any changes in the authentication
framework after I committed the patch. Hmm, can you please show
the stack trace again?

Thanks
Carsten

> -----Original Message-----
> From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
> Sent: Thursday, October 30, 2003 9:40 AM
> To: users@cocoon.apache.org
> Subject: RE : RE : [auth-fw] NPE in Application Manager
>
>
> Hmmm, the fix worked, but I just going to build a brand new cocoon from
> the Cocoon-2.1 CVS and the bug is still here.
> It seems that the fix has been overwritten!
> Laurent Trillaud
>
> > -----Message d'origine-----
> > De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> > Envoyé : vendredi 24 octobre 2003 15:03
> > À : users@cocoon.apache.org
> > Objet : RE : [auth-fw] NPE in Application Manager
> >
> > Laurent Trillaud wrote:
> > > 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
> > > AuthenticationContext@setXML#255 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
> > > DefaultAuthenticationManager@login#259, 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?
> >
> > It's another bug :) I just committed a fix, so it should now
> > work for you (hopefully). You shouldn't need to specify
> > the application in the login action.
> >
> > Thanks for spotting this!
> >
> > Carsten
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : RE : [auth-fw] NPE in Application Manager

Posted by Laurent Trillaud <lt...@jouve.fr>.
Hmmm, the fix worked, but I just going to build a brand new cocoon from
the Cocoon-2.1 CVS and the bug is still here.
It seems that the fix has been overwritten!
Laurent Trillaud 

> -----Message d'origine-----
> De : Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> Envoyé : vendredi 24 octobre 2003 15:03
> À : users@cocoon.apache.org
> Objet : RE : [auth-fw] NPE in Application Manager
> 
> Laurent Trillaud wrote:
> > 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
> > AuthenticationContext@setXML#255 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
> > DefaultAuthenticationManager@login#259, 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?
> 
> It's another bug :) I just committed a fix, so it should now
> work for you (hopefully). You shouldn't need to specify
> the application in the login action.
> 
> Thanks for spotting this!
> 
> Carsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE : [auth-fw] NPE in Application Manager

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Laurent Trillaud wrote:
> 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
> AuthenticationContext@setXML#255 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
> DefaultAuthenticationManager@login#259, 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?

It's another bug :) I just committed a fix, so it should now
work for you (hopefully). You shouldn't need to specify
the application in the login action.

Thanks for spotting this!

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org