Support Questions
Find answers, ask questions, and share your expertise

Sqoop Connector - HDP 2.5

Solved Go to solution
Highlighted

Sqoop Connector - HDP 2.5

Rising Star

Hello guys, I'm having problems listing databases of SQL Server with the command:

sqoop list-databases --connect jdbc:sqlserver://ip:1433/ --username hadoop --password mypassword

I'm getting the error:

Error loading ManagerFactory information from file /usr/hdp/2.5.0.0-1245/sqoop/conf/managers.d/td_connector.txt: java.io.IOException: Could not load jar /usr/hdp/current/sqoop-client/lib/sqljdbc41.jar into JVM
I also tried many other combinations of commands but none of them work.

I have 2 jars, the sqljdbc41.jar and sqljdbc42.jar in /usr/hdp/current/sqoop-client/lib/, and i haved modified the td_connector.txt to:

com.microsoft.sqoop.SqlServer.MSSQLServerManagerFactory = /usr/hdp/current/sqoop-client/lib/sqljdbc41.jar

What i'm doing wrong, or what am i missing? Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Sqoop Connector - HDP 2.5

Mentor

Can you include only one or the other jar in the lib. What java version is loaded on your cluster? If you are using Java 7 use jdbc41 if Java 8 then use jdbc42. using lower JRE will throw an error. https://duckduckgo.com/?q=microsoft+jdbc+jar

View solution in original post

8 REPLIES 8
Highlighted

Re: Sqoop Connector - HDP 2.5

Mentor

Can you include only one or the other jar in the lib. What java version is loaded on your cluster? If you are using Java 7 use jdbc41 if Java 8 then use jdbc42. using lower JRE will throw an error. https://duckduckgo.com/?q=microsoft+jdbc+jar

View solution in original post

Highlighted

Re: Sqoop Connector - HDP 2.5

Rising Star

I have version 8 of Java, and i removed now the jdbc41 but i'm getting the same error... What shoud i have in td_connector.txt? Thanks

Highlighted

Re: Sqoop Connector - HDP 2.5

Mentor

Can you try without the file all together? Also want to make sure the jar in that file reference sqljdbc42 not 41 as your example.

Highlighted

Re: Sqoop Connector - HDP 2.5

Rising Star

So, with file mentioning sqljdbc42 i got the same error. Without the file, i have less errors as described in the image. error.png

Highlighted

Re: Sqoop Connector - HDP 2.5

Mentor

Make sure your file is readable and complete, meaning you downloaded the jdbc jar correctly. Also try using --driver com.microsoft.sqlserver.jdbc.SQLServerDriver and --direct

That should improve performance

Highlighted

Re: Sqoop Connector - HDP 2.5

Rising Star

Finally it worked!!

For some reason the file was corrupted... i checked it with ls -la nameof.jar and do not match with the real size of jar.

So, i downloaded again from microsoft, uploaded to dropbox to get the link (with wget), becauce i could't extract directly via microsoft. and decompressed with tar -xzvf nameof.tar.gz command. After that, just copy the jar that i need to /usr/hdp/current/sqoop-client/lib, with the command cp sqljdbc42.jar /usr/hdp/current/sqoop-client/lib Thanks for your help

Highlighted

Re: Sqoop Connector - HDP 2.5

Mentor

Excellent, please mark the answer as accepted to close the thread.

Highlighted

Re: Sqoop Connector - HDP 2.5

New Contributor

@Artem Ervits and @Francisco Pires,
I am facing the same problem. I am using the ambari-sandbox on VmWare.
I have downloaded sqljdbc.jar on my windows and then copy it to /usr/local by using WinSCP.
then i try to copy this jar file to /usr/hdp/current/sqoop-client/lib so i got an error

Copy command:
[root@sandbox-hdp local]# cp /usr/local/sqljdbc42.jar /usr/hdp/current/sqoop-client/lib

Error:
cp: cannot stat `/usr/local/sqljdbc42.jar': No such file or directory

As you can see that sqljdbc42.jar is available in /usr/local folder...
Please help me out

64495-capture.jpg