0

Sqoop import command failing with error -

Could not load db driver class: nl.cwi.monetdb.jdbc.MonetDriver

Sqoop Command

sqoop import \
--driver nl.cwi.monetdb.jdbc.MonetDriver \
--connect "jdbc:monetdb://host:port/service" \
--username <user> \
--password <pwd> \
--fields-terminated-by '|' \
--lines-terminated-by '\n' \
--delete-target-dir \
--query "query AND \$CONDITIONS" \
--split-by AVP_KEY \
--target-dir <targetdir> \
--direct \
--columns columns \
-- --schema <schema> \
-m 2

Looked at other Sqoop import questiona and Downloaded the monetjdbc jar file and configured it using

export HADOOP_CLASSPATH="/abs/path/dir/monetdb-jdbc-3.0.jre8.jar"

its failing with different error

Exception in thread "main" java.lang.NoSuchMethodError: java.nio.CharBuffer.mark()Ljava/nio/CharBuffer;
        at org.monetdb.mcl.parser.StartOfHeaderParser.getNextAsString(Unknown

Source)

How to debug this issue.

jarlh
  • 42,561
  • 8
  • 45
  • 63
Vijiy
  • 1,187
  • 6
  • 21

1 Answers1

0

It seems you are hitting the java.nio.CharBuffer API change between Java 8 and 9. There was a bugfix recently on this issue: https://dev.monetdb.org/hg/monetdb-java/rev/5ddfc0aa7f0e You can either compile the sources by yourself, wait for the next release or use Java 9 as a temporary solution.