Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Getting an Error Classnotfound Exception

Hi All,
I have to connect to Mysql database i have done the connection in metadata.
but when i try to retrieve the schema i get an error.
I took tmysqlinput and wrote select * from table_name query and click on guess schema option it is showing me an error like :
java.lang.classnotfoundexception org.gjt.mm.mysql.driver
please suggest me what to do.
Thanking you,
with regards,
Akash S.
Labels (4)
21 Replies
_AnonymousUser
Specialist III
Specialist III

thanks vaibhav, i have to use updated jar files????
Anonymous
Not applicable
Author

Hi sharath,
If you are using talend studio, try to take the JDBC driver from the MySQL server installation and place the jar file in the lib <studio>/lib/java/ and it should work.
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

Try to download 'mysql-connector-java-5.1.30-bin.jar' file. May be you will get 'mysql-connector-java-5.1.30.jar' file. Please rename the file and add '-bin' before the '.' in the file name.
This is an error in Talend (TOS_BD-r118616-V5.5.1) Mysql component.
This solved my problem.
Suggestion for Talend team : If you hard-code the class name 'org.gjt.mm.mysql.Driver' inside the generated code, then you need to provide the Jar file. Other wise you should provide a feature by which the user can enter the class name.  
Cheers,
Anonymous
Not applicable
Author

Hi  OldUser,
Suggestion for Talend team : If you hard-code the class name 'org.gjt.mm.mysql.Driver' inside the generated code, then you need to provide the Jar file. Other wise you should provide a feature by which the user can enter the class name.  


Could you please open a workitem jira issue of DI project on Talend Bug Tracker? Our developer will check it.

Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

Hello  xdshi,
For the following exception, could you please provide a solution? Please execute a job using the component and hope you will also get the same exception. 
"Exception in component tSqoopExport_1
java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver
"
Please note the 'mysql-connector-java-5.1.30-bin.jar' file is already there in the lib/java folder and the component is throwing this exception.
Cheers,
Anonymous
Not applicable
Author

Hi,
Are you using Talend Open Studio Big Data 5.5.1?
Best regards
Sabrina
Anonymous
Not applicable
Author

I'm having a similar issue but in the TAC AMC. The studio AMC perspective ha no problem though. I also see that the driver is in all the expected locations. When I use the AMC in the TAC and setup a connection to a repository, it won't connect. Instead I get "Unable to instantiate driver 'org.gjt.mm.mysql.Driver'" in the stack trace of tomcat. I did read the manual so I thought I had followed all of the steps. Everything else connects to MySQL just fine.
Anonymous
Not applicable
Author

Hi mayerA,
Have you already   placed the downloaded modules (JDBC driver) must in the following folder for Talend Administration Center
<TomcatPath>/webapps/org.talend.administrator/WEB-INF/lib ?

Best regards
Sabrina
Anonymous
Not applicable
Author

Yes I have. That was one of the first things I did.
mysql-connector-java-5.1.22-bin
org.gjt.mm.mysql.Driver must be in:
C:\Talend\Install_5.6.2\tac\apache-tomcat\lib
C:\Talend\Install_5.6.2\tac\apache-tomcat\webapps\org.talend.administrator\WEB-INF\lib
Anonymous
Not applicable
Author

Hi mayerA,
Are you using Talend Suscription product? Have you already reported a ticket on Talend Support Portal? In this way, we can give you a remote assistance on your issue.
Best regards
Sabrina