java.lang.NoClassDefFoundError: oadd/org/codehaus/jackson/map/ObjectMapper

Apache's JIRA Issue Tracker | Deneche A. Hakim | 1 year ago
  1. 0

    I have zookeeper installed and I'm running a single drillbit. I'm running a simple Jdbc program that uses drill-jdbc-all, and I do get the following error when trying to connect: {noformat} Exception in thread "main" java.lang.NoClassDefFoundError: oadd/org/codehaus/jackson/map/ObjectMapper at oadd.org.apache.curator.x.discovery.details.JsonInstanceSerializer.<init>(JsonInstanceSerializer.java:42) at oadd.org.apache.curator.x.discovery.ServiceDiscoveryBuilder.builder(ServiceDiscoveryBuilder.java:42) at oadd.org.apache.drill.exec.coord.zk.ZKClusterCoordinator.getDiscovery(ZKClusterCoordinator.java:265) at oadd.org.apache.drill.exec.coord.zk.ZKClusterCoordinator.<init>(ZKClusterCoordinator.java:103) at oadd.org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:185) at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:134) at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:66) at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69) at oadd.net.hydromatic.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:126) at org.apache.drill.jdbc.Driver.connect(Driver.java:72) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:233) at SimpleJdbc.main(SimpleJdbc.java:13) 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:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) Caused by: java.lang.ClassNotFoundException: oadd.org.codehaus.jackson.map.ObjectMapper at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 18 more {noformat} Using jdbc-all built right before DRILL-3589 commit works fine, so the problem seem to be related to the changes in DRILL-3589 Here is the program I'm running: {code} import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class SimpleJdbc { public static void main(String[] args) throws Exception { Class.forName("org.apache.drill.jdbc.Driver").newInstance(); Connection conn = DriverManager.getConnection("jdbc:drill:"); Statement stmt = null; ResultSet rs = null; try { stmt = conn.createStatement(); rs = stmt.executeQuery("SELECT employee_id FROM cp.`employee.json`"); while (rs.next()) { System.out.println(rs.getObject(1)); } } finally { if (stmt != null) { stmt.close(); } if (rs != null) { rs.close(); } conn.close(); } } } {code}

    Apache's JIRA Issue Tracker | 1 year ago | Deneche A. Hakim
    java.lang.NoClassDefFoundError: oadd/org/codehaus/jackson/map/ObjectMapper
  2. 0

    I have zookeeper installed and I'm running a single drillbit. I'm running a simple Jdbc program that uses drill-jdbc-all, and I do get the following error when trying to connect: {noformat} Exception in thread "main" java.lang.NoClassDefFoundError: oadd/org/codehaus/jackson/map/ObjectMapper at oadd.org.apache.curator.x.discovery.details.JsonInstanceSerializer.<init>(JsonInstanceSerializer.java:42) at oadd.org.apache.curator.x.discovery.ServiceDiscoveryBuilder.builder(ServiceDiscoveryBuilder.java:42) at oadd.org.apache.drill.exec.coord.zk.ZKClusterCoordinator.getDiscovery(ZKClusterCoordinator.java:265) at oadd.org.apache.drill.exec.coord.zk.ZKClusterCoordinator.<init>(ZKClusterCoordinator.java:103) at oadd.org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:185) at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:134) at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:66) at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69) at oadd.net.hydromatic.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:126) at org.apache.drill.jdbc.Driver.connect(Driver.java:72) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:233) at SimpleJdbc.main(SimpleJdbc.java:13) 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:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) Caused by: java.lang.ClassNotFoundException: oadd.org.codehaus.jackson.map.ObjectMapper at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 18 more {noformat} Using jdbc-all built right before DRILL-3589 commit works fine, so the problem seem to be related to the changes in DRILL-3589 Here is the program I'm running: {code} import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class SimpleJdbc { public static void main(String[] args) throws Exception { Class.forName("org.apache.drill.jdbc.Driver").newInstance(); Connection conn = DriverManager.getConnection("jdbc:drill:"); Statement stmt = null; ResultSet rs = null; try { stmt = conn.createStatement(); rs = stmt.executeQuery("SELECT employee_id FROM cp.`employee.json`"); while (rs.next()) { System.out.println(rs.getObject(1)); } } finally { if (stmt != null) { stmt.close(); } if (rs != null) { rs.close(); } conn.close(); } } } {code}

    Apache's JIRA Issue Tracker | 1 year ago | Deneche A. Hakim
    java.lang.NoClassDefFoundError: oadd/org/codehaus/jackson/map/ObjectMapper
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Ant throws NoClassDefFoundError when executing running Junit Target, runs fine in Eclipse

    Stack Overflow | 2 years ago | user1697841
    java.lang.ClassNotFoundException: org.dbunit.database.IDatabaseConnection

  1. archenroot 1 times, last 1 week ago
  2. tyson925 5 times, last 2 weeks ago
  3. tzrlk 1 times, last 2 weeks ago
  4. musketyr 1 times, last 2 weeks ago
  5. kjhdofjosvs 3 times, last 3 weeks ago
63 more registered users
32 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    oadd.org.codehaus.jackson.map.ObjectMapper

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    2. java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    5. java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    6. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    7. java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    7 frames
  3. oadd.org.apache
    DrillClient.connect
    1. oadd.org.apache.curator.x.discovery.details.JsonInstanceSerializer.<init>(JsonInstanceSerializer.java:42)
    2. oadd.org.apache.curator.x.discovery.ServiceDiscoveryBuilder.builder(ServiceDiscoveryBuilder.java:42)
    3. oadd.org.apache.drill.exec.coord.zk.ZKClusterCoordinator.getDiscovery(ZKClusterCoordinator.java:265)
    4. oadd.org.apache.drill.exec.coord.zk.ZKClusterCoordinator.<init>(ZKClusterCoordinator.java:103)
    5. oadd.org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:185)
    5 frames
  4. org.apache.drill
    DrillFactory.newConnection
    1. org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:134)
    2. org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:66)
    3. org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
    3 frames
  5. oadd.net.hydromatic
    UnregisteredDriver.connect
    1. oadd.net.hydromatic.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:126)
    1 frame
  6. org.apache.drill
    Driver.connect
    1. org.apache.drill.jdbc.Driver.connect(Driver.java:72)
    1 frame
  7. Java RT
    DriverManager.getConnection
    1. java.sql.DriverManager.getConnection(DriverManager.java:571)
    2. java.sql.DriverManager.getConnection(DriverManager.java:233)
    2 frames
  8. Unknown
    SimpleJdbc.main
    1. SimpleJdbc.main(SimpleJdbc.java:13)
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  10. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
    1 frame