You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ugo Cei <u....@cbim.it> on 2002/12/02 17:23:10 UTC
[C2.1] Error in flow samples
The "User Preferences" control flow sample in the current CVS HEAD (plus
the latest patches from Ovidiu) seems to be broken. Here is a snippet
from the error page that comes up whenever you click on the "Register
User" link.
Ugo
The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode
notifies that org.apache.cocoon.ProcessingException says:
Failed to execute pipeline.
More precisely:
org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
userInfo_xsp:
ERROR 1
(/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
...
if (false) {
}
else if ((((__jxpathResult =
// start error (lines 425-425) " variable jxpath_checkandfirstName not
found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
jxpath_checkandfirstName
// end error
.getValue(jxpathContext))
instanceof Boolean)
&& ((Boolean)__jxpathResult).booleanValue() == true)
|| (!(__jxpathResult instanceof Boolean)
...
ERROR 2
(/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
...
if (false) {
}
else if ((((__jxpathResult =
// start error (lines 543-543) " variable jxpath_checkandlastName not
found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
jxpath_checkandlastName
// end error
.getValue(jxpathContext))
instanceof Boolean)
&& ((Boolean)__jxpathResult).booleanValue() == true)
|| (!(__jxpathResult instanceof Boolean)
...
ERROR 3
(/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
...
if (false) {
}
else if ((((__jxpathResult =
// start error (lines 661-661) " variable jxpath_checkandemail not found
in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
jxpath_checkandemail
// end error
.getValue(jxpathContext))
instanceof Boolean)
&& ((Boolean)__jxpathResult).booleanValue() == true)
|| (!(__jxpathResult instanceof Boolean)
...
ERROR 4
(/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
...
if (false) {
}
else if ((((__jxpathResult =
// start error (lines 779-779) " variable jxpath_checkandlogin not found
in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
jxpath_checkandlogin
// end error
.getValue(jxpathContext))
instanceof Boolean)
&& ((Boolean)__jxpathResult).booleanValue() == true)
|| (!(__jxpathResult instanceof Boolean)
...
ERROR 5
(/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
...
if (false) {
}
else if ((((__jxpathResult =
// start error (lines 897-897) " variable jxpath_checkandpassword not
found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
jxpath_checkandpassword
// end error
.getValue(jxpathContext))
instanceof Boolean)
&& ((Boolean)__jxpathResult).booleanValue() == true)
|| (!(__jxpathResult instanceof Boolean)
...
ERROR 6
(/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
...
this.characters("\n\n ");
__jxpathResult =
// start error (lines 1050-1050) " variable jxpath_cancel not found in
class org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
jxpath_cancel
// end error
.getValue(jxpathContext);
if ((__jxpathResult instanceof Boolean
&& ((Boolean)__jxpathResult).booleanValue() == true)
|| (!(__jxpathResult instanceof Boolean)
...
Line 425, column 4: variable jxpath_checkandfirstName not found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
Line 543, column 4: variable jxpath_checkandlastName not found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
Line 661, column 4: variable jxpath_checkandemail not found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
Line 779, column 4: variable jxpath_checkandlogin not found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
Line 897, column 4: variable jxpath_checkandpassword not found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
Line 1050, column 4: variable jxpath_cancel not found in class
org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
Line 0, column 0:
6 errors
--
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [C2.1] Error in flow samples
Posted by Ugo Cei <u....@cbim.it>.
> Maybe it has to do with XSLTC? I'm going to get rid of it and see if it
> makes any difference.
This is the difference it makes:
java.lang.StackOverflowError
:-(
--
Ugo Cei - http://www.beblogging.com/blog/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [C2.1] Error in flow samples
Posted by Ugo Cei <u....@cbim.it>.
Following up to myself:
> Next thing I'm doing is try to implement a small test case using just a
> source document and a stylesheet outside of Cocoon, transforming the
> former with different processors. Sigh.
Done. Results are baffling, though: Xalan 2.4.1 (same JAR as used in
Cocoon) gets it *right* when used from the command line. Also Saxon
does. But Cocoon with Xalan 2.4.1 gets it *wrong*.
Maybe it has to do with XSLTC? I'm going to get rid of it and see if it
makes any difference.
Ugo
--
Ugo Cei - http://www.beblogging.com/blog/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [C2.1] Error in flow samples
Posted by Ovidiu Predescu <ov...@apache.org>.
On Thursday, Dec 5, 2002, at 02:54 US/Pacific, Ugo Cei wrote:
> Marcus Crafter wrote:
>>> Yes, I still have the problem, even after I made a cvs update and
>>> recompiled everything. I'm using JDK 1.4.1 under Tomcat 4.1.12,
>>> Solaris 8, by the way.
>> Ok, this is quite strange then. The userprefs example works for me,
>> jdk 1.4.1, Tomcat 3.3.1, Debian GNU/Linux (unstable).
>
> I hoped I could ignore this problem, but it has appeared also in my
> code, so I've tried debugging it and this is what I've come up with.
>
> In jpath.xsl there's the following code:
>
> <xsl:apply-templates
> select="(//jpath:if | //jpath:when)
> [generate-id(.) = generate-id(key('JPathExprs', @test)[1])]
> | (//jpath:for-each | //jpath:value-of)
> [generate-id(.) = generate-id(key('JPathExprs',
> @select)[1])]"
> mode="compile"/>
>
> This code is supposed to generate a list of declarations like the
> following:
>
> CompiledExpression jxpath_title = jxpathContext.compile("title");
>
> However if generates them ONLY if the value of the "test" or "select"
> attribute of the jpath:{if,when,for-each,value-of} element is a simple
> string. It ouptuts NOTHING when the value is something more
> complicated like for instance:
>
> <jpath:when test="check and firstName = ''">
The logicsheet makes use of some XSLT standard functions like
translate() to translate the XPath expression into a variable name. It
might be that these functions are either not implemented or are broken.
Perhaps a little standalone test which uses the construct from
jpath.xsl will show what the problem is.
> Since I don't see anything wrong with the logicsheet and since it
> works for you, I suspect it has to do with a bug in the XSLT > processor.
>
> In my setup, I have moved xalan-2.4.1.jar, xercesImpl-2.1.0.jar,
> xsltc.jar and xml-apis.jar from WEB-INF/lib to
> $CATALINA_HOME/common/endorsed (using Tomcat 4.1.12, JDK 1.4.1_01).
>
> After having fought for a while with XSLT processors for the pipeline
> transformation stage (moving from Xalan to Saxon and back to Xalan
> again), I did not expect to fight another battle just to get XSP to
> work as expected :-(. By the way, which XSLT processor is used for
> transforming XSPs to Java? Is it possible to configure it?
I was using a quite old version of Cocoon on my machine, which worked
fine with Xalan 2.3.1. After I updated from CVS yesterday, I now get
the same problems as you get! Luckily I still have the old source code
tree around, so I can do some more work if needed.
> Next thing I'm doing is try to implement a small test case using just
> a source document and a stylesheet outside of Cocoon, transforming the
> former with different processors. Sigh.
I'll investigate this myself as well. Please let me know if you find
anything.
Best regards,
Ovidiu
--
Ovidiu Predescu <ov...@apache.org>
http://webweavertech.com/ovidiu/weblog/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [C2.1] Error in flow samples
Posted by Ugo Cei <u....@cbim.it>.
Marcus Crafter wrote:
>>Yes, I still have the problem, even after I made a cvs update and
>>recompiled everything. I'm using JDK 1.4.1 under Tomcat 4.1.12, Solaris
>>8, by the way.
>
>
> Ok, this is quite strange then. The userprefs example works for me,
> jdk 1.4.1, Tomcat 3.3.1, Debian GNU/Linux (unstable).
I hoped I could ignore this problem, but it has appeared also in my
code, so I've tried debugging it and this is what I've come up with.
In jpath.xsl there's the following code:
<xsl:apply-templates
select="(//jpath:if | //jpath:when)
[generate-id(.) = generate-id(key('JPathExprs', @test)[1])]
| (//jpath:for-each | //jpath:value-of)
[generate-id(.) = generate-id(key('JPathExprs', @select)[1])]"
mode="compile"/>
This code is supposed to generate a list of declarations like the following:
CompiledExpression jxpath_title = jxpathContext.compile("title");
However if generates them ONLY if the value of the "test" or "select"
attribute of the jpath:{if,when,for-each,value-of} element is a simple
string. It ouptuts NOTHING when the value is something more complicated
like for instance:
<jpath:when test="check and firstName = ''">
Since I don't see anything wrong with the logicsheet and since it works
for you, I suspect it has to do with a bug in the XSLT processor.
In my setup, I have moved xalan-2.4.1.jar, xercesImpl-2.1.0.jar,
xsltc.jar and xml-apis.jar from WEB-INF/lib to
$CATALINA_HOME/common/endorsed (using Tomcat 4.1.12, JDK 1.4.1_01).
After having fought for a while with XSLT processors for the pipeline
transformation stage (moving from Xalan to Saxon and back to Xalan
again), I did not expect to fight another battle just to get XSP to work
as expected :-(. By the way, which XSLT processor is used for
transforming XSPs to Java? Is it possible to configure it?
Next thing I'm doing is try to implement a small test case using just a
source document and a stylesheet outside of Cocoon, transforming the
former with different processors. Sigh.
Ugo
--
Ugo Cei - http://www.beblogging.com/blog/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [C2.1] Error in flow samples
Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
Hi Ugo,
Thanks for the information.
On Wed, Dec 04, 2002 at 05:52:10PM +0100, Ugo Cei wrote:
> Marcus Crafter wrote:
> >Hi Ugo,
> >
> > Are you still experiencing this problem ? The prefs example works
> > fine in my environment (which latest patches are those that you
> > mention?).
> >
> > Cheers,
> >
> > Marcus
>
> Yes, I still have the problem, even after I made a cvs update and
> recompiled everything. I'm using JDK 1.4.1 under Tomcat 4.1.12, Solaris
> 8, by the way.
Ok, this is quite strange then. The userprefs example works for me,
jdk 1.4.1, Tomcat 3.3.1, Debian GNU/Linux (unstable).
> However, if I'm the only one who has this problem, it's not something to
> be worried about, since *my* own code using Flow works (apart from being
> unable to pass objects more complex than strings to pages, but that's a
> different problem).
>
> In any case, I was referring to the patch attached by Michael Melhem to
> Bug 14903 [1] and that I mistakenly attributed to Ovidiu.
Ok. Thanks for the clarification - I applied that patch this
morning, so we have essentially the same code. hmmm....
I have made some local changes to Cocoon, so I'll do a fresh checkout
and try it again - will report back shortly.
Cheers,
Marcus
--
.....
,,$$$$$$$$$, Marcus Crafter
;$' '$$$$: Computer Systems Engineer
$: $$$$: ManageSoft GmbH
$ o_)$$$: 82-84 Mainzer Landstrasse
;$, _/\ &&:' 60327 Frankfurt Germany
' /( &&&
\_&&&&'
&&&&.
&&&&&&&:
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [C2.1] Error in flow samples
Posted by Ugo Cei <u....@cbim.it>.
Marcus Crafter wrote:
> Hi Ugo,
>
> Are you still experiencing this problem ? The prefs example works
> fine in my environment (which latest patches are those that you
> mention?).
>
> Cheers,
>
> Marcus
Yes, I still have the problem, even after I made a cvs update and
recompiled everything. I'm using JDK 1.4.1 under Tomcat 4.1.12, Solaris
8, by the way.
However, if I'm the only one who has this problem, it's not something to
be worried about, since *my* own code using Flow works (apart from being
unable to pass objects more complex than strings to pages, but that's a
different problem).
In any case, I was referring to the patch attached by Michael Melhem to
Bug 14903 [1] and that I mistakenly attributed to Ovidiu.
Ugo
--
Ugo Cei - http://www.beblogging.com/blog/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: [C2.1] Error in flow samples
Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
Hi Ugo,
Are you still experiencing this problem ? The prefs example works
fine in my environment (which latest patches are those that you
mention?).
Cheers,
Marcus
On Mon, Dec 02, 2002 at 05:23:10PM +0100, Ugo Cei wrote:
> The "User Preferences" control flow sample in the current CVS HEAD (plus
> the latest patches from Ovidiu) seems to be broken. Here is a snippet
> from the error page that comes up whenever you click on the "Register
> User" link.
>
> Ugo
>
> The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode
> notifies that org.apache.cocoon.ProcessingException says:
>
> Failed to execute pipeline.
>
> More precisely:
>
> org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> userInfo_xsp:
> ERROR 1
> (/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
> ...
> if (false) {
> }
>
> else if ((((__jxpathResult =
>
> // start error (lines 425-425) " variable jxpath_checkandfirstName not
> found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
> jxpath_checkandfirstName
>
> // end error
> .getValue(jxpathContext))
> instanceof Boolean)
> && ((Boolean)__jxpathResult).booleanValue() == true)
> || (!(__jxpathResult instanceof Boolean)
>
> ...
> ERROR 2
> (/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
> ...
> if (false) {
> }
>
> else if ((((__jxpathResult =
>
> // start error (lines 543-543) " variable jxpath_checkandlastName not
> found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
> jxpath_checkandlastName
>
> // end error
> .getValue(jxpathContext))
> instanceof Boolean)
> && ((Boolean)__jxpathResult).booleanValue() == true)
> || (!(__jxpathResult instanceof Boolean)
>
> ...
> ERROR 3
> (/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
> ...
> if (false) {
> }
>
> else if ((((__jxpathResult =
>
> // start error (lines 661-661) " variable jxpath_checkandemail not found
> in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
> jxpath_checkandemail
>
> // end error
> .getValue(jxpathContext))
> instanceof Boolean)
> && ((Boolean)__jxpathResult).booleanValue() == true)
> || (!(__jxpathResult instanceof Boolean)
>
> ...
> ERROR 4
> (/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
> ...
> if (false) {
> }
>
> else if ((((__jxpathResult =
>
> // start error (lines 779-779) " variable jxpath_checkandlogin not found
> in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
> jxpath_checkandlogin
>
> // end error
> .getValue(jxpathContext))
> instanceof Boolean)
> && ((Boolean)__jxpathResult).booleanValue() == true)
> || (!(__jxpathResult instanceof Boolean)
>
> ...
> ERROR 5
> (/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
> ...
> if (false) {
> }
>
> else if ((((__jxpathResult =
>
> // start error (lines 897-897) " variable jxpath_checkandpassword not
> found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
> jxpath_checkandpassword
>
> // end error
> .getValue(jxpathContext))
> instanceof Boolean)
> && ((Boolean)__jxpathResult).booleanValue() == true)
> || (!(__jxpathResult instanceof Boolean)
>
> ...
> ERROR 6
> (/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/www/samples/flow/examples/prefs/pages/userInfo_xsp.java):
> ...
> this.characters("\n\n ");
>
>
> __jxpathResult =
>
> // start error (lines 1050-1050) " variable jxpath_cancel not found in
> class org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp"
> jxpath_cancel
>
> // end error
> .getValue(jxpathContext);
> if ((__jxpathResult instanceof Boolean
> && ((Boolean)__jxpathResult).booleanValue() == true)
> || (!(__jxpathResult instanceof Boolean)
>
> ...
> Line 425, column 4: variable jxpath_checkandfirstName not found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
> Line 543, column 4: variable jxpath_checkandlastName not found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
> Line 661, column 4: variable jxpath_checkandemail not found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
> Line 779, column 4: variable jxpath_checkandlogin not found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
> Line 897, column 4: variable jxpath_checkandpassword not found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
> Line 1050, column 4: variable jxpath_cancel not found in class
> org.apache.cocoon.www.samples.flow.examples.prefs.pages.userInfo_xsp
> Line 0, column 0:
> 6 errors
>
>
> --
> Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
> P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
> Phone: +39.0382.525100 - E-mail: u.cei@cbim.it
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
--
.....
,,$$$$$$$$$, Marcus Crafter
;$' '$$$$: Computer Systems Engineer
$: $$$$: ManageSoft GmbH
$ o_)$$$: 82-84 Mainzer Landstrasse
;$, _/\ &&:' 60327 Frankfurt Germany
' /( &&&
\_&&&&'
&&&&.
&&&&&&&:
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org