Results 1 to 1 of 1
- 05-13-2014, 11:52 AM #1Member
- Join Date
- May 2014
- Rep Power
Problem to import mysql java connector in maven project
I'll try to explain my problem to see if someone can help me:
I have a maven project in eclipse and I want to use Class.forName(dbClass) method to read from a database, so I need to import mysql-connector-java.
In pom.xml I have created a the following dependency:
And I have copied the mysql-connector-java-5.1.9.jar to C:\Users\mysusername\.m2\repository\mysql\mysql-connector-java\5.1.9
But, I still have the error message: Class 'com.mysql.jdbc.Driver' was not found. Bundle 13 does not import package 'com.mysql.jdbc', nor is the package exported by any other bundle or available from the system class loader.
What am I doing wrong?
Thanks in advance!
- By jimihunter007 in forum JDBCReplies: 2Last Post: 07-30-2012, 06:23 AM
- By black300 in forum JDBCReplies: 0Last Post: 04-02-2011, 11:22 AM
- By nmvp in forum JDBCReplies: 2Last Post: 02-16-2011, 07:30 AM
- By int80 in forum EclipseReplies: 11Last Post: 05-31-2010, 10:32 AM
- By sweet angle in forum JDBCReplies: 4Last Post: 10-20-2008, 07:33 AM