RE: Portal bug? - Using SessionTransformer inside coplets

2003-01-23 Thread Carsten Ziegeler
If you have the OutOfMemory Exception during build,
than have a look in the developer list mailing archive.
You have to set the maximum memory for the build task
to 256m.

HTH
Carsten 

Carsten Ziegeler 
Open Source Group, S&N AG


> -Original Message-
> From: Alex Romayev [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 5:58 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Portal bug? - Using SessionTransformer inside coplets
> 
> 
> I tried today's snapshot and got a
> java.lang.OutOfMemory exception.  I believe someone
> else got it as well.  I'll try again in a couple of
> days.
> 
> Cheers,
> -Alex
> 
> --- Carsten Ziegeler <[EMAIL PROTECTED]> wrote:
> > Alex Romayev wrote:
> > > 
> > > I'm using a version from a couple of months ago. 
> > I'll
> > > get the latest and try it again and let you know.
> > > 
> > Ok!
> > 
> > > While I have your attention, I've asked another
> > > question a couple of days ago about getting
> > parameter
> > > values from the request.  Could you take a look at
> > it,
> > > I'm pasting it below:
> > > 
> > Clever! :)
> > 
> > > 
> > > Hi,
> > > 
> > > I'm looking for help in how to extract parameter
> > > values using SessionTransformer.
> > > 
> > > My uri looks like this:
> > > 
> > > myaction?item=1&item=2&item=3
> > > 
> > > The SessionTransformer generates the following
> > path:
> > > 
> > > 
> > >   cinclude:parameters>
> > > 
> > >   item
> > >   1
> > > 
> > >   
> > > 
> > > 
> > > My goal is to turn this into the following xml:
> > > 
> > > 
> > >  1
> > >  2
> > >  3
> > > 
> > > 
> > > 
> > > Two questions:
> > > 
> > > 1. SessionTransformer javadoc says: This output
> > has
> > > the namespace of the CIncludeTransformer to use it
> > as
> > > input for a  command.  I
> > don't
> > > quite understand how I would make use of CIclude
> > > transformer.
> > This is only handy *if* you need the cinclude
> > transformer
> > to include additional content. So it's not of use
> > for you (in this context).
> > 
> > > 
> > > 2. I've tried doing the following:
> > > 
> > >  > >  
> > xmlns:session="http://cocoon.apache.org/session/1.0";
> > > 
> > >  
> > >
> >
> xmlns:cinclude="http://apache.org/cocoon/include/1.0";>
> > > 
> > >> >
> >
> xmlns:cinclude="http://apache.org/cocoon/include/1.0";
> > > context="request" 
> > >   
> > >
> >
> path="/parametervalues/cinclude:parameters/cinclude:parameter[cinc
> > > lude:name='item']/cinclude:value"/>
> > > 
> > > 
> > > So that I could later transform it to the xml I
> > need,
> > > but I get the following error:
> > > 
> > >  "Prefix must resolve to a namespace: cinclude"
> > > 
> > You can make a  > path="/"/>
> > and you will see all the xml outputted by the
> > request context.
> > 
> > You can use  > path="/parametervalues"/>
> > and you get the parameters as described above. All
> > your items
> > will then have the cinclude namespace, you have to
> > filter
> > them in a stylesheet or custom component.
> > 
> > HTH
> > Carsten
> > 
> >
> -
> > 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]>




RE: Portal bug? - Using SessionTransformer inside coplets

2003-01-23 Thread Alex Romayev
I tried today's snapshot and got a
java.lang.OutOfMemory exception.  I believe someone
else got it as well.  I'll try again in a couple of
days.

Cheers,
-Alex

