You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ivelin Ivanov <iv...@apache.org> on 2002/08/29 15:41:37 UTC

[ANN] Another article on Cocoon - Web Syndication

http://www.webservices.org/index.php/article/articleview/613


-=Ivelin=-


---------------------------------------------------------------------
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>


[SUMMARY] Re: Cocoon runtime error: 'Session is required'

Posted by Alan Hodgkinson <al...@softxs.ch>.
How to fix stacktrace with: 'Session is required'

I'm sending this short summary, which contains the dumb answer to 
a dumb question, so that:

- Other dummies know what to do when they make the same dumb mistake.
- One day when the trouble shooting guide is witten, this can be 
  part of it.

Alan Hodgkinson wrote:

> I'm trying to implement session based forms and have run into the
> following error:
> 
> ERROR   (2002-09-03) 18:56.26:764   [sitemap] (/tc/test-form.html)
> HttpProcessor[8080][4]/PipelineNode: Error while processing pipeline at
> jndi:/localhost/tc/sitemap.xmap:440:19
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.IllegalArgumentException:
> CreateContext: Session is required
> ..[snip]..
> 
> It seems that my xsp page (which is processed by the session transformer)
> is attempting to access session context without there being a session.
> I was under the (perhaps incorrect) assumption that when you use the
> session transformer that it creates a session if necessary. 

That is an incorrect assumption. The session must be explicitly created.

> The session documentation doesn't say very much on this issue.

Also wrong. Smacks self and repeats 'RTMF' 100 times! Look at:

http://localhost:8080/cocoon/documents/userdocs/actions/session-action.html

Where it states that you need to use the session action to create a 
session. Change the pipeline as follows:

>       <!-- Form Handler -->
> 
>       <map:match pattern="*-form.html">
>         <map:generate type="serverpages" src="xsp/{1}-form.xsp"/>
          <!-- The next line causes the session to be created -->
          <map:act type="session"/>
>         <map:transform type="session"/>
>         <map:transform src="xsp/form2html.xslt"/>
>         <map:transform src="xsp/simple-page2html.xsl"/>
>         <map:serialize/>
>       </map:match>

---------------------------------------------------------------------
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>


Cocoon runtime error: 'Session is required'

Posted by Alan Hodgkinson <al...@softxs.ch>.
Dear All,

I'm trying to implement session besed forms and have run into the 
following error:

ERROR   (2002-09-03) 18:56.26:764   [sitemap] (/tc/test-form.html)
HttpProcessor[8080][4]/PipelineNode: Error while processing pipeline at
jndi:/localhost/tc/sitemap.xmap:440:19
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.IllegalArgumentException:
CreateContext: Session is required
        at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:281)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:502)
        at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
...

It seems that my xsp page (which is processed by the session
transformer)
is attempting to access session context without there being a session.
I was under the (perhaps incorrect) assumption that when you use the
session transformer that it creates a session if necessary. The session
documentation doesn't say very much on this issue.

Many thanks in advance for any tips (or pointers to relevant
docs/howtos).

My ultimate goal is to implement forms with validation, but I haven't
yet
studied all the XMLForms or Schematron stuff (any advice for which one
to
look at first or pointers to examples?).

Best wishes to all,

Alan Hodgkinson


P.S. Here are portions of the revelent files:

----- The pipeline from the sitemap

      <!-- Form Handler -->

      <map:match pattern="*-form.html">
        <map:generate type="serverpages" src="xsp/{1}-form.xsp"/>
        <map:transform type="session"/>
        <map:transform src="xsp/form2html.xslt"/>
        <map:transform src="xsp/simple-page2html.xsl"/>
        <map:serialize/>
      </map:match>


----- The XSP page that caused the error: user-form.xsp 
(Which is called with the url user-form.html)

<xsp:page
        language="java"
        create-session="yes"
        xmlns:xsp="http://apache.org/xsp"
        xmlns:session="http://cocoon.apache.org/session/1.0">

<page>
  <title>New User Entry</title>

  <!-- Question: is this needed? -->
  <session:createcontext name="userdata"/>

  <content>
    Enter information about the new user:
    <session:form name="userInfo">
      <session:action>user-info.html</session:action>
      <session:content>
        <table>
          <tr>
            <td>User ID</td>
            <td><session:inputxml
                    context="userdata" path="/user/userId"
                    name="userId" type="text"/>
            </td>
            ...
        </table>
        <!-- Question: coocon seems to need context & path, why? -->
        <session:inputxml
            context="userdata" path="/usr/submit" name="submit"
            type="submit" value="Create User"/>
      </session:content>
    </session:form>
  </content>
</page>
</xsp:page>

------

---------------------------------------------------------------------
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>


Re: [ANN] Another article on Cocoon - Web Syndication

