Pb with mysql jdbc driver and ops

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pb with mysql jdbc driver and ops

nizarklibi
Hi everybody,
I have a problem when trying to connect to a mysql database from an xpl.
There is the error message : No suitable Driver.
 
 
There is my external datasource config file
-<datasource>
  <driver-class-name>org.gjt.mm.mysql.Driver</driver-class-name>
  <uri>jdbc:mysql:localhost:orbeon</uri>
  <username>root</username>
  <password>root</password>
</datasource>
 
and there is my xpl file :
 
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:sql="http://orbeon.org/oxf/xml/sql"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:oxf="http://www.orbeon.com/oxf/processors">
<p:param type="input" name="instance"/>
<p:processor name="oxf:sql">
<p:input name="data" href="#instance"/>
<p:input name="datasource" href="../datasource-MySql.xml"/>
<p:input name="config">
<sql:config>
<result>
<sql:connection>
<sql:execute>
<sql:update>
insert into xmltest values (<sql:param type="xs:string" select="/myform/first-name"/>)
</sql:update>
</sql:execute>
</sql:connection>
</result>
</sql:config>
</p:input>
</p:processor>
</p:config>
 
I've also placed the mysql-connector-j jar file in the tomcat's common/lib directory and in ops's lib directory

any solutions???
Thanks



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Pb with mysql jdbc driver and ops

Erik Bruchez
Administrator
Can you attach the complete stack trace from your logs?

Can you also try to use, instead of the datasource input, the
<sql:datasource> element, and declare your datasource in your Tomcat's
server.xml?

See some doc here:

   http://www.orbeon.com/ops/doc/processors-sql

The datasource input is mainly useful for the examples, so we don't
require you to setup anything in your container to have the examples
running. But for your own applications, you should use your container's
support for datasources.

-Erik

[hidden email] wrote:

> Hi everybody,
> I have a problem when trying to connect to a mysql database from an xpl.
> There is the error message : No suitable Driver.
>  
>  
> There is my external datasource config file
> -<datasource>
>   <driver-class-name>org.gjt.mm.mysql.Driver</driver-class-name>
>   <uri>jdbc:mysql:localhost:orbeon</uri>
>   <username>root</username>
>   <password>root</password>
> </datasource>
>  
> and there is my xpl file :
>  
> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
> xmlns:sql="http://orbeon.org/oxf/xml/sql"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:oxf="http://www.orbeon.com/oxf/processors">
> <p:param type="input" name="instance"/>
> <p:processor name="oxf:sql">
> <p:input name="data" href="#instance"/>
> <p:input name="datasource" href="../datasource-MySql.xml"/>
> <p:input name="config">
> <sql:config>
> <result>
> <sql:connection>
> <sql:execute>
> <sql:update>
> insert into xmltest values (<sql:param type="xs:string" select="/myform/first-name"/>)
> </sql:update>
> </sql:execute>
> </sql:connection>
> </result>
> </sql:config>
> </p:input>
> </p:processor>
> </p:config>
>  
> I've also placed the mysql-connector-j jar file in the tomcat's common/lib directory and in ops's lib directory
>
> any solutions???
> Thanks
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws