Django-jython war 文件部署

发布于 2024-12-16 17:01:03 字数 1798 浏览 1 评论 0原文

尝试从我的 django 程序创建一个 war 文件,在运行 jython manage.py war 时不断遇到此错误:

jython manage.py war --include-java-libs "/home/user/Downloads/mysql-connector-java-5.1.18/mysql-connector-java-5.1.18-bin.jar"

回溯(最近一次调用最后):

  File "manage.py", line 14, in <module>
    execute_manager(settings)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.7/site-packages/django/core/management/validation.py", line 28, in get_validation_errors
    from django.db import models, connection
  File "/usr/lib/python2.7/site-packages/django/db/__init__.py", line 78, in <module>
    connection = connections[DEFAULT_DB_ALIAS]
  File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 94, in __getitem__
    conn = backend.DatabaseWrapper(db, alias)
  File "/usr/lib/python2.7/site-packages/doj/backends/zxjdbc/mysql/base.py", line 152, in __init__
    self.features = DatabaseFeatures()
TypeError: __init__() takes exactly 2 arguments (1 given)

任何帮助将不胜感激!

Trying to create a war file from my django program, keep running into this error when running jython manage.py war:

jython manage.py war --include-java-libs "/home/user/Downloads/mysql-connector-java-5.1.18/mysql-connector-java-5.1.18-bin.jar"

Traceback (most recent call last):

  File "manage.py", line 14, in <module>
    execute_manager(settings)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.7/site-packages/django/core/management/validation.py", line 28, in get_validation_errors
    from django.db import models, connection
  File "/usr/lib/python2.7/site-packages/django/db/__init__.py", line 78, in <module>
    connection = connections[DEFAULT_DB_ALIAS]
  File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 94, in __getitem__
    conn = backend.DatabaseWrapper(db, alias)
  File "/usr/lib/python2.7/site-packages/doj/backends/zxjdbc/mysql/base.py", line 152, in __init__
    self.features = DatabaseFeatures()
TypeError: __init__() takes exactly 2 arguments (1 given)

Any help would be greatly appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情场扛把子 2024-12-23 17:01:03

似乎是一个已知的错误,希望很快得到解决。

http://code.google.com/p /django-jython/issues/detail?id=56&q=mysql

Appears to be a known bug, hopefully taken care of soon.

http://code.google.com/p/django-jython/issues/detail?id=56&q=mysql

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文