My Oracle Support Banner

Oracle Direct Connector for Hadoop Distributed File System (HDFS) hadoop-env.sh HADOOP_CLASSPATH setting for JDBC (Doc ID 1405663.1)

Last updated on DECEMBER 03, 2012

Applies to:

Oracle Loader for Hadoop - Version 1.1.0.0.0 and later
Information in this document applies to any platform.

Symptoms


According to the "Publishing the HDFS Data Paths" section of the
Oracle Direct Connector for Hadoop Distributed File System documentation
the syntax for the ExternalTable command is:

bin/hadoop jar orahdfs.jar oracle.hadoop.hdfs.exttab.ExternalTable [-conf config_file | -D property=value] -publish [-noexecute]


However executing the command:

hadoop jar orahdfs.jar oracle.hadoop.hdfs.exttab.ExternalTable -conf <confFile> -publish


may raise:

Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
at oracle.hadoop.hdfs.exttab.ExternalTable.getConnection(ExternalTable.java:134)
at oracle.hadoop.hdfs.exttab.ExternalTable.publish(ExternalTable.java:242)
at oracle.hadoop.hdfs.exttab.ExternalTable.run(ExternalTable.java:316)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at oracle.hadoop.hdfs.exttab.ExternalTable.main(ExternalTable.java:390)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
...


indicating that the Oracle Direct Connector for Hadoop Distributed File System (HDFS) is unable to make a JDBC connection.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.