-
Notifications
You must be signed in to change notification settings - Fork 145
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
Problem creating two connections #1
Comments
Typical! I posted the question - had a swig of beer ;-) and realised what might be going on. I can only add the paths for finding the JDBC drivers once - so in effect I have to specify the path for all JDBC drivers my program requires in both calls to jdbc.connect(). So if I change the code to look like this it works a treat:
FIxed! Not sure if this is technically a bug - but I am sure it will catch folks out. Matt |
Thank you Matt, I've opened #2 to find a solution to avoid such problems in the future. |
Thanks. Yeah I figured the second call was redundant this morning!
|
This issue is a life saver! I was having the same issue and couldn't figure out why for the longest time. Now I know! I agree that a warning is needed for this. |
I am struggling to create two connections in a single python program. My use case is that I want to connect to a source database and a target database to move data around. My single program requires both connections to be live at the same time. I am trying to run this code in Python 2.7.5:
I get an error when the second call to jdbc.connect is made:
However if I comment out either of the jdbc.connect statements each runs successfully on it's own and allows me to connect to the relevant database. If I reverse the order of the jdbc.connect statements I still get the error on the second call.
I think this may have something to do with the way that JPype is being reused in the second call. Is this something I am doing wrong? Or is there a known issue here?
Thanks in advance for any suggestions,
Matt
The text was updated successfully, but these errors were encountered: