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

error while importing data from sqlserver to hive

error while importing data from sqlserver to hive

Explorer

screenshot-6.pngWhile writing a sqoop import command to load the data from sql server to hive error is coming as use sqljdbc4.jar ..But this jar file is already available .It is HDP 2.6

7 REPLIES 7
Highlighted

Re: error while importing data from sqlserver to hive

@Jyoti Rathod

In the screenshot it clearly states where the issue is. Attached the snipped screenshot. Update the JAR file mentioned so

that it should be supported by the JDBC driver which sqoop is using to import the data. It should solve your issue.

23517-error.jpg

Highlighted

Re: error while importing data from sqlserver to hive

Explorer

Already that jar file is present screenshot-8.png

Highlighted

Re: error while importing data from sqlserver to hive

JDBC 4.0 uses JRE version 1.8 which will not be supported. You may need to make JDBC driver to use sqljdbc4.jar . Now i think its taking the other JRE versions.

Highlighted

Re: error while importing data from sqlserver to hive

Explorer

I have used the export command to set the classpath .As you can see in the screenshot that in the particular classpath that sqljdbc4.jar file is present but still I am getting the same error screenshot-10.png

Highlighted

Re: error while importing data from sqlserver to hive

Check this link.

https://stackoverflow.com/questions/2212037/sql-server-jdbc-exception

You are hitting the same issue as that of mentioned in the link.

Highlighted

Re: error while importing data from sqlserver to hive

Expert Contributor
@Jyoti Rathod

There are 2 versions of Sqljdbc4 drivers one for Java 7 and one for Java 8. The driver available in the sqoop/lib location would be built to be used using Java 7. You might need to update the sqljdbc jar file to be used with Java 8.

You can get the driver from here: https://www.microsoft.com/en-us/download/details.aspx?id=54671

Highlighted

Re: error while importing data from sqlserver to hive

Explorer

I have downloaded the above driver and in that inside jre8 sqljdbc42.jar file is available and i copied that jar file to sqoop/lib location and when i again wrote the sqoop import command to load the data from sql server to hive still I'm getting the same error that jre version 1.8 is not supported by this driver . use sqljdbc4.jar @mbalakrishnan

,

i have downloaded the above driver sqljdbc4.2 and in that for jre8 sqljdbc42.jar file is available and when i copy that jar file to sqoop/lib location still I'm getting the same error @mbalakrishnan

Don't have an account?