Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Sqoop2 : JasonMappingException while importing from RDBMS

Sqoop2 : JasonMappingException while importing from RDBMS

New Contributor

Hi,

 

I am using the Cloudera-Quickstart-VirtualMachine.
I am trying to import data from RDBMS (tried with bot MSSQL and MySQL). I am able to load the jdbc drivers and connect to the corresponding database, but the job fails to start after that. I get the following stacktrace.

 

java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException
org.apache.hadoop.mapreduce.Job.getJobSubmitter(Job.java:1291)
org.apache.hadoop.mapreduce.Job.submit(Job.java:1302)
org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.submitToCluster(MapreduceSubmissionEngine.java:274)
org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.submit(MapreduceSubmissionEngine.java:255)
org.apache.sqoop.driver.JobManager.start(JobManager.java:288)
org.apache.sqoop.handler.JobRequestHandler.startJob(JobRequestHandler.java:380)
org.apache.sqoop.handler.JobRequestHandler.handleEvent(JobRequestHandler.java:116)
org.apache.sqoop.server.v1.JobServlet.handlePutRequest(JobServlet.java:96)
org.apache.sqoop.server.SqoopProtocolServlet.doPut(SqoopProtocolServlet.java:79)
javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:622)
org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:291)
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:574)

 

I placed the jackson-core-2.8.1.jar file in /var/lib/sqoop2 but continued to get the same error. Tried system restart too.

I checked the jar files that were loaded by

 

lsof -p <PID>

And can confirm that the jar was loaded. Am I missing something here ? Getting the same error with MSSQL and MySQL. I am new to Linux environment and really don't know where to proceed.