von Schwerdtner, Thomas (GXS, FPI) wrote:
> Hey folks,
>
> Setup:
> cocoon-2.0.2dev (can give snapshot date if needed, it's from about a
> week ago)
> tomcat 4.0.3-LE
> jdk1.4
> linux
> java2/1.2/1.3/1.4 postgresql jdbc driver is in classpath (downloaded
> bianry from jdbc.postgresql.org which specified that it would work with
> 1.4 (but it also specified it could not be compiled with it).
>
> Problem:
> I'm trying to get esql/postgresql setup here, and with a small xsp page
> I am getting the following errors:
>
>
> Fancypants error page reports:
> ========================================================================
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> test_xsp:
>
> Line 315, column 5: ')' expected
> Line 431, column 20: not a statement
> Line 460, column 20: not a statement
> Line 460, column 28: ';' expected
> Line 310, column 36: 'void' type not allowed here
> Line 354, column 84: unreported exception: java.sql.SQLException; must
> be caught or declared to be thrown
> Line 378, column 84: unreported exception: java.sql.SQLException; must
> be caught or declared to be thrown
> Line 405, column 51: unreported exception: java.sql.SQLException; must
> be caught or declared to be thrown
> Line 414, column 27: unreported exception: java.sql.SQLException; must
> be caught or declared to be thrown
> Line 0, column 0:
> 9 errors
> ========================================================================
Under the work directory you'll find the generated .java for your xsp page.
I think you should enclose your content in between <xsp:content> tags.
>
>
> sitemap contains:
> ========================================================================
> <map:generator name="serverpages"
>
> src="org.apache.cocoon.generation.ServerPagesGenerator"
> label="content,data"
> logger="sitemap.generator.serverpages"
> pool-max="32" pool-min="4" pool-grow="2"/>
>
> <!-- and later in the file -->
>
> <map:match pattern="test-esql">
> <map:generate type="serverpages"
> src="documents/test.xsp"/>
> <map:transform
> src="stylesheets/databases/view.xsl"/>
> <map:serialize/>
> </map:match>
> ========================================================================
>
> cocoon.xconf contains:
> ========================================================================
> <datasources>
> <jdbc logger="core.datasources.gesupply" name="gesupply">
> <pool-controller max="10" min="5"/>
>
> <dburl>jdbc:postgresql://localhost:5432/gesupply</dburl>
> <user>myUname</user>
> <password>myPassword</password>
> </jdbc>
> </datasources>
> ========================================================================
>
> web.xml contains:
> ========================================================================
> <init-param>
> <param-name>load-class</param-name>
> <param-value>org.postgresql.Driver</param-value>
> </init-param>
> ========================================================================
>
> the stylesheet for test.xsp is a copy of the xsp stylesheet(s) from the
> cocoon samples.
> test.xsp contains:
> ========================================================================
> <xsp:page
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> language="java">
>
> <esql:connection>
> <esql:pool>gesupply</esql:pool>
> <esql:execute-query>
> <esql:query>SELECT
> Id,SupportClassId,Type,Description FROM supporttype<esql:results>
> <table>
> <esql:row-results>
> <tr>
> <td>
>
> <esql:get-string column="Id"/></td><td>
>
> <esql:get-string column="Type"/></td>
> </tr>
> </esql:row-results>
> </table>
> </esql:results>
> <esql:no-results>
> <p>Sorry, no results!</p>
> </esql:no-results>
> </esql:query>
> </esql:execute-query>
> </esql:connection>
> </xsp:page>
> ========================================================================
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>