--- Carsten Ziegeler <[EMAIL PROTECTED]> wrote:
> Alex Romayev wrote:
> > 
> > I'm using a version from a couple of months ago. 
> I'll
> > get the latest and try it again and let you know.
> > 
> Ok!
> 
> > While I have your attention, I've asked another
> > question a couple of days ago about getting
> parameter
> > values from the request.  Could you take a look at
> it,
> > I'm pasting it below:
> > 
> Clever! :)
> 
> > 
> > Hi,
> > 
> > I'm looking for help in how to extract parameter
> > values using SessionTransformer.
> > 
> > My uri looks like this:
> > 
> > myaction?item=1&item=2&item=3
> > 
> > The SessionTransformer generates the following
> path:
> > 
> > 
> >   cinclude:parameters>
> > 
> >   item
> >   1
> > 
> >   
> > 
> > 
> > My goal is to turn this into the following xml:
> > 
> > 
> >  1
> >  2
> >  3
> > 
> > 
> > 
> > Two questions:
> > 
> > 1. SessionTransformer javadoc says: This output
> has
> > the namespace of the CIncludeTransformer to use it
> as
> > input for a  command.  I
> don't
> > quite understand how I would make use of CIclude
> > transformer.
> This is only handy *if* you need the cinclude
> transformer
> to include additional content. So it's not of use
> for you (in this context).
> 
> > 
> > 2. I've tried doing the following:
> > 
> >  >  
> xmlns:session="http://cocoon.apache.org/session/1.0";
> > 
> >  
> >
>
xmlns:cinclude="http://apache.org/cocoon/include/1.0";>
> > 
> >>
>
xmlns:cinclude="http://apache.org/cocoon/include/1.0";
> > context="request" 
> >   
> >
>
path="/parametervalues/cinclude:parameters/cinclude:parameter[cinc
> > lude:name='item']/cinclude:value"/>
> > 
> > 
> > So that I could later transform it to the xml I
> need,
> > but I get the following error:
> > 
> >  "Prefix must resolve to a namespace: cinclude"
> > 
> You can make a  path="/"/>
> and you will see all the xml outputted by the
> request context.
> 
> You can use  path="/parametervalues"/>
> and you get the parameters as described above. All
> your items
> will then have the cinclude namespace, you have to
> filter
> them in a stylesheet or custom component.
> 
> HTH
> Carsten
> 
>
-
> Please check that your question  has not already
> been answered in the
> FAQ before posting.
> 
> 
> 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. 

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




RE: Portal bug? - Using SessionTransformer inside coplets

2003-01-23 Thread Carsten Ziegeler
Alex Romayev wrote:
> 
> I'm using a version from a couple of months ago.  I'll
> get the latest and try it again and let you know.
> 
Ok!

> While I have your attention, I've asked another
> question a couple of days ago about getting parameter
> values from the request.  Could you take a look at it,
> I'm pasting it below:
> 
Clever! :)

> 
> Hi,
> 
> I'm looking for help in how to extract parameter
> values using SessionTransformer.
> 
> My uri looks like this:
> 
> myaction?item=1&item=2&item=3
> 
> The SessionTransformer generates the following path:
> 
> 
>   cinclude:parameters>
> 
>   item
>   1
> 
>   
> 
> 
> My goal is to turn this into the following xml:
> 
> 
>  1
>  2
>  3
> 
> 
> 
> Two questions:
> 
> 1. SessionTransformer javadoc says: This output has
> the namespace of the CIncludeTransformer to use it as
> input for a  command.  I don't
> quite understand how I would make use of CIclude
> transformer.
This is only handy *if* you need the cinclude transformer
to include additional content. So it's not of use
for you (in this context).

> 
> 2. I've tried doing the following:
> 
>xmlns:session="http://cocoon.apache.org/session/1.0";
> 
>  
> xmlns:cinclude="http://apache.org/cocoon/include/1.0";>
> 
>xmlns:cinclude="http://apache.org/cocoon/include/1.0";
> context="request" 
>   
> path="/parametervalues/cinclude:parameters/cinclude:parameter[cinc
> lude:name='item']/cinclude:value"/>
> 
> 
> So that I could later transform it to the xml I need,
> but I get the following error:
> 
>  "Prefix must resolve to a namespace: cinclude"
> 
You can make a 
and you will see all the xml outputted by the request context.

You can use 
and you get the parameters as described above. All your items
will then have the cinclude namespace, you have to filter
them in a stylesheet or custom component.

HTH
Carsten

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Portal bug? - Using SessionTransformer inside coplets

2003-01-23 Thread Alex Romayev
Hi Carsten,

I'm using a version from a couple of months ago.  I'll
get the latest and try it again and let you know.

While I have your attention, I've asked another
question a couple of days ago about getting parameter
values from the request.  Could you take a look at it,
I'm pasting it below:


Hi,

I'm looking for help in how to extract parameter
values using SessionTransformer.

My uri looks like this:

myaction?item=1&item=2&item=3

The SessionTransformer generates the following path:


  cinclude:parameters>

  item
  1

  


My goal is to turn this into the following xml:


 1
 2
 3



Two questions:

1. SessionTransformer javadoc says: This output has
the namespace of the CIncludeTransformer to use it as
input for a  command.  I don't
quite understand how I would make use of CIclude
transformer.

2. I've tried doing the following:

