0
votes

I included the lastest mysql-connector-java-5.1.30-bin.jar file for a Java project in Eclipse (Added External JAR, also in Run Configuration -> Classpath).

Also, I included it in my system-wide Classpath using the export command on Linux.

But when I run my program these warnings and errors keep coming up:

Trying to add database driver (JDBC): RmiJdbc.RJDriver - Warning, not in CLASSPATH?

Trying to add database driver (JDBC): jdbc.idbDriver - Warning, not in CLASSPATH?

Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLASSPATH?

Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Warning, not in CLASSPATH?

Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:     Communications link failure

What do I need to do to make it work?

2
Check your network. It seems to be a problem in connecting the mysql server.Keerthivasan
Pls find the correct mysql connector jar for the linux distribution... and add to Classpath.Raju Sharma

2 Answers

1
votes

If your project is a Java Dynamic Web App then follow :

go to Properties of your project then select Deployment Assembly -> add -> Java Build Path Entries then add mysql-connector-java-5.1.30-bin.jar

0
votes

Hy, i solved the exact same problem by adding the driver to the tomcat server lib as well