You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jo...@notes.uni-paderborn.de on 2002/08/02 12:53:51 UTC

JDBC Connection: The url cannot be null

Hello,

i´ve got a problem connecting to SQLBase with JDBC and i hope someone here
can give me a hint:

When transforming an xml document with the sql-transformer i get an error:
The url cannot be null.

This is the result:

<rowset xmlns="http://apache.org/cocoon/SQL/2.0"><error>The url cannot be
null</error></rowset>


I can see that jdbc driver connects to the database, so classes are found
and loaded correctly. The dburl is correct to, the jdbc driver can connect
with this url, username an password from within other applications without
problems.

This is my xml file called user.xml:

<?xml version="1.0"?>
<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <title>Hello</title>
  <content>
     <para>This is my first Cocoon2 page filled with sql data!</para>
     <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
       <query>select vorname,nachname from kickuser</query>
     </execute-query>
  </content>
</page>

This is my transformer:

       <map:transformer logger="sitemap.transformer.sql" name="sql" src="
org.apache.cocoon.transformation.SQLTransformer">
       <map:parameter name="use-connection" value="mydb"/>
       </map:transformer>

This is my  sitemap match:
       <map:match pattern="user">
          <map:generate src="user.xml"/>
          <map:transform type="sql"/>
          <map:serialize type="xml"/>
       </map:match>

This is my datasource in cocoon.xconf:

     <jdbc name="mydb">
       <pool-controller max="5" min="2"/>
       <dburl>jdbc:sqlbase://myip:2155/mydb</dburl>
       <user>SYSADM</user>
       <password>mypasswd</password>
     </jdbc>


Joern


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>