BIRT Exchange Forum: Hive JDBC driver - BIRT Exchange Forum

Jump to content


 

BIRT Poll: To best make a table fill a pdf page before breaking (PL=page layout, PBI=page break interval) set:

PL: auto, PBI: 0PL: fixed, PBI: 0PL: auto, PBI: 1000000PL: fixed, PBI: 1000000
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Hive JDBC driver Rate Topic: -----

#1 User is offline   dabelie Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 19-July 12


Posted 19 July 2012 - 06:09 AM

Hello everyone,

I am having trouble configuring the new JDBC driver between Hive and Birt : I have Hive set up nicely and working, when I want to add a new data source, i add the right jar files, and when i click on "test connection", nothing happens.
I configured the url as : jdbc:hive://localhost:10000/default
Then I clicked ok, and i tried to add a new data set, but Birt wont let me do it...what did I do wrong?

Thanks a lot!

P.S:forgive my english, I am french...
0

#2 User is offline   dabelie Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 19-July 12


Posted 20 July 2012 - 01:02 AM

Let me explain you a few things I did :

-I started hadoop, and hive, I have on table in have, containing data, i can do queries on the terminal, no problem
-I added all the exact same jars as written here :
http://www.eclipse.o.../notable3.7.php
-I used the database jdbc:hive://localhost:10000/default

I clicked on "Test connection", but it didnt do anything, so I looked at the logs (in workspace/metadata) and apparently here is the problem :

Quote

!ENTRY org.eclipse.ui 4 0 2012-07-20 09:40:00.339
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.apache.thrift.transport.TIOStreamTransport.<clinit>(TIOStreamTransport.java:38)
at org.apache.hadoop.hive.jdbc.HiveConnection.<init>(HiveConnection.java:92)
at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$WrappedDriver.connect(JDBCDriverManager.java:1234)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:273)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:205)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.tryCreateConnection(JDBCDriverManager.java:787)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.testConnection(JDBCDriverManager.java:687)
at org.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader.java:147)
.....................
quinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at org.eclipse.birt.core.framework.URLClassLoader.findClass1(URLClassLoader.java:188)
at org.eclipse.birt.core.framework.URLClassLoader$1.run(URLClassLoader.java:156)
at org.eclipse.birt.core.framework.URLClassLoader$1.run(URLClassLoader.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.core.framework.URLClassLoader.findClass(URLClassLoader.java:151)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 58 more


Seeing that, I thought maybe I needed an sl4j jar, so I added 2 jars from hive:
-slf4j-log4j12-1.6.1.jar
-slf4j-api-1.6.1
I don't know if it is a good idea, but I thought i could try.
And here is the new log messages I get when I try to test the connection (I still have nothing happenning when I click on "test connection")


Quote

!ENTRY org.eclipse.ui 4 0 2012-07-20 09:47:49.069
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class org.apache.thrift.transport.TSocket
at org.apache.hadoop.hive.jdbc.HiveConnection.<init>(HiveConnection.java:92)
at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$WrappedDriver.connect(JDBCDriverManager.java:1234)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:273)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:205)
...............
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)


I restarted birt a few times, tried with one new jar, with two new jars, and now, when I click on "Test Connection", I have a message saying :

Quote

org.eclipse.birt.report.data.oda.jdbc.JDBCException: There is an error in get connection, Could not establish connection to localhost:10000/default: java.net.ConnectException: Connection refused.
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:303)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:205)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.tryCreateConnection(JDBCDriverManager.java:787)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.testConnection(JDBCDriverManager.java:687)
at org.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader.java:147)
at org.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader.java:138)
at org.eclipse.birt.report.data.oda.hive.ui.profile.HiveSelectionPageHelper.testConnection(HiveSelectionPageHelper.java:404)
at org.eclipse.birt.report.data.oda.hive.ui.profile.HiveSelectionPageHelper.access$4(HiveSelectionPageHelper.java:392)
at org.eclipse.birt.report.data.oda.hive.ui.profile.HiveSelectionPageHelper$2.widgetSelected(HiveSelectionPageHelper.java:333)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
..........


I hope you could understand my problems, my english isnt perfect, I am french, but if you could help me set this up, I would be very grateful.

Thanks!
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users