This was never tested and if you help we can get it to work today.
In sql.py try replace line
params = ('jdbc:postgresql://%s:%s/%s' % (host, port, db),
user,passwd)
with
params = ('jdbc:postgresql://%s:%s/%s' % (host, port, db),
user,passwd, 'org.postgresql.Driver')
On Apr 8, 12:37 pm, JC11 <[email protected]> wrote:
> The next Jython challenge !
>
> The line:
> db = DAL('postgres://stubo:[email protected]/stubo_remote',
> pool_size=10)
> works fine when running in python, but fails from Jython (see
> below).
>
> From Jython I can run: 'from com.ziclix.python.sql import zxJDBC', so
> I think that is installed OK
>
> Traceback (most recent call last):
> File "C:\web2py1_76_5\gluon\restricted.py", line 173, in restricted
> exec ccode in environment
> File "C:/web2py1_76_5/applications/stubo/models/db.py", line 27, in
> <module>
> db = DAL('postgres://stubo:[email protected]/stubo_remote',
> pool_size=10)
> File "C:\web2py1_76_5\gluon\sql.py", line 3782, in DAL
> return SQLDB(uri, pool_size=pool_size, folder=folder,
> File "C:\web2py1_76_5\gluon\sql.py", line 1161, in __init__
> self._pool_connection(lambda
> params=params:zxJDBC.connect(*params))
> File "C:\web2py1_76_5\gluon\sql.py", line 840, in _pool_connection
> self._connection = f()
> File "C:\web2py1_76_5\gluon\sql.py", line 1161, in <lambda>
> self._pool_connection(lambda
> params=params:zxJDBC.connect(*params))
> IndexError: index out of range
>
> Any suggestions welcome.
>
> John C.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.