Posted by Ivelin Ivanov <iv...@apache.org>.
Very possible. Only if webservices.org streamed it as xml ...


----- Original Message ----- 
From: "Andre Thenot" <at...@thenot.net>
To: <co...@xml.apache.org>
Sent: Friday, August 30, 2002 8:43 AM
Subject: Re: [ANN] Another article on Cocoon - Web Syndication


> 
> On Friday, August 30, 2002, at 08:58 , Ivelin Ivanov wrote:
> 
> > Not a bad idea,
> > eventually all the content can be ported to xdoc.
> 
> How about syndicating the documentation? :-)
> 
> (sorry, couldn't resist...)
> 
> A.
> 
> 
> ---------------------------------------------------------------------
> 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>
> 


---------------------------------------------------------------------
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>


Re: [ANN] Another article on Cocoon - Web Syndication

Posted by Andre Thenot <at...@thenot.net>.
On Friday, August 30, 2002, at 08:58 , Ivelin Ivanov wrote:

> Not a bad idea,
> eventually all the content can be ported to xdoc.

How about syndicating the documentation? :-)

(sorry, couldn't resist...)

A.


---------------------------------------------------------------------
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>


Re: [ANN] Another article on Cocoon - Web Syndication

Posted by Ivelin Ivanov <iv...@apache.org>.
Not a bad idea, 
eventually all the content can be ported to xdoc.


----- Original Message ----- 
From: "Michael Wechner" <mi...@wyona.org>
To: <co...@xml.apache.org>
Cc: "Diana Shannon" <sh...@apache.org>
Sent: Friday, August 30, 2002 3:03 AM
Subject: Re: [ANN] Another article on Cocoon - Web Syndication


> 
> 
> Ivelin Ivanov wrote:
> 
> > We can include the whole piece in the Cocoon docs.
> > No copyright issues.
> > Willing to help :-?
> > 
> > I liked your xdoc on the ServletProxy.
> > My xdocs skills are lagging behind, so I will appreciate assistance.
> 
> 
> Yes, I would certainly like to help, but I am a bit lacking time at the 
> moment. Maybe we could start a "small" xdoc for the beginning and just 
> place a link to your article at WebServices.org. What do you think?
> 
> All the best
> 
> Michael
> 
> 
> > 
> > 
> > Cheers,
> > 
> > Ivelin
> > 
> > 
> > ----- Original Message ----- 
> > From: "Michael Wechner" <mi...@wyona.org>
> > To: <co...@xml.apache.org>
> > Sent: Thursday, August 29, 2002 4:16 PM
> > Subject: Re: [ANN] Another article on Cocoon - Web Syndication
> > 
> > 
> > 
> >>Ivelin, very nice article.
> >>
> >>Are you going to include parts of it within Cocoon documentation?
> >>
> >>Thanks
> >>
> >>Michael
> >>
> >>
> >>
> >>Ivelin Ivanov wrote:
> >>
> >>
> >>>http://www.webservices.org/index.php/article/articleview/613
> >>>
> >>>
> >>>-=Ivelin=-
> >>>
> >>>
> >>>---------------------------------------------------------------------
> >>>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>
> >>>
> >>
> >>-- 
> >>OSCOM - Open Source Content Management Conference
> >>September 25th - 27th 2002, Berkeley, California
> >>http://www.oscom.org/conferences/berkeley2002/
> >>
> >>
> >>---------------------------------------------------------------------
> >>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>
> >>
> > 
> > 
> > ---------------------------------------------------------------------
> > 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>
> > 
> 
> 
> -- 
> OSCOM - Open Source Content Management Conference
> September 25th - 27th 2002, Berkeley, California
> http://www.oscom.org/conferences/berkeley2002/
> 
> 
> ---------------------------------------------------------------------
> 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>
> 


---------------------------------------------------------------------
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>


Re: [ANN] Another article on Cocoon - Web Syndication

Posted by Michael Wechner <mi...@wyona.org>.

Ivelin Ivanov wrote:

> We can include the whole piece in the Cocoon docs.
> No copyright issues.
> Willing to help :-?
> 
> I liked your xdoc on the ServletProxy.
> My xdocs skills are lagging behind, so I will appreciate assistance.


Yes, I would certainly like to help, but I am a bit lacking time at the 
moment. Maybe we could start a "small" xdoc for the beginning and just 
place a link to your article at WebServices.org. What do you think?

All the best

Michael


> 
> 
> Cheers,
> 
> Ivelin
> 
> 
> ----- Original Message ----- 
> From: "Michael Wechner" <mi...@wyona.org>
> To: <co...@xml.apache.org>
> Sent: Thursday, August 29, 2002 4:16 PM
> Subject: Re: [ANN] Another article on Cocoon - Web Syndication
> 
> 
> 
>>Ivelin, very nice article.
>>
>>Are you going to include parts of it within Cocoon documentation?
>>
>>Thanks
>>
>>Michael
>>
>>
>>
>>Ivelin Ivanov wrote:
>>
>>
>>>http://www.webservices.org/index.php/article/articleview/613
>>>
>>>
>>>-=Ivelin=-
>>>
>>>
>>>---------------------------------------------------------------------
>>>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>
>>>
>>
>>-- 
>>OSCOM - Open Source Content Management Conference
>>September 25th - 27th 2002, Berkeley, California
>>http://www.oscom.org/conferences/berkeley2002/
>>
>>
>>---------------------------------------------------------------------
>>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>
>>
> 
> 
> ---------------------------------------------------------------------
> 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>
> 


-- 
OSCOM - Open Source Content Management Conference
September 25th - 27th 2002, Berkeley, California
http://www.oscom.org/conferences/berkeley2002/


---------------------------------------------------------------------
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>


Re: [ANN] Another article on Cocoon - Web Syndication

Posted by Ivelin Ivanov <iv...@apache.org>.
We can include the whole piece in the Cocoon docs.
No copyright issues.
Willing to help :-?

I liked your xdoc on the ServletProxy.
My xdocs skills are lagging behind, so I will appreciate assistance.


Cheers,

Ivelin


----- Original Message ----- 
From: "Michael Wechner" <mi...@wyona.org>
To: <co...@xml.apache.org>
Sent: Thursday, August 29, 2002 4:16 PM
Subject: Re: [ANN] Another article on Cocoon - Web Syndication


> Ivelin, very nice article.
> 
> Are you going to include parts of it within Cocoon documentation?
> 
> Thanks
> 
> Michael
> 
> 
> 
> Ivelin Ivanov wrote:
> 
> > http://www.webservices.org/index.php/article/articleview/613
> > 
> > 
> > -=Ivelin=-
> > 
> > 
> > ---------------------------------------------------------------------
> > 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>
> > 
> 
> 
> -- 
> OSCOM - Open Source Content Management Conference
> September 25th - 27th 2002, Berkeley, California
> http://www.oscom.org/conferences/berkeley2002/
> 
> 
> ---------------------------------------------------------------------
> 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>
> 


---------------------------------------------------------------------
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>


Re: [ANN] Another article on Cocoon - Web Syndication

Posted by Michael Wechner <mi...@wyona.org>.
Ivelin, very nice article.

Are you going to include parts of it within Cocoon documentation?

Thanks

Michael



Ivelin Ivanov wrote:

> http://www.webservices.org/index.php/article/articleview/613
> 
> 
> -=Ivelin=-
> 
> 
> ---------------------------------------------------------------------
> 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>
> 


-- 
OSCOM - Open Source Content Management Conference
September 25th - 27th 2002, Berkeley, California
http://www.oscom.org/conferences/berkeley2002/


---------------------------------------------------------------------
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>


Re: [ANN] Another article on Cocoon - Web Syndication

Posted by Ivelin Ivanov <iv...@apache.org>.
I think the date is ok now.

Although I have to assure you that I have the original idea since 1970 ...
;)


