Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2482

JDBC : calling getObject when the actual column type is 'NVARCHAR' results in NoClassDefFoundError

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 1.2.0
    • Client - JDBC
    • None

    Description

      git.commit.id.abbrev=7b4c887

      I tried to call getObject on a column which is of type varchar, drill failed with the below error :

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/io/Text
      	at org.apache.drill.exec.vector.VarCharVector$Accessor.getObject(VarCharVector.java:407)
      	at org.apache.drill.exec.vector.NullableVarCharVector$Accessor.getObject(NullableVarCharVector.java:386)
      	at org.apache.drill.exec.vector.accessor.NullableVarCharAccessor.getObject(NullableVarCharAccessor.java:98)
      	at org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getObject(BoundCheckingAccessor.java:137)
      	at org.apache.drill.jdbc.AvaticaDrillSqlAccessor.getObject(AvaticaDrillSqlAccessor.java:136)
      	at net.hydromatic.avatica.AvaticaResultSet.getObject(AvaticaResultSet.java:351)
      	at Dummy.testComplexQuery(Dummy.java:94)
      	at Dummy.main(Dummy.java:30)
      Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.io.Text
      	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)
      	... 8 more
      

      When the underlying type is a primitive, the getObject call succeeds

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dsbos Daniel Barclay
            rkins Rahul Kumar Challapalli
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment