Hi Hugo + everyone,

Was there any resolution to this problem? I'm experiencing a similar error 
and any help would be appreciated! :)

- Ruth

I've installed Jython2.5.2, Django-1.4, and django-jython-1.3.0.

Following the JythonBook tutorial 
(http://jython.org/jythonbook/en/1.0/JythonDjango.html),

1. I've created a project 'pollsite'

2. I've changed the following in settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'doj.backends.zxjdbc.mysql',
        'NAME': 'mysite',
        'USER': 'root',
        'PASSWORD': 'root',
        'HOST': '0.0.0.0',
        'PORT': '8889',
    }
}

3. I am using mysql-connector-java-5.1.10-bin.jar and set CLASSPATH 
appropriately.

4. I ran "jython manage.py syncdb" and had the following error:
admins-MacBook-Air-3:pollsitejython admin$ jython manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File 
"/Users/admin/jython2.5.2/Lib/site-packages/django/core/management/__init__.py",
 
line 443, in execute_from_command_line
    utility.execute()
  File 
"/Users/admin/jython2.5.2/Lib/site-packages/django/core/management/__init__.py",
 
line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/Users/admin/jython2.5.2/Lib/site-packages/django/core/management/__init__.py",
 
line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File 
"/Users/admin/jython2.5.2/Lib/site-packages/django/core/management/__init__.py",
 
line 69, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File 
"/Users/admin/jython2.5.2/Lib/site-packages/django/utils/importlib.py", 
line 35, in import_module
    __import__(name)
  File 
"/Users/admin/jython2.5.2/Lib/site-packages/django/core/management/commands/syncdb.py",
 
line 8, in <module>
    from django.core.management.sql import custom_sql_for_model, 
emit_post_sync_signal
  File 
"/Users/admin/jython2.5.2/Lib/site-packages/django/core/management/sql.py", 
line 6, in <module>
    from django.db import models
  File "/Users/admin/jython2.5.2/Lib/site-packages/django/db/__init__.py", 
line 40, in <module>
    backend = load_backend(connection.settings_dict['ENGINE'])
  File "/Users/admin/jython2.5.2/Lib/site-packages/django/db/__init__.py", 
line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/Users/admin/jython2.5.2/Lib/site-packages/django/db/utils.py", 
line 93, in __getitem__
    conn = backend.DatabaseWrapper(db, alias)
  File 
"/Users/admin/jython2.5.2/Lib/site-packages/doj/backends/zxjdbc/mysql/base.py", 
line 156, in __init__
    self.ops = DatabaseOperations()
TypeError: __init__() takes exactly 2 arguments (1 given)

On Friday, July 2, 2010 4:29:19 AM UTC+3, Hugo wrote:
>
> Hi everyone, 
>
> I am experiencing a funny issue with the jdbc driver when trying to 
> run syncdb. 
>
> I've installed jython2.5.1, Django-1.2.1 and django-jython-1.1.1 
>
> 1. I create a project 'mysite'... 
>
> 2. change settings.py: 
>  DATABASE_ENGINE = 'doj.backends.zxjdbc.postgresql' 
>  DATABASE_NAME = 'mysite'             # Or path to database file if 
> using sqlite3. 
>  DATABASE_USER = 'hugo'             # Not used with sqlite3. 
>  DATABASE_PASSWORD = 'newuser1'         # Not used with sqlite3. 
>  DATABASE_HOST = ''             # Set to empty string for localhost. 
> Not used with sqlite3. 
>  DATABASE_PORT = ''             # Set to empty string for default. Not 
> used with sqlite3. 
>
> 3. set my CLASSPATH=/path/to/jdbc/postgresql/jar.file 
>
> 4. run jython manage.py syncdb 
>
>
> The problem is I get the following error: 
>
> Traceback (most recent call last): 
>   File "manage.py", line 11, in <module> 
>     execute_manager(settings) 
>   File "/opt/jython2.5.1/Lib/site-packages/django/core/management/ 
> __init__.py", line 438, in execute_manager 
>     utility.execute() 
>   File "/opt/jython2.5.1/Lib/site-packages/django/core/management/ 
> __init__.py", line 379, in execute 
>     self.fetch_command(subcommand).run_from_argv(self.argv) 
>   File "/opt/jython2.5.1/Lib/site-packages/django/core/management/ 
> __init__.py", line 257, in fetch_command 
>     klass = load_command_class(app_name, subcommand) 
>   File "/opt/jython2.5.1/Lib/site-packages/django/core/management/ 
> __init__.py", line 257, in fetch_command 
>     klass = load_command_class(app_name, subcommand) 
>   File "/opt/jython2.5.1/Lib/site-packages/django/core/management/ 
> __init__.py", line 67, in load_command_class 
>     module = import_module('%s.management.commands.%s' % (app_name, 
> name)) 
>   File "/opt/jython2.5.1/Lib/site-packages/django/utils/importlib.py", 
> line 35, in import_module 
>     __import__(name) 
>   File "/opt/jython2.5.1/Lib/site-packages/django/core/management/ 
> commands/syncdb.py", line 7, in <module> 
>     from django.core.management.sql import custom_sql_for_model, 
> emit_post_sync_signal 
>   File "/opt/jython2.5.1/Lib/site-packages/django/core/management/ 
> sql.py", line 5, in <module> 
>     from django.contrib.contenttypes import generic 
>   File "/opt/jython2.5.1/Lib/site-packages/django/contrib/contenttypes/ 
> generic.py", line 6, in <module> 
>     from django.db import connection 
>   File "/opt/jython2.5.1/Lib/site-packages/django/db/__init__.py", 
> line 75, in <module> 
>     connection = connections[DEFAULT_DB_ALIAS] 
>   File "/opt/jython2.5.1/Lib/site-packages/django/db/utils.py", line 
> 92, in __getitem__ 
>     conn = backend.DatabaseWrapper(db, alias) 
>   File "/opt/jython2.5.1/Lib/site-packages/doj/backends/zxjdbc/ 
> postgresql/base.py", line 70, in __init__ 
>     self.ops = DatabaseOperations() 
> TypeError: __init__() takes exactly 2 arguments (1 given) 
>
> I can't be alone experiencing this issue... and the solution is 
> probably pretty simple... but I can't seem to find anything. 
>
>
> Thank you for the help! 
> Hugo

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f4e07308-0b22-4c5d-9d9b-abf5c16be245%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to