You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stefano Mazzocchi <st...@apache.org> on 2003/10/09 23:34:35 UTC

Re: cvs commit: cocoon-2.1/src/webapp/WEB-INF cocoon.xconf

On Thursday, Oct 9, 2003, at 22:30 Europe/Rome, Antonio Gallardo wrote:

>> antonio     2003/10/09 13:12:35
>>
>>   Modified:    src/webapp/WEB-INF cocoon.xconf
>>   Log:
>>   Fixing bug related to woody form handling posted
>>   by Carlos Chávez. Bruno Dumon suggested the fix
>>   and it works back again.
>>
>>   Revision  Changes    Path
>>   1.31      +1 -1      cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf
>>
>>   Index: cocoon.xconf
>>   ===================================================================
>> RCS file: /home/cvs//cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf,v
>> retrieving revision 1.30
>>   retrieving revision 1.31
>>   diff -u -r1.30 -r1.31
>>   --- cocoon.xconf	6 Oct 2003 16:10:55 -0000	1.30
>>   +++ cocoon.xconf	9 Oct 2003 20:12:35 -0000	1.31
>>   -    <parameter name="reuse-parsers" value="true"/>
>>   +    <parameter name="reuse-parsers" value="false"/>
>
> Next time we need to be more carefully :)

i don't get it. if the above breaks woody, this is a hack, not a fix. 
we need to really fix the bug, not to route around it. any info on 
where the problem is?

--
Stefano.


Re: cvs commit: cocoon-2.1/src/webapp/WEB-INF cocoon.xconf

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Stefano Mazzocchi wrote:

> On Friday, Oct 10, 2003, at 12:51 Europe/Rome, Bruno Dumon wrote:
>
>> So until someone has time to try this out and update the 
>> excalibur-xmlutil package, we're stuck with reuse-parsers set to false.
>
>
> Sylvain? ;-)
>
> -- 
> Stefano, with gentle voice and french accent

;-)

[Stefano asks me since we discussed this during the hackaton]

I think Bruno did the right analysis: in JaxpParser, the LexicalHandler 
and Resolver are set only if non-null, meaning values set for a previous 
parsing are kept, causing weird effects since SAX events are sent to 
handlers no more part or the current processing...

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Re: cvs commit: cocoon-2.1/src/webapp/WEB-INF cocoon.xconf

Posted by Stefano Mazzocchi <st...@apache.org>.
On Friday, Oct 10, 2003, at 12:51 Europe/Rome, Bruno Dumon wrote:

> So until someone has time to try this out and update the
> excalibur-xmlutil package, we're stuck with reuse-parsers set to false.

Sylvain? ;-)

--
Stefano, with gentle voice and french accent


Re: cvs commit: cocoon-2.1/src/webapp/WEB-INF cocoon.xconf

Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2003-10-09 at 23:50, Antonio Gallardo wrote:
> Stefano Mazzocchi dijo:
> >
> > On Thursday, Oct 9, 2003, at 22:30 Europe/Rome, Antonio Gallardo wrote:
> >
> >>> antonio     2003/10/09 13:12:35
> >>>
> >>>   Modified:    src/webapp/WEB-INF cocoon.xconf
> >>>   Log:
> >>>   Fixing bug related to woody form handling posted
> >>>   by Carlos Chávez. Bruno Dumon suggested the fix
> >>>   and it works back again.
> >>>
> >>>   Revision  Changes    Path
> >>>   1.31      +1 -1      cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf
> >>>
> >>>   Index: cocoon.xconf
> >>>   ===================================================================
> >>> RCS file: /home/cvs//cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf,v
> >>> retrieving revision 1.30
> >>>   retrieving revision 1.31
> >>>   diff -u -r1.30 -r1.31
> >>>   --- cocoon.xconf	6 Oct 2003 16:10:55 -0000	1.30
> >>>   +++ cocoon.xconf	9 Oct 2003 20:12:35 -0000	1.31
> >>>   -    <parameter name="reuse-parsers" value="true"/>
> >>>   +    <parameter name="reuse-parsers" value="false"/>
> >>
> >> Next time we need to be more carefully :)
> >
> > i don't get it. if the above breaks woody, this is a hack, not a fix.
> > we need to really fix the bug, not to route around it. any info on
> > where the problem is?
> 
> This problem does not breaks woody. It breaks Flow, continuations, woody
> and maybe other areas that I am not using. Maybe someone else can post
> other related problems.

Well it has nothing to do with any of those. What I noticed is that if
reuse-parsers is set to true, I got a SAX comment event of a comment
that appeared in an XSL stylesheet which turned up in the SAX pipeline. 

I checked the javadoc of the XMLReader class (which is the thing being
reused) and it mentions "Once a parse is complete, an application may
reuse the same XMLReader object, possibly with a different input
source". So the XMLReader can be reused.

What's likely the problem (but I can't spend time on this right now) is
that the JaxpParser component only sets the lexicalhandler property on
the parser if it has one. If the parser is being reused, and no
lexicalhandler is being provided, the previous lexicalhandler will
remain used. This can probably be solved by setting it explicitely to
null.

So until someone has time to try this out and update the
excalibur-xmlutil package, we're stuck with reuse-parsers set to false.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: cvs commit: cocoon-2.1/src/webapp/WEB-INF cocoon.xconf

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Stefano Mazzocchi dijo:
>
> On Thursday, Oct 9, 2003, at 22:30 Europe/Rome, Antonio Gallardo wrote:
>
>>> antonio     2003/10/09 13:12:35
>>>
>>>   Modified:    src/webapp/WEB-INF cocoon.xconf
>>>   Log:
>>>   Fixing bug related to woody form handling posted
>>>   by Carlos Chávez. Bruno Dumon suggested the fix
>>>   and it works back again.
>>>
>>>   Revision  Changes    Path
>>>   1.31      +1 -1      cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf
>>>
>>>   Index: cocoon.xconf
>>>   ===================================================================
>>> RCS file: /home/cvs//cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf,v
>>> retrieving revision 1.30
>>>   retrieving revision 1.31
>>>   diff -u -r1.30 -r1.31
>>>   --- cocoon.xconf	6 Oct 2003 16:10:55 -0000	1.30
>>>   +++ cocoon.xconf	9 Oct 2003 20:12:35 -0000	1.31
>>>   -    <parameter name="reuse-parsers" value="true"/>
>>>   +    <parameter name="reuse-parsers" value="false"/>
>>
>> Next time we need to be more carefully :)
>
> i don't get it. if the above breaks woody, this is a hack, not a fix.
> we need to really fix the bug, not to route around it. any info on
> where the problem is?

This problem does not breaks woody. It breaks Flow, continuations, woody
and maybe other areas that I am not using. Maybe someone else can post
other related problems.

The problem looks to be part of Xerces. Snip from cocoon.xconf:

<snip>
| - reuse-parsers (boolean, default = true) : do we want to reuse
|     parsers or create a new parser for each parse ?
|     Note : even if this parameter is true, parsers are not recycled
|     in case of parsing errors : some parsers (e.g. Xerces) do not like
|     to be reused after failure.
</snip>

I don't know if this is a hack or not, but this was always false since I
am using Cocoon. Also, don't know if we need to go into Xerces parser and
repair the error.

Best Regards,

Antonio Gallardo.