http://cocoon.apache.org/session/1.0";

 
xmlns:cinclude="http://apache.org/cocoon/include/1.0";>

  http://apache.org/cocoon/include/1.0";
context="request" 
  
path="/parametervalues/cinclude:parameters/cinclude:parameter[cinclude:name='item']/cinclude:value"/>


So that I could later transform it to the xml I need,
but I get the following error:

 "Prefix must resolve to a namespace: cinclude"

Thanks,
-Alex

P.S. And the stack:

org.apache.cocoon.ProcessingException:
TransformerException:
javax.xml.transform.TransformerException: Prefix must
resolve to a namespace: cinclude:
javax.xml.transform.TransformerException: Prefix must
resolve to a namespace: cinclude
at
org.apache.cocoon.webapps.session.context.RequestSessionContext.streamXML(RequestSessionContext.java:635)
at
org.apache.cocoon.webapps.session.components.SessionManager.streamContextFragment(SessionManager.java:559)
at
org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.startTransformingElement(SessionPreTransformer.java:191)
at
org.apache.cocoon.webapps.session.transformation.SessionPostTransformer.startTransformingElement(SessionPostTransformer.java:230)
at
org.apache.cocoon.transformation.AbstractSAXTransformer.startElement(AbstractSAXTransformer.java:333)
at
org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.startElement(SessionPreTransformer.java:162)
at
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:454)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:217)
at
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:873)
at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:590)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:777)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1453)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
at
org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
at
org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:264)
at
org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:215)
at
org.apache.excalibur.xmlizer.impl.TextXMLizer.toSAX(TextXMLizer.java:44)
at
org.apache.excalibur.xmlizer.impl.AbstractXMLizer.toSAX(AbstractXMLizer.java:102)
at
org.apache.excalibur.xmlizer.impl.XMLizerImpl.toSAX(XMLizerImpl.java:94)
at
org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:537)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:140)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:273)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
at
org.apache.

RE: Portal bug? - Using SessionTransformer inside coplets

2003-01-23 Thread Carsten Ziegeler
Hi,

did you test the latest cvs version, because line 380 in
my source code cannot cause your problem?

Carsten