----- Original Message -----
From: "Antonio Gallardo Rivera" <ag...@agsoftware.dnsalias.com>
To: <co...@xml.apache.org>
Sent: Thursday, August 29, 2002 11:35 AM
Subject: Re: [ANN] Another article on Cocoon - Web Syndication


Lol, then Ivelin Ivanov is a really visionary guy. He realize since 1970 all
about Cocoon and Web Syndicate!

Anyway, very nice article.

Antonio Gallardo

El Jueves, 29 de Agosto de 2002 08:00, Artur Bialecki escribió:
> That article was published on January 1, 1970
> only few days before I was born.
>
> Can't believe cocoon is older than I am :)
>
> Artur...
>
> ---------------------------------------------------------------------
> 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>

---------------------------------------------------------------------
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>



---------------------------------------------------------------------
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>


Re: [ANN] Another article on Cocoon - Web Syndication

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Lol, then Ivelin Ivanov is a really visionary guy. He realize since 1970 all 
about Cocoon and Web Syndicate!

Anyway, very nice article.

Antonio Gallardo

El Jueves, 29 de Agosto de 2002 08:00, Artur Bialecki escribió:
> That article was published on January 1, 1970
> only few days before I was born.
>
> Can't believe cocoon is older than I am :)
>
> Artur...
>
> ---------------------------------------------------------------------
> 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>

---------------------------------------------------------------------
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>


RE: [ANN] Another article on Cocoon - Web Syndication

Posted by Artur Bialecki <ar...@digitalfairway.com>.
That article was published on January 1, 1970
only few days before I was born. 

Can't believe cocoon is older than I am :)

Artur...

---------------------------------------------------------------------
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>