Python Forum
jaydebeapi architecture error?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
jaydebeapi architecture error?
#1
Hello All,

I am struggling with connecting to a database using a jdbc driver.  In the interest of full disclosure I am a bit of n00b with python.
I am on a Mac (El Capitan) and I have used Homebrew to install Python 3.6.

Here is my code:


import jaydebeapi
conn = jaydebeapi.connect('org.netezza.Driver',['jdbc:netezza://servername:5480/catalogName','user','password'])
curs = conn.cursor()
curs.execute("select system_software_version from _v_system_info")
data = curs.fetchone()
print("Netezza Version = %s" % data)
conn.close
I then get the following error:


Quote:File "/usr/local/lib/python3.6/site-packages/jpype/_core.py", line 50, in startJVM
  _jpype.startup(jvm, tuple(args), True)

builtins.RuntimeError: Unable to load DLL [/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvm.dylib], error = dlopen(/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvm.dylib, 9): no suitable image found. Did find:
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvm.dylib: mach-o, but wrong architecture at native/common/include/jp_platform_linux.h:45

Any ideas where I am going astray?

Thanks.
Reply
#2
There seem to be instructions on how to make that visible for windows install (aslo Linux and OS-X) here http://jpy.readthedocs.io/en/latest/install.html
Search 'Typical Build Problems' on the page (ctrl-f)
Reply
#3
Thanks Larz60+, that did point me in the right direction. I ended up pointing all my java variables to a 1.7 jdk that was on my machine and it all started working!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unexpected termination of program when using JDBC drivers in python with jaydebeapi skarface19 2 253 Feb-17-2024, 12:01 PM
Last Post: skarface19
  Architecture question for website with python crontab script rockie12us 1 1,711 Aug-09-2021, 10:07 AM
Last Post: Larz60+
  A question regarding to the microservice architecture itaybardugo 0 1,423 Oct-15-2020, 06:37 AM
Last Post: itaybardugo
  Architecture for script executor marsokod 0 2,104 Mar-03-2018, 09:42 PM
Last Post: marsokod
  Python Architecture in Bock diagram hshivaraj 3 3,427 Jan-08-2018, 05:52 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020