views:

118

answers:

0

I'm attempting to execute my Django 1.1 app, which accesses a SQL Server 2005 database, inside a Tomcat servlet container. I'm using Django-Jython 1.1.1 and Jython 2.5.1 to do this.

In settings.py, I set

DATABASE_ENGINE='doj.backends.zxjdbc.mssql2k'

When I try to get the war file to deploy to Tomcat with:

jython manage.py war

I get

File "C:\dl\django-jython-1.1.1\doj\backends\zxjdbc\mssql2k\base.py", line 20,
in <module>
raise ImproperlyConfigured("Error loading zxJDBC module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading zxJDBC module: 
No module named apache

Why is it looking for a module named apache? Apache has nothing to do with this..

My JYTHONPATH appears to be basically correct. Inside jython, I can do all of the following:

import django
import doj 
from com.ziclix.python.sql import zxJDBC as Database

Am I missing a jar file on my classpath? django-jython apparently prefers postgressql,mysql, and Oracle. Is anyone using this successfully with SQL Server 2005?

thanks


OK I'm a bit closer

I went and got the newest apache commons dbcp and commons pool jars). I put them in my classpath, then I deleted the jython cachedir folder. The first time you run jython, it scans packages. If you change classpath, its apparently not smart enough to see it? So you can delete cachedir and force a rescan.

Now, when I

jython manage.py war

I get

super(DatabaseWrapper, self).__init__(autocommit=autocommit, **kwargs)
File "C:\dl\django-jython-1.1.1\doj\backends\zxjdbc\common.py", line 14, in __init__
super(zxJDBCDatabaseWrapper, self).__init__(*args, **kwargs)
ypeError: __init__() got an unexpected keyword argument 'autocommit'