This is clearly an exception for not finding the JDBC JAR. What is the correct folder you're referring to?
Whenever Forge comman-line asks me this:
[crmadm] crmadm $ generate-entities --url jdbc:mysql://localhost:3306/crmadm --driver com.mysql.jdbc.Driver --user root --password desenv --dialect org.hibernate.dialect.MySQLDialect
? Enter the path in the local file system to the jar file containing the JDBC driver. [null]
I have tried:
And lately, I put the jar file inside the home folder of the project, and try this:
If I do not type in any path to the driver I get no error but just a message: Found 0 tables in datasource.
I did try a lot of stuff, search Google for some people having the same trouble, I too am impressed why it is not working... Using Windows 8 (Portuguese). Maybe the folders´ translation is messing up... Gonna check on that..
Well, do not know what the heck I did. But it worked.
Using this: /Users/Wilson/.m2/repository/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar
And commenting in persistence.xml <!-- <property name="hibernate.hbm2ddl.auto" value="create-drop"/> -->
Also put the jar file inside FORGE_HOME/lib
Sincerely I do not know why it was not working and why it is working now. But it has generated the entities from the database.
Anyway thanks everyone.
Your paths must contain forward slases or dual backslashes. The first path you tried did not specify the drive and that may explain why it failed. The second and third attempt used single backslashes which java interprets as "escaped" characters rather than path separators. Your successful run was due to having the driver jar in Forge_Home/lib which made it accessible to forge since the driver was now on it's classpath. I keep my current mysql driver in c:/s/drivers/mysql.jar to make it easy to type without errors.