Installing on 4.1

I am installing 4.1.0 and having a problem connecting with MySQL. I downloaded the JDBC driver for MySQL, extracted mysql-connector-java-5.1.7-bin.jar and installed it in /usr/local/servoy/application_server/drivers/ . I then opened up Developer to create a new server. I specified a server name of ‘repository_server’, username, password, a URL of jdbc:mysql://localhost/repository_server and a driver of org.gjt.mm.mysql.Driver. When I tried to save the new server I got this error:

Cannot setup server
JDBC Driver ‘org.gjt.mm.mysql.Driver’ not found in classpath or drivers directory : java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver org.gjt.mm.mysql.Driver

I had this problem on a Linux installation, but I checked my working Windows instance and the driver is the same and the entries are the same.

What am I doing wrong?

TIA, Steve

Are you sure you did not misspell or use the wrong driver class name?

IT2Be:
Are you sure you did not misspell or use the wrong driver class name?

If by driver class name you mean the value in the Driver field, I accepted the system-provided default, which in this case was org.gjt.mm.mysql.Driver

Thanks, Steve

jsgrahamus:

IT2Be:
Are you sure you did not misspell or use the wrong driver class name?

If by driver class name you mean the value in the Driver field, I accepted the system-provided default, which in this case was org.gjt.mm.mysql.Driver

Thanks, Steve

And it’s the same as on my Windows system which does work. Odd. Must be some other problem. I was able to access MySQL by using the client.

Steve

Do you use the same driver on your windows system?

And I would check the driver class name with the docs of the driver. Just to be sure (I can’t tell, have not used MySQL in ages).

Hi Steve,

I can reproduce this issue on Ubuntu 8.10. Did a clean install (after installing Sun JDK 6). Downloaded the MySQL 5.0.8 JDBC driver and tried to setup a connection. Same error as you.
Tried the same thing with a PostgreSQL connection. Same type of error.
Now I noticed that the driver combobox only shows the sun.jdbc.odbc.jdbcOdbcDriver and not all the others that are in my Drivers directory.
So it seems some Servoy config file doesn’t have the correct classpath(s).
Will investigate this some more.

Hi Steve,

Found a solution.
If you follow the directions in this post then it all works.

that is very weird that the feature.xml has anything to do with the drivers loading.

Because the drivers dont have anything to do with eclipse or the way eclipse loads plugins thats completely standalone.
very strange.

Do you know that connector mysql-connector-java-5.1.7-bin.jar is for MySQL 5.1 which was released recently?

MySQL 5.1 is the new “Generally Available” version. If you are using MySQL 5.0 try the connector at: http://dev.mysql.com/downloads/connector/j/5.0.html (download mysql-connector-java-5.0.8.tar.gz)

Hi Johan,

jcompagner:
that is very weird that the feature.xml has anything to do with the drivers loading.

Because the drivers dont have anything to do with eclipse or the way eclipse loads plugins thats completely standalone.
very strange.

Seems you are right. When I try to create a connection now it doesn’t work anymore. Makes me wonder what I did in the first place to make it work… :shock:
Very strange indeed.

Ohhhhhkay, found the bugger.
When I launch Servoy from the link on the desktop then things break. When I launch Servoy from the directory it lives in then it all works.

Can this be fixed ?