Seems like my celebration was a little premature.. In trying to 
implement a logout action, I get the same null pointer error. So now I 
can log in, but I can't log out.

Here's the logout pipeline:

<map:match pattern="logout">
           <map:act type="sunRise-logout">
                  <map:parameter name="handler" value="foo-handler"/>
           <map:redirect-to uri="foo-loginpage"/>
           </map:act>
</map:match>

Stack trace is basically identical to the previous one. Is there another 
Jar that the logout action may be dependent upon that needs to be placed 
in the tomcat endorsed dir? I looked at the referenced line in code of 
where the stack trace occurred ( at 
org.apache.cocoon.sunshine.sunrise.SunRise.logout(SunRise.java:1083) ), 
and it seemed like that's where it tries to destroy the session context 
set during login. I'm thinking parsing error again, but what's confusing 
is that if sunRise can work correctly logging in, what's the issue 
logging out??

Again, thanks for the time and patience with this Cocoon newbie!

-Brian


Brian Schwark wrote:

> Carsten and Ruben -
>
> Again, thanks for your input. Putting those jars into the Tomcat 
> Endorsed directory worked perfectly. I also had to drop the XML-APIS 
> jar in there to get it to come up, but now I've got everything working 
> the way it's supposed to (more or less!) Cheers!  :)
>
> -Brian Schwark
> [EMAIL PROTECTED]
>
> Carsten Ziegeler wrote:
>
>> Hi Brian,
>>
>> for Tomcat 4 you have to put the xerces and xalan versions of
>> Cocoon into the tomcat endorsed directory.
>> This is either described somewhere in the installation docs
>> or you have to search the mail archives for this.
>>
>> HTH
>> Carsten
>>
>>  
>>
>>> -----Original Message-----
>>> From: Brian Schwark [mailto:[EMAIL PROTECTED]]
>>> Sent: Tuesday, October 08, 2002 3:35 PM
>>> To: [EMAIL PROTECTED]
>>> Subject: Re: sunRise - java.lang.NullPointerException
>>>
>>>
>>> Carsten, thanks for the response.
>>>
>>> The stack trace for my problem is as follows: (Spammy...)
>>>
>>> *type* fatal
>>>
>>> *message* _null_
>>>
>>> *description* _java.lang.NullPointerException_
>>>
>>> *sender* org.apache.cocoon.servlet.CocoonServlet
>>>
>>> *source* Cocoon servlet
>>>
>>> *stack-trace*
>>>
>>> java.lang.NullPointerException
>>>     at
>>> org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:869) 
>>>
>>>     at
>>> org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:871) 
>>>
>>>     at
>>> org.apache.cocoon.sunshine.xml.XMLUtil.getNodesFromPath(XMLUtil.java:871) 
>>>
>>>     at
>>> org.apache.cocoon.sunshine.xml.XMLUtil.getNodeListFromPath(XMLUtil
>>> .java:836)
>>>     at
>>> org.apache.cocoon.sunshine.context.SimpleSessionContext.getXML(Sim
>>> pleSessionContext.java:173)
>>>     at
>>> org.apache.cocoon.sunshine.sunrise.SunRise.isAuthenticated(SunRise
>>> .java:691)
>>>     at
>>> org.apache.cocoon.sunshine.sunrise.SunRise.checkAuthentication(Sun
>>> Rise.java:766)
>>>     at
>>> org.apache.cocoon.sunshine.sunrise.acting.AuthAction.act(AuthActio
>>> n.java:122)
>>>     at
>>> org.apache.cocoon.www.file_.C_.Program_Files.Apache_Group.Tomcat_4
>>> _1.webapps.cocoon.sitemap_xmap.matchN400948(C:\Program
>>> Files\Apache Group\Tomcat
>>> 4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoo
>>>   
>>
>> n/www/file_/C_/Program_Files/Apache_Group/Tomcat_4_1/webapps/cocoon\sitemap_ 
>>
>> xmap.java:10954)
>>  
>>
>>>     at
>>> org.apache.cocoon.www.file_.C_.Program_Files.Apache_Group.Tomcat_4
>>> _1.webapps.cocoon.sitemap_xmap.process(C:\Program Files\Apache
>>> Group\Tomcat
>>> 4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoo
>>>   
>>
>> n/www/file_/C_/Program_Files/Apache_Group/Tomcat_4_1/webapps/cocoon\sitemap_ 
>>
>> xmap.java:4491)
>>  
>>
>>>     at
>>> org.apache.cocoon.www.file_.C_.Program_Files.Apache_Group.Tomcat_4
>>> _1.webapps.cocoon.sitemap_xmap.process(C:\Program Files\Apache
>>> Group\Tomcat
>>> 4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoo
>>>   
>>
>> n/www/file_/C_/Program_Files/Apache_Group/Tomcat_4_1/webapps/cocoon\sitemap_ 
>>
>> xmap.java:3867)
>>  
>>
>>>     at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
>>>     at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
>>>     at
>>> org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154) 
>>>
>>>     at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
>>>     at
>>> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>     at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
>>> pplicationFilterChain.java:247)
>>>     at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
>>> onFilterChain.java:193)
>>>     at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
>>> erValve.java:260)
>>>     at
>>> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
>>> text.invokeNext(StandardPipeline.java:643)
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
>>> java:480)
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>>     at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardConte
>>> xtValve.java:191)
>>>     at
>>> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
>>> text.invokeNext(StandardPipeline.java:643)
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
>>> java:480)
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>>     at
>>> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2350) 
>>>
>>>     at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
>>> e.java:180)
>>>     at
>>> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
>>> text.invokeNext(StandardPipeline.java:643)
>>>     at
>>> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
>>> cherValve.java:170)
>>>     at
>>> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
>>> text.invokeNext(StandardPipeline.java:641)
>>>     at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
>>> e.java:171)
>>>     at
>>> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
>>> text.invokeNext(StandardPipeline.java:641)
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
>>> java:480)
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>>     at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
>>> Valve.java:174)
>>>     at
>>> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
>>> text.invokeNext(StandardPipeline.java:643)
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
>>> java:480)
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>>     at
>>> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>>>     at
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) 
>>>
>>>     at
>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.pr
>>> ocessConnection(Http11Protocol.java:380)
>>>     at
>>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) 
>>>
>>>     at
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thre
>>> adPool.java:533)
>>>     at java.lang.Thread.run(Thread.java:536)
>>>
>>> *request-uri*
>>>
>>> /cocoon/foo-protected
>>>
>>> *path-info*
>>>
>>> foo-protected
>>>
>>> Here's the pipelines I've defined for my handler, which for testing
>>> purposes is just called "foo-handler".
>>>
>>> Loginpage Pipeline:
>>>
>>> <map:match pattern="foo-loginpage">
>>>              <map:generate src="content/logintest/loginpage.xml" />
>>>              <map:transform src="content/logintest/loginpage.xsl" />
>>>              <map:transform type="encodeURL" />
>>>              <map:serialize />
>>>    </map:match>
>>>
>>> Protected Resource:
>>>
>>> <map:match pattern="foo-protected">
>>>        <map:act type="sunRise-auth">
>>>            <map:parameter name="handler" value="foo-handler"/>
>>>            <map:generate src="content/logintest/protected.xml"/>
>>>        </map:act>
>>>        <map:transform src="content/logintest/protected.xsl"/>
>>>        <map:serialize/>
>>> </map:match>
>>>
>>> Login Resource:
>>>
>>> <map:match pattern="foo-login">
>>>         <map:act type="sunRise-login">
>>>           <map:parameter name="handler" value="foo-handler"/>
>>>           <map:parameter name="parameter_name" value="request:name"/>
>>>           <map:parameter name="parameter_password"
>>> value="request:password"/>
>>>           <!-- If the authentication is successful then this redirect
>>> will be performed -->
>>>           <map:redirect-to uri="foo-protected"/>
>>>         </map:act>
>>>         <!-- authentication failed: -->
>>>         <map:generate src="login-failed.xml"/>
>>>         <map:transform src="login-failed.xsl"/>
>>>        <map:serialize/>
>>>      </map:match>
>>>
>>> Authenticatoin resource:
>>>
>>> <map:match pattern="foo-authuser">
>>>            <map:generate src="content/logintest/authenticate.xml" />
>>>            <map:transform src="content/logintest/foo-user.xsl">
>>>               <map:parameter name="use-request-parameters"
>>> value="true" />
>>>            </map:transform>
>>>            <map:serialize type = "xml" />
>>>      </map:match>
>>>
>>> My test example is rather limited, merely so that I can gain enough
>>> knowledge to implement sunRise. My authentication resource is creating
>>> the required XML file from another XML file containing usernames and
>>> passwords. (As per Matthew Langham's sunRise component guide,
>>> http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunris
>>> eComponents.html).
>>> Everything I have implemented thus far is straight from his guide, in it
>>> you can see the syntax of the individual files of the pipeline that I
>>> have used.
>>>
>>> I get completely through the login sequence, until after entering my
>>> username and password and being redirected back to my protected
>>> resource. A session does get created, because I can see it both in the
>>> URL and I assume a cookie is also set, because if I try to access the
>>> protected resource repeatedly without closing the browser, it just fails
>>> out with the Java null error. So I assume most things here are working
>>> correctly, but something little is hanging me up..
>>>
>>> I am also working with a CVS version which is probably a good few weeks
>>> old (mainly to just learn everything I need to know about Cocoon before
>>> implementing it.), is there any possibility that sunRise may have been
>>> broken? I've downloaded the lastest automated CVS build and will be
>>> testing that to see if I fare any better.
>>>
>>> Thanks a lot for your patience and help!
>>>
>>> -Brian Schwark
>>> [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>> Carsten Ziegeler wrote:
>>>
>>>   
>>>
>>>> Please give us more information - stack trace of the exception,
>>>> log files, sitemap etc - everything which might be appropriated
>>>> to tell where the error occurs.
>>>>
>>>> Carsten
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>> -----Original Message-----
>>>>> From: Brian Schwark [mailto:[EMAIL PROTECTED]]
>>>>> Sent: Monday, October 07, 2002 8:19 PM
>>>>> To: [EMAIL PROTECTED]
>>>>> Subject: sunRise - java.lang.NullPointerException
>>>>>
>>>>>
>>>>> Greetings everyone -
>>>>>
>>>>> I'm trying to get set up with sunRise. I've managed to get most of the
>>>>> setup complete for authentication and protection of a test
>>>>>       
>>>>
>>> resource. I'm
>>>   
>>>
>>>>> able to enter a username and a password, and I can see in the encoded
>>>>> URI in the browser window that redirection to my resource occurs and a
>>>>> session ID is assigned, so I assume authentication and session 
>>>>> creation
>>>>> is occuring as it should. When I get redirected to my requested
>>>>>       
>>>>
>>> resource
>>>   
>>>
>>>>> after login, however, cocoon fails with a
>>>>> java.lang.NullPointerException. I've been trying to track down 
>>>>> what may
>>>>> be causing the problem, but to no avail. I assume that if a session is
>>>>> indeed being created, my authentication resource is returning 
>>>>> valid XML
>>>>> in the required format and the sunRise-login action is succeeding. The
>>>>> documents I'm generating for my protected resource aren't to blame,
>>>>> since if protection is taken off, they serialize just fine.
>>>>>
>>>>> Any ideas as to where I'm hitting a wall? All help greatly 
>>>>> appreciated!
>>>>>
>>>>> -Brian Schwark
>>>>> [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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:     <[EMAIL PROTECTED]>
>>>>> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>>>>>
>>>>>
>>>>>
>>>>>       
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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:     <[EMAIL PROTECTED]>
>>>> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>     
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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:     <[EMAIL PROTECTED]>
>>> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>>>
>>>   
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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:     <[EMAIL PROTECTED]>
>> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>>
>>
>>
>>  
>>
>
>
>
> ---------------------------------------------------------------------
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>



---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to