You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Geelen <st...@hotmail.com> on 2004/02/14 12:37:44 UTC

Error: Language Exception

Hi,

I get following compile error:

 org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
myaccount_details_xsp: ERROR 1
(org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ... ; } } //
start error (lines 257-257) "Syntax error on keyword "if"; "boolean",
"void", "byte", "short", "int", "long", "char", "float", "double",
"Identifier", "interface", "class" expected" if ( // end error
(session.isNew()) ) { ... ERROR 2
(org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ...
(session.isNew()) ) { // start error (lines 262-262) "xspAttr cannot be
resolved" xspAttr.addAttribute( // end error "", "location", "location",
"CDATA", ... ERROR 3
(org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ...
this.contentHandler.startElement( "http://apache.org/xsp/response/2.0",
"send-redirect", "xsp-response:send-redirect", // start error (lines
275-275) "xspAttr cannot be resolved" xspAttr // end error );
xspAttr.clear(); ... ERROR 4
(org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ...
"send-redirect", "xsp-response:send-redirect", xspAttr ); // start error
(lines 277-277) "xspAttr cannot be resolved" xspAttr.clear(); // end error
this.contentHandler.endElement( ... Line 257, column 0: Syntax error on
keyword "if"; "boolean", "void", "byte", "short", "int", "long", "char",
"float", "double", "Identifier", "interface", "class" expected Line 262,
column 0: xspAttr cannot be resolved Line 275, column 0: xspAttr cannot be
resolved Line 277, column 0: xspAttr cannot be resolved

with following code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
   xmlns:esql="http://apache.org/cocoon/SQL/v2"
   xmlns:xsp-session="http://apache.org/xsp/session/2.0"
   xmlns:xsp-response="http://apache.org/xsp/response/2.0"

   create-session="true">
  <!-- <xsp-session:set-max-inactive-interval interval="30"/>  -->
  <xsp:logic>
    if (<xsp-session:is-new/>) {
      <xsp-response:send-redirect location="myaccount.html"/>
    }
  </xsp:logic>
..

The problem seems to be with the <xsp:logic> logic block.
If I put the logic block in comment it runs fine.

I can't spot immediately the error.

Someone has an idea ?

Regards,

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Error: Language Exception

Posted by "John L. Webber" <Jo...@jentro.com>.
I think Jan's right - I can't find a reference to 
xsp-response:send-redirect anywhere. On my system the xsp compiles and 
runs, but it doesn't do anything.

Best regards,

John


Jan Hoskens wrote:

>I don't think there's a <xsp-response:send-redirect location=""/>. Check the
>source dir to see your xsp logicsheets and their functions:
>\cocoon-2.1\src\java\org\apache\cocoon\components\language\markup\xsp\java.
>If your debugging xsp, it's always good to see your compiled page (that's
>where the error is referencing to), it should be located in your servlets
>working dir (something like C:\app\Jakarta-Tomcat
>4.1.29\work\Standalone\localhost\_\cocoon-files\org\apache\cocoon\www\file_\
>mydir). Also you're not advised to use a redirect in your xsp page, that's
>the responsability of the sitemap, maybe you should try to move that
>redirect to your sitemap.
>
>Best regards,
>Jan
>
>
>----- Original Message ----- 
>From: "Stefan Geelen" <st...@hotmail.com>
>  
>
>>Hi,
>>
>>I get following compile error:
>>
>> org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
>>org.apache.cocoon.ProcessingException: Language Exception:
>>org.apache.cocoon.components.language.LanguageException: Error compiling
>>myaccount_details_xsp: ERROR 1
>>(org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ... ; } }
>>    
>>
>//
>
>>
>><?xml version="1.0" encoding="ISO-8859-1"?>
>><xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
>>   xmlns:esql="http://apache.org/cocoon/SQL/v2"
>>   xmlns:xsp-session="http://apache.org/xsp/session/2.0"
>>   xmlns:xsp-response="http://apache.org/xsp/response/2.0"
>>
>>   create-session="true">
>>  <!-- <xsp-session:set-max-inactive-interval interval="30"/>  -->
>>  <xsp:logic>
>>    if (<xsp-session:is-new/>) {
>>      <xsp-response:send-redirect location="myaccount.html"/>
>>    }
>>  </xsp:logic>
>>..
>>
>>    
>>
-- 
---------------------------------------------------------
 Jentro Technologies GmbH
 John L. Webber, Software Development
---------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Error: Language Exception

Posted by Jan Hoskens <jh...@schaubroeck.be>.
I don't think there's a <xsp-response:send-redirect location=""/>. Check the
source dir to see your xsp logicsheets and their functions:
\cocoon-2.1\src\java\org\apache\cocoon\components\language\markup\xsp\java.
If your debugging xsp, it's always good to see your compiled page (that's
where the error is referencing to), it should be located in your servlets
working dir (something like C:\app\Jakarta-Tomcat
4.1.29\work\Standalone\localhost\_\cocoon-files\org\apache\cocoon\www\file_\
mydir). Also you're not advised to use a redirect in your xsp page, that's
the responsability of the sitemap, maybe you should try to move that
redirect to your sitemap.

Best regards,
Jan


----- Original Message ----- 
From: "Stefan Geelen" <st...@hotmail.com>
To: <us...@cocoon.apache.org>
Sent: Saturday, February 14, 2004 12:37 PM
Subject: Error: Language Exception


> Hi,
>
> I get following compile error:
>
>  org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> myaccount_details_xsp: ERROR 1
> (org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ... ; } }
//
> start error (lines 257-257) "Syntax error on keyword "if"; "boolean",
> "void", "byte", "short", "int", "long", "char", "float", "double",
> "Identifier", "interface", "class" expected" if ( // end error
> (session.isNew()) ) { ... ERROR 2
> (org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ...
> (session.isNew()) ) { // start error (lines 262-262) "xspAttr cannot be
> resolved" xspAttr.addAttribute( // end error "", "location", "location",
> "CDATA", ... ERROR 3
> (org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ...
> this.contentHandler.startElement( "http://apache.org/xsp/response/2.0",
> "send-redirect", "xsp-response:send-redirect", // start error (lines
> 275-275) "xspAttr cannot be resolved" xspAttr // end error );
> xspAttr.clear(); ... ERROR 4
> (org\apache\cocoon\www\xmlmill\xsp\myaccount_details_xsp.java): ...
> "send-redirect", "xsp-response:send-redirect", xspAttr ); // start error
> (lines 277-277) "xspAttr cannot be resolved" xspAttr.clear(); // end error
> this.contentHandler.endElement( ... Line 257, column 0: Syntax error on
> keyword "if"; "boolean", "void", "byte", "short", "int", "long", "char",
> "float", "double", "Identifier", "interface", "class" expected Line 262,
> column 0: xspAttr cannot be resolved Line 275, column 0: xspAttr cannot be
> resolved Line 277, column 0: xspAttr cannot be resolved
>
> with following code:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
>    xmlns:esql="http://apache.org/cocoon/SQL/v2"
>    xmlns:xsp-session="http://apache.org/xsp/session/2.0"
>    xmlns:xsp-response="http://apache.org/xsp/response/2.0"
>
>    create-session="true">
>   <!-- <xsp-session:set-max-inactive-interval interval="30"/>  -->
>   <xsp:logic>
>     if (<xsp-session:is-new/>) {
>       <xsp-response:send-redirect location="myaccount.html"/>
>     }
>   </xsp:logic>
> ..
>
> The problem seems to be with the <xsp:logic> logic block.
> If I put the logic block in comment it runs fine.
>
> I can't spot immediately the error.
>
> Someone has an idea ?
>
> Regards,
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org