Thanks a lot, it works fine now. The first solution (putting the connector in the aar's folder) did not work. I had the same error and axis tried to deploy it (but maybe I did not really understood how I had to do it :D )

As I use a stand-alone version of Axis, the repertory /WEB-INF/lib does not exist, so I used axis2/lib instead. It may help users having the same problem with a stand-alone server.

Thanks again for your help,
Vincent

Le 18 oct. 07 à 16:02, Antonio Manuel Muñiz Martín a écrit :

If you put the jars in axis lib directory (/axis2/WEB-INF/lib) it will work fine.

Antonio.

2007/10/17, Upul Godage <[EMAIL PROTECTED] >:
Put the connector/j jar in the aar archive's lib folder.

In the service class,
ClassLoader classLoader = getClass().getClassLoader();
Class.forName("org.gjt.mm.mysql.Driver" , true, classLoader).newInstance();

Upul



On 10/17/07, Vincent Pretre < [EMAIL PROTECTED]> wrote:
Hi everyone,

I am trying to produce a web services which interacts with a mysql database. I use connector/j to do this, but when I try to call one of my web service operations, I get an error "java.lang.ClassNotFoundException: Class Not found : org.gjt.mm.mysql.Driver".
The connector/j jar is in $JAVA-HOME/lib/ext.

The code for the database connection works in a simple java class (just compiled using javac without any option), but not in my web service.

I'm not a Java guru so I've certainly missed something.

Thanks,
Vincent

PS: the code that does not work is " Class.forName ("org.gjt.mm.mysql.Driver" ).newInstance();"



Reply via email to