One Star

Is it like to specify the tLibraryLoad with sqoop component everytime?

Hi,
I am using tSqoopImport/tSqoopExport component. In my use case I am using SQL Server as the source/target connection. For both the components I need to specify the JDBC connection string. To tun the job successfully I need to mention the JDBC JAR file using tLibraryLoad.
If I copy the same JAR file in lib directory of Talend workspace and do not use tLibrary Component, then the component is not able to find the JAR and throws the error for the same. Ideally if JAR is present in lib directory then it should pick the JAR from there. But it doesn't seems like that and everytime I need to specify tLibraryLoad.
Is it like to specify the tLibraryLoad with tSqoopImport/tSqoopExport component everytime?
2 REPLIES
One Star

Re: Is it like to specify the tLibraryLoad with sqoop component everytime?

Just a thought...
Did you try closing and reopening the project after adding the jar file to the lib directory. 
One Star

Re: Is it like to specify the tLibraryLoad with sqoop component everytime?

Thanks Nikhil for reply.
I tried with your mentioned approach, but it is giving me same exception as below:
Exception in component tSqoopExport_1
java.lang.RuntimeException: Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:797)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.CatalogQueryManager.getColumnNames(CatalogQueryManager.java:148)
at org.apache.sqoop.manager.ConnManager.configureDbOutputColumns(ConnManager.java:672)
at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:96)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at demo.output_table_copy_0_1.output_table_Copy.tSqoopExport_1Process(output_table_Copy.java:363)
at demo.output_table_copy_0_1.output_table_Copy.runJobInTOS(output_table_Copy.java:631)
at demo.output_table_copy_0_1.output_table_Copy.main(output_table_Copy.java:490)