You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Joseph <pj...@yahoo.com> on 2004/10/13 16:31:52 UTC
PipelineAuthenticator
Hi,
I am trying to use the PipelineAuthenticator provided
in the authentication-fw block, but am getting a NPE.
My sitemap is as follows:
<map:match pattern="ProtectedPage">
<map:act type="auth-login">
<map:parameter name="handler"
value="webtaskauthenticator"/>
<map:parameter name="parameter_userid"
value="{request-param:name}"/>
<map:parameter name="parameter_password"
value="{request-param:password}"/>
<map:redirect-to uri="ProtectedPage"/>
</map:act>
<!-- authentication failed: -->
<map:generate src="auth_failed.xml"/>
<map:transform type="forms"/>
<map:transform type="i18n">
<map:parameter name="locale" value="en-US"/>
</map:transform>
<map:transform
src="context://resources/resources/forms-page-styling.xsl"/>
<map:serialize/>
</map:match>
the error I get is shown below - any ideas?
thanks!!
Paul
Original Exception: java.lang.NullPointerException
at
org.apache.cocoon.components.source.SourceUtil.getSource(SourceUtil.java:450)
at
org.apache.cocoon.webapps.authentication.components.WebTaskAuthenticator.authenticate(WebTaskAuthenticator.java:178)
at
org.apache.cocoon.webapps.authentication.components.DefaultAuthenticationManager.login(DefaultAuthenticationManager.java:204)
at
org.apache.cocoon.webapps.authentication.acting.LoginAction.act(LoginAction.java:82)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:119)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.handleCocoonRedirect(TreeProcessor.java:386)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.access$000(TreeProcessor.java:66)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor$TreeProcessorRedirector.cocoonRedirect(TreeProcessor.java:547)
at
org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:58)
at
org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:182)
at
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(FOM_JavaScriptInterpreter.java:837)
at
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(FOM_Cocoon.java:1482)
at
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(FOM_Cocoon.java:265)
at inv6.invoke()
at
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:523)
at
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:438)
at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134)
at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
at
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at
org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1591)
at
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:788)
at
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:120)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:103)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
at org.apache.cocoon.Cocoon.process(Cocoon.java:639)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1098)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: PipelineAuthenticator
Posted by Christoph Kliemt <ch...@entici.de>.
Paul Joseph <pj...@yahoo.com> writes:
> Oops. I copied the PipelineAuthenticaor, added a db call to validate
> the uname/pwd and called my modified file WebTaskAuthenticator.
>
> Apart from that it it identical (promise!) to PipelineAuthenticator!
Hmm...? Does not make sense to me.
Maybe this can help?
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=109577371304725&w=2
btw: the DOMUtil in question is org.apache.cocoon.xml.dom.DOMUtil, not
the one from xerces.
hth christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: PipelineAuthenticator
Posted by Paul Joseph <pj...@yahoo.com>.
I found the immediate cause of the error -
the "authenticationResourceName" is null in the call
final String authenticationResourceName =
configuration.getAuthenticationResource();
and hence the call below fails:
source = SourceUtil.getSource
authenticationResourceName, null,
parameters, this.resolver);
This begs the question of how does the
authenticationResourceName get set, so that
configuration.getAuthenticationResource() returns the
correct value?
thx
Paul
--- Paul Joseph <pj...@yahoo.com> wrote:
> Oops. I copied the PipelineAuthenticaor, added a db
> call to validate the uname/pwd and called my
> modified
> file WebTaskAuthenticator.
>
> Apart from that it it identical (promise!) to
> PipelineAuthenticator!
>
> thx
> Paul
> --- Christoph Kliemt <ch...@entici.de>
> wrote:
>
> > hi!
> >
> > Paul Joseph <pj...@yahoo.com> writes:
> >
> > > Hi,
> > >
> > > I am trying to use the PipelineAuthenticator
> > provided in the
> > > authentication-fw block, but am getting a NPE.
> >
> > [... exception snipped ...]
> >
> >
> > >
> >
> org.apache.cocoon.webapps.authentication.components.
> > >
> >
>
WebTaskAuthenticator.authenticate(WebTaskAuthenticator.java:178)
> >
> > What is this? I did not find this class in cocoons
> > sources...?
> >
> > hth christoph
> >
> >
> >
>
---------------------------------------------------------------------
> > 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: PipelineAuthenticator
Posted by Paul Joseph <pj...@yahoo.com>.
Oops. I copied the PipelineAuthenticaor, added a db
call to validate the uname/pwd and called my modified
file WebTaskAuthenticator.
Apart from that it it identical (promise!) to
PipelineAuthenticator!
thx
Paul
--- Christoph Kliemt <ch...@entici.de>
wrote:
> hi!
>
> Paul Joseph <pj...@yahoo.com> writes:
>
> > Hi,
> >
> > I am trying to use the PipelineAuthenticator
> provided in the
> > authentication-fw block, but am getting a NPE.
>
> [... exception snipped ...]
>
>
> >
> org.apache.cocoon.webapps.authentication.components.
> >
>
WebTaskAuthenticator.authenticate(WebTaskAuthenticator.java:178)
>
> What is this? I did not find this class in cocoons
> sources...?
>
> hth christoph
>
>
>
---------------------------------------------------------------------
> 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: PipelineAuthenticator
Posted by Christoph Kliemt <ch...@entici.de>.
hi!
Paul Joseph <pj...@yahoo.com> writes:
> Hi,
>
> I am trying to use the PipelineAuthenticator provided in the
> authentication-fw block, but am getting a NPE.
[... exception snipped ...]
> org.apache.cocoon.webapps.authentication.components.
> WebTaskAuthenticator.authenticate(WebTaskAuthenticator.java:178)
What is this? I did not find this class in cocoons sources...?
hth christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org