From: mju <re...@bu...> - 2008-11-26 10:20:56
|
New submission from mju <am...@tv...>: After compiling with "jythonc --jar check.jar --all --core --compiler "C:\Program Files\Java\jdk1.6.0_10\bin\javac.exe" checkDB.py" the compilation shows no error. The execution ""C:\Program Files\Java\jdk1.6.0_10\bin\java" -jar check.jar HOST jdbc:oracle:thin:@10.230.33.21:1521:devdb01 USER PASSWD" runs into the following error: Exception in thread "main" Traceback (innermost last): File "D:\checkDB.py", line 0, in main ImportError: cannot import name zxJDBC I have the same Problems on Windows and on Linux. The code of checkDB.py: ----------------------- #/usr/bin/env jython # -*- coding: utf-8 -*- from com.ziclix.python.sql import zxJDBC import sys import string argsDB = string.upper(sys.argv[1]) argsurl = sys.argv[2] argsuser = sys.argv[3] argspwd = sys.argv[4] READoracleConn = zxJDBC.connect(argsurl, argsuser, argspwd, "oracle.jdbc.driver.OracleDriver") READoracleCursor = READoracleConn.cursor() READoracleCursor.arraysize = 50 READoracleCursor.execute("""SELECT 1 FROM dual""") results = READoracleCursor.fetchall() for line in results: ofd=str(line[0]) print ofd # Disconnect von Instance... close=READoracleConn.close() ---------- components: zxjdbc messages: 3849 nosy: mju severity: normal status: open title: Jython 2.2.1 - ImportError: cannot import name zxJDBC type: behaviour _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue1184> _______________________________________ |