You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Beauprez Sven <Sv...@the-ecorp.com> on 2001/07/27 14:40:52 UTC
RE: [C2] Postgresql - pool works with ESQL Logicsheet, but not wi
th SQLTransformer
Check the log-files, there you can trace what the SQLTransformer did
exactly.
Check especially if there is a problem with the preparedStatement, if so,
you should upgrade to a full jdbc compliant driver. (i know that there are
problems with these drivers in the past)
Also check the mail-archive
(http://marc.theaimsgroup.com/?l=xml-cocoon-users&r=1&w=2), you might find
some useful information in it.
Sven
> -----Original Message-----
> From: Tiberiu DONDERA [mailto:tibidondera@hotmail.com]
> Sent: Friday, July 27, 2001 11:13 AM
> To: cocoon-users@xml.apache.org
> Subject: [C2] Postgresql - pool works with ESQL Logicsheet,
> but not with
> SQLTransformer
>
>
> Hello,
>
> My configuration:
> RedHat 7.1, C2b1, Resin.
>
> What I do:
> I load the postgresql Driver (org.postgresql.Driver, compiled
> "on site")
> I create a pool connection to a database: (cocoon.xconf)
> <jdbc name="mydb">
> <pool-controller min="5" max="10"/>
> <dburl>jdbc:postgresql://localhost:5432/mydb</dburl>
> <user>user</user>
> <password>pass</password>
> </jdbc>
> (just as a paranthesis, the connection didn't work if the
> user had an
> empty string as password)
>
> My esql code works:
> (sitemap.xmap)
> <map:match pattern="mytest/*.xsp">
> <map:generate type="serverpages" src="mysources/{1}.xsp"/>
> <map:serialize type="xml"/>
> </map:match>
>
>
> (mypage.xsp)
> <esql:pool>mydb</esql:pool>
> <esql:execute-query>
> <esql:query>select * from test</esql:query>
> <esql:results>
> <esql:row-results>
> <row>
> <esql:get-columns/>
> </row>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
>
> Produces as expected:
> <row>
> <id>1</id><text>Welcome</text>
> </row>
> <row>
> <id>2</id><text>Good bye</text>
> </row>
>
>
>
> However, the code for the sql transformer does not work:
> (sitemap.xmap)
> <map:match pattern="mytest/*.xml">
> <map:generate src="mysources/{1}.xml"/>
> <map:transform type="sql">
> <map:parameter name="use-connection" value="mydb"/>
> </map:transform>
> <map:serialize type="xml"/>
> </map:match>
>
> (mysqlcode.xml)
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0"> >
> <query>
> select id,text from test
> </query>
> </execute-query>
>
> Only produces:
> <ROWSET xmlns="http://apache.org/cocoon/SQL/2.0"
> xmlns="http://apache.org/cocoon/SQL/2.0"/>
>
> I also tried to use:
> (mysqlcode.xml)
> <sql:execute-query>
> <sql:query>
> select id,text from test
> </sql:query>
> </sql:execute-query>
>
> I only get:
> <ROWSET xmlns="http://apache.org/cocoon/SQL/2.0"/>
>
> Any help would be highly appreciated.
>
> Regards,
> Tibi Dondera
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>