2 Replies Latest reply on Oct 21, 2016 11:25 AM by rareddy

    Connecting with Hive from Jboss DV.

    debashishsaha004

      https://developer.jboss.org/wiki/ConnectToAHadoopSourceUsingHive2 ----its is the resource that I am following which is referred in many blog post.

      In addition to it ,

      I am following the reply from rareddy in this post https://developer.jboss.org/thread/272633

      Complete View.PNG

      The Module.xml of the above picture  is Quoted Here below:-

      <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.0" name="org.apache.hadoop.hive12">
          <resources>
            <resource-root path="hadoop-core-1.0.3.jar"/>
            <resource-root path="hive-exec-0.12.0.2.0.6.0-76.jar"/>
            <resource-root path="hive-jdbc-0.12.0.2.0.6.0-76.jar"/>
            <resource-root path="hive-metastore-0.12.0.2.0.6.0-76.jar"/>
            <resource-root path="hive-service-0.12.0.2.0.6.0-76.jar"/>
            <resource-root path="hive-common-0.12.0.2.0.6.0-76.jar"/>
            <resource-root path="libfb303-0.9.0.jar"/>
            <resource-root path="commons-codec-1.7.jar"/>
            <resource-root path="libthrift-0.9.0.jar"/>
            <resource-root path="httpclient-4.1.3.jar"/>
            <resource-root path="httpcore-4.1.4.jar"/>
          </resources>
      
      
          <dependencies>
              <module name="org.slf4j"/>
              <module name="org.apache.commons.logging"/>
              <module name="javax.api"/>
              <module name="javax.resource.api"/>
          </dependencies>
      </module>
      

       

      So till now I have successfully created one module.

      After that I have modified the standalone.xml.see the below inserted picture.

      standalone.PNG

       

      Below the picture that I edited .. only the hive 12 thing I have added.

      XMl.PNG

       

       

      I have also attached the standalone.xml file from EAP_HOME>standalone>config >....

      here is the error I am getting attached in server Log.txt.

       

      Thank you in advance.

      Debashish Saha

       

      -------------------------------------------------------------------------------------------------

      -------------------------------------------------------------------------------------------------

      This is an edited version of my post after dashed.

      I just restarted the server the all the Hive drivers got deployed..

      dont know how.

      Anywway now at this position connection profile is set up.

      But when I ping to the data source.

      I get the following:-

      Error.PNG

       

      Message was edited by: Debashish Saha after dashed

        • 1. Re: Connecting with Hive from Jboss DV.
          debashishsaha004

          java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/task/TaskAttemptContextImpl

            at java.lang.ClassLoader.defineClass1(Native Method)

            at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

            at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)

            at java.net.URLClassLoader.access$100(URLClassLoader.java:73)

            at java.net.URLClassLoader$1.run(URLClassLoader.java:368)

            at java.net.URLClassLoader$1.run(URLClassLoader.java:362)

            at java.security.AccessController.doPrivileged(Native Method)

            at java.net.URLClassLoader.findClass(URLClassLoader.java:361)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

            at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

            at java.lang.Class.forName0(Native Method)

            at java.lang.Class.forName(Class.java:264)

            at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:120)

            at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:115)

            at org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:80)

            at org.apache.hadoop.hive.shims.ShimLoader.getHadoopThriftAuthBridge(ShimLoader.java:104)

            at org.apache.hive.service.auth.KerberosSaslHelper.getKerberosTransport(KerberosSaslHelper.java:68)

            at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:198)

            at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:138)

            at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:123)

            at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)

            at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:328)

            at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)

            at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)

            at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:96)

            at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnectionFactory.createConnection(JDBCConnectionFactory.java:53)

            at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)

            at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)

            at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)

            at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)

            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

          Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl

            at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

            at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

            ... 33 more

           

           

           

           

          ------------------------------------------

          this the stack trace for the ping connection  error.

          Plase help me.

          thank you in advance Debashish saha

          • 2. Re: Connecting with Hive from Jboss DV.
            rareddy

            Debashish,

             

            For Hive you need to use "Teiid Connection Importer" wizard NOT JDBC importer as you doing above. What you did for module.xml is still required. The you create data source i.e. connection. Then use the importer I am suggesting. See Connect to a Hadoop Source using Hive2


            Ramesh..