H:\JYTHON>java -jar RadiantDbConnection.jar
Exception in thread "main" Traceback (innermost last):
  File "H:\p4\ssr4\ssr4.6\stable\source\Database\installation\Jython\RadiantDbConnection.py", line 0, in main
  File "H:\p4\ssr4\ssr4.6\stable\source\Database\installation\Jython\RadiantDbConnection.py", line 0, in __init__
AttributeError: java package 'com.ziclix.python.sql' has no attribute 'zxJDBC'

To create the jar I use:
jythonc -c -j RadiantDbConnection.jar RadiantDbConnection.py

The jython code RadiantDbConnection.py is listed at the end of this mail.

Is this a bug on the jythonc utility

If anyone can help please email as soon as possible.
Paul Sehgal.


import RadiantDebug
import com.ziclix.python.sql as sql

class Connection:
    def __init__(self, userName, userPswd, dbName, server):
        RadiantDebug.debug('In ' + str(self.__class__.__name__) + '(' + userName+', '+userPswd+','+dbName+','+server+')')

        self._userName = userName
        self._userPswd = userPswd
        self._dbName = dbName
        self._server = server
        self._d = "jdbc:oracle:thin:@" + server + ":1521:" + dbName
        self._v = "oracle.jdbc.driver.OracleDriver"
        self._db = sql.zxJDBC.connect(self._d, self._userName, self._userPswd, self._v)
    def __str__(self):
        return 'RadiantDbConnection(' + self._userName + ', ' + self._dbName + ', ' + self._server + ')'
    def getConnection(self):
        return self._db
    def getDatabaseName(self):
        return self._dbName
    def getServerName(self):
        return self._server
    def getUserName(self):
        return self._userName
    def closeConnection(self):
#if called by itself call the main function
if __name__ == '__main__':
    x = Connection('r1001', 'r1001', 'leeds1', 'eldonsquare')
    print x
    print x.getDatabaseName()
    print x.getServerName()
    print x.getUserName()