> -Original Message-
> From: Alex Romayev [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 1:38 AM
> To: [EMAIL PROTECTED]
> Subject: Portal bug? - Using SessionTransformer inside coplets
> 
> 
> I've run into a strange problem.  It seems like using
> SessionTransormer inside a coplet results in
> java.lang.NullPointerException.
> 
> Here is what I found:
> 1. If I run my coplet by invoking the coplet's uri
> directly everything works as expected.
> 2. If I invoke the coplet as part of a portal page
> using portal fw, it generates the exception.
> 3. I'm using session:getxml statements to get
> information from "request" context.  If I replace
> these statements with "dummy" data and _not_ have any
> of the session statements (I still have
> SessionTransformer in my pipeline, even though it
> doesn't actually do anything), everything works fine.
> 
> So it seems that for some reason using sesion:getxml
> from request context (or possibly other contexts -- I
> haven't tried) causes the excetion.
> 
> Please help, as this is a critical piece of my work!
> 
> Thanks,
> -Alex
> 
> Here is the stack trace:
> ERROR   (2003-01-22) 16:21.37:297  
> [core.portal-manager]
> (/cocoon/romayev/admin/write-result)
> Thread-8/CopletThread: Exception during processing of
> coplet: write-result
> org.apache.cocoon.ProcessingException: Failed to
> execute pipeline.: java.lang.NullPointerException
>   at
> org.apache.cocoon.components.source.impl.SitemapSource.toSAX(Sitem
> apSource.java:380)
>   at
> org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEn
> vironment.java:532)
>   at
> org.apache.cocoon.webapps.portal.components.CopletThread.run(Cople
> tThread.java:218)
>   at java.lang.Thread.run(Thread.java:484)
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> 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. 

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




RE: Portal bug? - Using SessionTransformer inside coplets

2003-01-23 Thread Alex Romayev
Hi Matthew,

I'm using cocoon:/ protocol.

-Alex

--- Matthew Langham <[EMAIL PROTECTED]> wrote:
> Which protocol are you using to call the coplets?
> 
> a) cocoon:/
> 
> b) cocoon:raw:/
> 
> If you want to pass request parameters on to the
> coplet then you need to
> make sure you are using a). See also:
>
http://marc.theaimsgroup.com/?l=xml-cocoon-users&w=2&r=1&s=cocoon%3Araw&q=b
> 
> Matthew
> 
> --
> Open Source Group   Cocoon { Consulting,
> Training, Projects }
>
=
> Matthew Langham, S&N AG, Klingenderstrasse 5,
> D-33100 Paderborn
> Tel:+49-5251-1581-30  [EMAIL PROTECTED] -
> http://www.s-und-n.de
>
-
> Cocoon book:
>  
>
http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
> Weblogs:
>   http://radio.weblogs.com/0103021/
>   http://www.oreillynet.com/weblogs/author/1014
>
=
> 
> 
> -Original Message-
> From: Alex Romayev [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 1:38 AM
> To: [EMAIL PROTECTED]
> Subject: Portal bug? - Using SessionTransformer
> inside coplets
> 
> 
> I've run into a strange problem.  It seems like
> using
> SessionTransormer inside a coplet results in
> java.lang.NullPointerException.
> 
> Here is what I found:
> 1. If I run my coplet by invoking the coplet's uri
> directly everything works as expected.
> 2. If I invoke the coplet as part of a portal page
> using portal fw, it generates the exception.
> 3. I'm using session:getxml statements to get
> information from "request" context.  If I replace
> these statements with "dummy" data and _not_ have
> any
> of the session statements (I still have
> SessionTransformer in my pipeline, even though it
> doesn't actually do anything), everything works
> fine.
> 
> So it seems that for some reason using sesion:getxml
> from request context (or possibly other contexts --
> I
> haven't tried) causes the excetion.
> 
> Please help, as this is a critical piece of my work!
> 
> Thanks,
> -Alex
> 
> Here is the stack trace:
> ERROR   (2003-01-22) 16:21.37:297
> [core.portal-manager]
> (/cocoon/romayev/admin/write-result)
> Thread-8/CopletThread: Exception during processing
> of
> coplet: write-result
> org.apache.cocoon.ProcessingException: Failed to
> execute pipeline.: java.lang.NullPointerException
>   at
>
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.j
> ava:380)
>   at
>
org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.
> java:532)
>   at
>
org.apache.cocoon.webapps.portal.components.CopletThread.run(CopletThread.ja
> va:218)
>   at java.lang.Thread.run(Thread.java:484)
> 
> 
>
-
> Please check that your question  has not already
> been answered in the
> FAQ before posting.
> 
> 
> 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.
> 
> 
> 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. 

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




RE: Portal bug? - Using SessionTransformer inside coplets

2003-01-22 Thread Matthew Langham
Which protocol are you using to call the coplets?

a) cocoon:/

b) cocoon:raw:/

If you want to pass request parameters on to the coplet then you need to
make sure you are using a). See also:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&w=2&r=1&s=cocoon%3Araw&q=b

Matthew

--
Open Source Group   Cocoon { Consulting, Training, Projects }
=
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  [EMAIL PROTECTED] - http://www.s-und-n.de
-
Cocoon book:
  http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
Weblogs:
  http://radio.weblogs.com/0103021/
  http://www.oreillynet.com/weblogs/author/1014
=


-Original Message-
From: Alex Romayev [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 1:38 AM
To: [EMAIL PROTECTED]
Subject: Portal bug? - Using SessionTransformer inside coplets


I've run into a strange problem.  It seems like using
SessionTransormer inside a coplet results in
java.lang.NullPointerException.

Here is what I found:
1. If I run my coplet by invoking the coplet's uri
directly everything works as expected.
2. If I invoke the coplet as part of a portal page
using portal fw, it generates the exception.
3. I'm using session:getxml statements to get
information from "request" context.  If I replace
these statements with "dummy" data and _not_ have any
of the session statements (I still have
SessionTransformer in my pipeline, even though it
doesn't actually do anything), everything works fine.

So it seems that for some reason using sesion:getxml
from request context (or possibly other contexts -- I
haven't tried) causes the excetion.

Please help, as this is a critical piece of my work!

Thanks,
-Alex

Here is the stack trace:
ERROR   (2003-01-22) 16:21.37:297
[core.portal-manager]
(/cocoon/romayev/admin/write-result)
Thread-8/CopletThread: Exception during processing of
coplet: write-result
org.apache.cocoon.ProcessingException: Failed to
execute pipeline.: java.lang.NullPointerException
at
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.j
ava:380)
at
org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.
java:532)
at
org.apache.cocoon.webapps.portal.components.CopletThread.run(CopletThread.ja
va:218)
at java.lang.Thread.run(Thread.java:484)


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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. 

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