cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Brogden" <>
Subject ScriptGenerator problem
Date Mon, 15 Apr 2002 17:47:09 GMT

I am attempting to add Python script processing capability to the
ScriptGenerator using jython.

I placed jython.jar in the cocoon/WEB-INF/lib directory
Cocoon version is 2.0.1 dated 2/26/02
Erased the work directory before starting

Here is my modified "script" generator entry in sitemap.xmap:

<map:generator name="script"
    logger="sitemap.generator.script" label="content,data" >
      <language name="python" src="org.python.util.PythonInterpreter">
        <extension map:value="py"/>

This fails during sitemap compilation due to the
code being cut short in the middle of the ScriptGenerator  code

Here is the actual message from the sitemap log:
ERROR   (2002-04-15) 11:34.20:312   [sitemap] (/cocoon/welcome)
HttpProcessor[8080][4]/Handler: Error compiling sitemap
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
Line 588, column 38:  '}' expected.

----- has the following code 
      { DefaultConfiguration cconf1 =
          new DefaultConfiguration("script", LOCATION);
        cconf1.addAttribute ("name", "script");
        cconf1.addAttribute ("src",
        cconf1.addAttribute ("logger", "sitemap.generator.script");
        cconf1.addAttribute ("label", "content,data");

        //line numbers not supported with xalan
          DefaultConfiguration cconf2 =
            new DefaultConfiguration("add-languages", LOCATION);


          //line numbers not supported with xalan
            DefaultConfiguration cconf3 =
              new DefaultConfiguration("language", LOCATION);

            cconf3.addAttribute ("name", "python");

            cconf3.addAttribute ("src",


            //line numbers not supported with xalan
              DefaultConfiguration cconf4 =
                new DefaultConfiguration("extension",

              cconf4.addAttribute ("map:value", "py");

--------- here the code abruptly stops, the last line is # 588.
Author of Soap Programming with Java - Sybex; ISBN: 0782129285

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

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message