-
1. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
rareddy Apr 19, 2018 10:35 AM (in response to srinath0533)1) Looks like Hive now offer the single JAR like "hive-jdbc-2.1.0.2.6.3.19-2-standalone.jar" so, download whatever version that matches with your server.
2) Copy this JAR into "modules/system/layers/dv/org/apache/hadoop/hive/main" directory.
3) Create a module.xml file in "modules/system/layers/dv/org/apache/hadoop/hive/main" that looks like
<?xml version="1.0" encoding="UTF-8"?><module xmlns="urn:jboss:module:1.0" name="org.apache.hadoop.hive">
<resources>
<resource-root path="hive-jdbc-2.1.0.2.6.3.19-2-standalone.jar"/>
</resources>
<dependencies>
<module name="org.slf4j"/>
<module name="org.apache.commons.logging"/>
<module name="javax.api"/>
<module name="javax.resource.api"/>
</dependencies>
</module>
Note adjust above to your version of the driver.
4) Edit standalone.xml ( if using Teiid, then standalone-teiid.xml ) file add the following file contents under "datasources" subsystem from file "/docs/teiid/datasources/hive/hive2.xml". Note you have to provide the correct host, port and credential information to access your Hive server.
5) Restart the server
6) Now do the import process from Designer as you did above. But note the JNDI name from above step that you need to select in data sources section during the import.
If you are using any older versions than upgrade to at least Teiid 9.3 or 10.2 versions, as there were many changes in the Hive translator.
-
2. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
srinath0533 May 3, 2018 12:48 PM (in response to rareddy)Hello Ramesh,
I followed above steps and received the "Wrong Driver Class" as below.
Caused by: javax.resource.ResourceException: Wrong driver class [class org.apache.hive.jdbc.HiveDriver] for this connection
I tried with multiple driver class as below.
org.apache.hadoop.hive.jdbc.HiveDriver
org.apache.hive.jdbc.HiveDriver
The driver im using is "hive-jdbc-2.1.0.2.6.3.19-2-standalone" which is added in ((C:\EAP-6.4.0\modules\system\layers\dv\org\apache\hadoop\hive\main))
However i received same error. I'm having really hard time finding videos or content online. I followed steps as per the instructions and now ran out of options.
Please help me connecting to Hive server. This is almost critical for me at this moment.
I have attached the
standalone.xml (C:\EAP-6.4.0\standalone\configuration),
module.xml (C:\EAP-6.4.0\modules\system\layers\dv\org\apache\hadoop\hive\main)
Hive2.xml (C:\EAP-6.4.0\docs\teiid\datasources\hive)
-
module.xml.zip 361 bytes
-
standalone.xml.zip 5.1 KB
-
hive2.xml.zip 667 bytes
-
-
3. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
rareddy May 3, 2018 12:39 PM (in response to srinath0533)Attach your standalone.xml file and module.xml file.
-
4. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
srinath0533 May 3, 2018 12:49 PM (in response to rareddy)I did attached files in the previous message.
-
5. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
rareddy May 3, 2018 1:46 PM (in response to srinath0533)From the server.log from original message, it looks like you added the hive-jdbc-0.12.0.2.0.6.0-76.jar to "deployments" directory. It should not be there. It needs to be in same directory as the module.xml file. And you do not need
hive-exec-0.12.0.2.0.6.0-76.jar
hive-service-0.12.0.2.0.6.0-76.jar
hive-jdbc-2.0.0.jar
10:17:11,350 INFO [org.jboss.as.repository] (management-handler-thread - 8) JBAS014900: Content added at location C:\EAP-6.4.0\standalone\data\content\07\a3a5eb310e070a5d582e02cc6dada4e289ceea\content 10:17:11,350 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "hive-jdbc-0.12.0.2.0.6.0-76.jar" (runtime-name: "hive-jdbc-0.12.0.2.0.6.0-76.jar") 10:17:11,486 INFO [org.jboss.as.server] (management-handler-thread - 8) JBAS015859: Deployed "hive-jdbc-0.12.0.2.0.6.0-76.jar" (runtime-name : "hive-jdbc-0.12.0.2.0.6.0-76.jar") 10:23:50,251 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment hive-jdbc-0.12.0.2.0.6.0-76.jar (runtime-name: hive-jdbc-0.12.0.2.0.6.0-76.jar) in 28ms 10:23:50,251 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "hive-jdbc-0.12.0.2.0.6.0-76.jar" (runtime-name: "hive-jdbc-0.12.0.2.0.6.0-76.jar") 10:23:50,335 INFO [org.jboss.as.server] (management-handler-thread - 12) JBAS015865: Replaced deployment "hive-jdbc-0.12.0.2.0.6.0-76.jar" with deployment "hive-jdbc-0.12.0.2.0.6.0-76.jar" 10:24:09,070 INFO [org.jboss.as.repository] (management-handler-thread - 11) JBAS014900: Content added at location C:\EAP-6.4.0\standalone\data\content\05\c6c3aab623f8805f9086b33e045697a0907cb8\content 10:24:09,070 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "hive-exec-0.12.0.2.0.6.0-76.jar" (runtime-name: "hive-exec-0.12.0.2.0.6.0-76.jar") 10:24:09,727 INFO [org.jboss.as.server] (management-handler-thread - 11) JBAS015859: Deployed "hive-exec-0.12.0.2.0.6.0-76.jar" (runtime-name : "hive-exec-0.12.0.2.0.6.0-76.jar") 10:24:21,695 INFO [org.jboss.as.repository] (management-handler-thread - 9) JBAS014900: Content added at location C:\EAP-6.4.0\standalone\data\content\82\aa808441587894d25289ca0a0ee933c67d9640\content 10:24:21,695 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "hive-service-0.12.0.2.0.6.0-76.jar" (runtime-name: "hive-service-0.12.0.2.0.6.0-76.jar") 10:24:21,894 INFO [org.jboss.as.server] (management-handler-thread - 9) JBAS015859: Deployed "hive-service-0.12.0.2.0.6.0-76.jar" (runtime-name : "hive-service-0.12.0.2.0.6.0-76.jar") 10:24:40,472 INFO [org.jboss.as.repository] (management-handler-thread - 10) JBAS014900: Content added at location C:\EAP-6.4.0\standalone\data\content\ad\6a9a8a61a882faaad3c5a36ebf794a073dd344\content 10:24:40,472 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "hive-jdbc-2.0.0.jar" (runtime-name: "hive-jdbc-2.0.0.jar") 10:24:40,495 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010404: Deploying non-JDBC-compliant driver class org.apache.hive.jdbc.HiveDriver (version -1.-1) 10:24:40,527 INFO [org.jboss.as.server] (management-handler-thread - 10) JBAS015859: Deployed "hive-jdbc-2.0.0.jar" (runtime-name : "hive-jdbc-2.0.0.jar")
Remove those files. If this just a development server, you can just remove "standalone/data" directory, but note all your deployments will be gone. Otherwise do
./jboss-cli.sh --connect
undeploy hive-jdbc-0.12.0.2.0.6.0-76.jar
undeploy hive-exec-0.12.0.2.0.6.0-76.jar
undeploy hive-service-0.12.0.2.0.6.0-76.jar
undeploy hive-jdbc-2.0.0.jar
then remove all above files from "standalone/deployments" directory *if* they exist there. Then make sure your hive-jdbc-0.12.0.2.0.6.0-76.jar in same directory as module.xml and restart server. If you still have an error attach the error log.
-
6. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
srinath0533 May 4, 2018 11:33 AM (in response to rareddy)Hello Ramesh,
Thank you for your quick response and support. I was able to connect to Hive using JDBC Connection profile. I was not able to connect using Teiid Importer. Below are the steps to connect to Hive using Generic JDBC Connection Profile.
1. Select "Create JDBC Connection"2. Then choose "Generic JDBC" from the list of connection profiles.
3. Select" New Driver Definition" option beside the Drivers drop down option. Circled below in BLUE
4. Select "Generic JDBC Driver" under "Name/Type" tab
5. Add below jar files in "Jar List" tab. NOTE: Please use the Hive Jar versions based on the Jboss version you have. I tried with different jar files and did not work. So version should match your Jboss.
6. Provide connection details in "Properties" tab as below.
7. Click "OK" and enter the "Password". Please TEST the connection and once successful click "Next" and click "Finish".
Now the JDBC connection profile is created.
8. Then click on "Create Source Model for JDBC data source" as shown below and click "Next" on "Import Database via JDBC" tab.
9. Select the options what you need. Ex: Table, View, Index_table on "Select Database Metadata" tab and click "NEXT"
10. Select the required schemas, tables/views on "Select Database Objects" tab and Click next.
11. Select the "Into Folder" under Specify Import Options window where you want to create the tables/views and click Finish.
Tables, Views will be created under the folder you mentioned in the above step.
-
7. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
rareddy May 4, 2018 11:51 AM (in response to srinath0533)After following the instructions given before to create Hive source connection in JDV, you need to use "Teiid Connection Importer" in the Designer to connect and build your model. Be sure to select "hive" as translator.
-
8. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
srinath0533 May 8, 2018 11:04 AM (in response to rareddy)Hello Ramesh,
Thank you for the suggestion and sorry for the delayed response. As you mentioned after creating the JDBC Source connection i tried to create connection using TEIID Importer but i still see the same issue "Error deploying "importVDB". Please check the server log. And when i see server log in C:\EAP-6.4.0\standalone\log its not updated.
My question is what is the difference between connecting to Hive through Generic JDBC Connection and TEIID Importer?? What are the limitations using Generic JDBC Connection instead of TEIID Importer?
Thank you for quick responses Ramesh. I really appreciate it.
Thanks,
Srinath
-
9. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
rareddy May 8, 2018 11:42 AM (in response to srinath0533)"Generic JDBC Connection" makes JDBC connection from Designer directly to the Hive and downloads the metadata. Whereas "Teiid Connection Importer" uses the connection in server and server facilities to download the metadata.
I am not sure what kind of error you are running into without much more details, so, for now, I leave this as user error.
-
10. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
srinath0533 May 14, 2018 11:47 AM (in response to rareddy)Hive Issue is resolved. Thank you Ramesh.
-
11. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
rareddy May 14, 2018 1:51 PM (in response to srinath0533)What is the action you took to solve this?
-
12. Re: Issues connecting Jboss DV to Hive source. Wrong Driver Class is the error.
srinath0533 May 14, 2018 2:41 PM (in response to rareddy)The jar files what i tried were incorrect. The DevStudio and Teiid Designer(im not sure if this also a cause) what i have was also order version. Later i used the below jar files and i have upgraded to DevStudio 11.3.0. i was able to connect through JDBC Connection and Teiid Importer as well. So after making these 2 changes i was able to connect in both ways and import the metadata.