Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CLASSPATH value for creating JavaGateway and load JDBC driver class #369

Merged
merged 1 commit into from
Aug 26, 2016

Conversation

ShahabT
Copy link
Contributor

@ShahabT ShahabT commented May 12, 2016

Using this documentation I failed to connect Hue to my JDBC-compatible tool. When I investigated the source code I found that the CLASSPATH variable and the JDBC driver class name are not used anywhere in the code. So, my JDBC driver class is not loaded at all.
This PR fixes that and makes sure that the JDBC driver class is loaded.

@romainr romainr merged commit 195cd49 into cloudera:master Aug 26, 2016
@romainr
Copy link
Contributor

romainr commented Aug 26, 2016

Thanks!

And could you sign the agreement about contributing your code to the open source?
https://github.com/cloudera/hue/wiki/Ccla#online-form

@ShahabT
Copy link
Contributor Author

ShahabT commented Aug 26, 2016

Done!

@mikehomee
Copy link

Hi! after adding the lines I got this message

selection_239

please help. Thank you!

romainr pushed a commit that referenced this pull request Dec 13, 2016
@rsilvery
Copy link

rsilvery commented Feb 3, 2017

I am getting the same error as above. Is there a solution?

@ShahabT
Copy link
Contributor Author

ShahabT commented Feb 4, 2017

Hi,
Before launching Hue, you need to set the CLASSPATH environment variable. CLASSPATH should contain the full path of the JAR file of you JDBC driver class.
You can put something like bellow in you .bash_profile file, to make sure the variable is always set.

export CLASSPATH=/path/to/jdbc/driver.jar:$CLASSPATH

@ebuildy
Copy link

ebuildy commented Mar 28, 2017

Hello, I think you should also update the Docker image to have it by default (at least define to avoid the error).

Here an example to use with Docker (I have downloaded jar on Docker host before):

docker run -tid -v ~/hue:/hue/desktop/conf  --name hue -p 8888:8888 
--add-host="hadoop:__IP__" 
-v $(pwd):/home/root 
-e CLASSPATH=/home/root/presto-jdbc-0.165.jar  
gethue/hue

@madorb
Copy link

madorb commented Apr 4, 2018

to be clear, doesn't this mean the instructions provdied there that claim to work with 3.10 will not actually work until 3.12? Am i missing something? I'm on 3.11 and have got the classpath defined in the profile of the user that it's launching with, but no dice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants