Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Setup:
Talend Open Studio for Data Integration Version: 7.2.1
Win 10 64-bit
My team is working on a POC for replacing our existing ETL tool with Talend and we are stuck trying to resolve ClassNotFoundException for various java libraries when trying to run our jobs and routines (even very simple ones) from within the Studio. Here are two that we are having trouble with:
1) Job using tJMSInput complaining about not finding org.apache.activemq.jndi.ActiveMQInitialContextFactory.
2) Routine trying to connect to the SQL Server database complaining about not finding com.microsoft.jdbc.sqlserver.SQLServerDriver. Routine code is as follows:
// the sql server driver string
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
// the sql server url
String url = "<db url string>";
// get the sql server database connection
conn = DriverManager.getConnection(url,"<username>", "<password>");
// now do whatever you want to do with the connection
String sql = "<insert sql here>";
stmt = conn.prepareStatement(sql);
stmt.setInt(1, errorCode);
ResultSet rs = stmt.executeQuery(sql);
We have been chasing our tails trying to figure out how to get Talend Studio to run our test-jobs and any guidance would be much appreciated
Thank you for the prompt response. I am on Java 8.
I'm not finding "Windows-->Show views-->Talend-->Modules" in Talend Studio for Data Integration, but I did find it under "Windows-->Show views-->Other-->Modules".
Under modules it appears jms.jar is installed. I still get the runtime error. Please see attached images
@shong wrote:
Which module do you select in the Module list? it should be activemq-all.jar.
Weird, looks like my reply post was deleted. I replied that I don't see activemq-all.jar in the module list, only activemq-client-5.15.9.jar. I selected this and ran it and now I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/management/j2ee/statistics/Stats
Hi,
Ideally the component will prompt if some jar is missing (like the one below) and it will prompt you to install those missing jars.
Didn't it happen in your case?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
@nthampi wrote:
Ideally the component will prompt if some jar is missing (like the one below) and it will prompt you to install those missing jars.
Didn't it happen in your case?
No, Talend Studio thinks it has everything it needs, looks like. I see no issues flagged anywhere until I run the job, then it fails.
Hi,
As a contingency plan till Shong comes back, you can use tLibraryLoad to add the libraries manually to the job. Please make sure that you are adding the import details in the advance section of the component so that associated classes will be available.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Hi
I face the same problem with sap jdbc and routes in Talend ESB.
ngdbc.jar is correctly installed in my modules :
And I can connect in a medata DB connexion with the "test" button.
Now we need to connect in a route, I wrote this :
import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; String connectionString = "jdbc:sap://myserver:30015?currentschema=\"SBO_ES53_RUN6\""; //Class.forName("com.sap.db.jdbc.Driver"); Connection connection = DriverManager.getConnection(connectionString, "myuser", "mypassword");
and face the same issue "No suitable driver found for jdbc:sap://..."
The problem is com.sap.db.jdbc.Driver is unknown if I uncomment the class.forName line. And I can't import it.
I also tried copying manually my ngdbc-2.4.64.jar file in Studio\plugins\org.talend.designer.camel.components.localprovider_6.4.1.20170623_1246\lib , and also directly in my JVM lib directory.
The same code works perfectly in a standalone Eclipse IDE with jar import to the project.
Loko
I can have it work if I use cTalendJob in my route and in that job use tLoadLibrary to load my jar.
But this is pretty awfull workaround, just to be sure the issue comes from Talend route conf and not from the jar itself.