OFBiz安装的问题,无法初始化数据库?

发布于 2021-11-06 08:46:15 字数 169 浏览 825 评论 4

Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
Message: Table 'ofbiz.job_sandbox' doesn't exist

 

数据库驱动和配置文件都按教程配置了啊

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

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

发布评论

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

评论(4

深巷少女 2021-11-12 02:26:37

楼上正解!!安装opentaps时修改
frameworkentitysrcorgofbizentityjdbcDatabaseUtil.java中“TYPE“为“
ENGINE” 通过!!!

等风来 2021-11-11 17:25:59

找到问题所在了。贴出来希望对大家有帮助  :

在5.1以及之前版本的MySQL中新建一个Table,可以这样执行:

CREATE TABLE t (i INT) TYPE = MYISAM;

或者

CREATE TABLE t (i INT) ENGINE = MYISAM;

在MySQL5.5版本中,用TYPE来指定存储引擎已经行不通,标准用法是ENGINE。

其实早在MySQL的NN个版本之前,官方手册已经建议废弃TYPE而推荐使用ENGINE,确切说是从MySQL 4.0.18版本开始,用TYPE指定存储引擎的语法一直保留至MySQL5.1,也仅仅是为了兼容旧的数据库版本。

从现在开始,TYPE已经被禁用,指定MySQL存储引擎的命令没有其他选择,必须使用ENGINE。

而ofBiz ,apache-ofbiz-10.04frameworkentitysrcorgofbizentityjdbcDatabaseUtil.java  这个工具类生成的建表SQL,是用TYPE = 的。修改 DatabaseUtil.java 类即可

累赘 2021-11-11 17:00:43

2011-05-24 13:23:00,328 (org.ofbiz.service.job.JobPoller@1004363) [    TransactionUtil.java:370:WARN ]
---- exception report ----------------------------------------------------------
[TransactionUtil.setRollbackOnly] Calling transaction setRollbackOnly; this stack trace shows where this is happening:
Exception: java.lang.Exception
Message: Failure in storeByCondition operation for entity [JobSandbox]: org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception occured in updateByCondition (SQL Exception while executing the following:UPDATE JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2011-05-24 13:21:44.015' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (Table 'ofbiz.job_sandbox' doesn't exist)). Rolling back transaction.
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Failure in storeByCondition operation for entity [JobSandbox]: org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception occured in updateByCondition (SQL Exception while executing the following:UPDATE JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2011-05-24 13:21:44.015' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (Table 'ofbiz.job_sandbox' doesn't exist)). Rolling back transaction.
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:370)
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:312)
org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:1300)
org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:1261)
org.ofbiz.service.job.JobManager.poll(JobManager.java:157)
org.ofbiz.service.job.JobPoller.run(JobPoller.java:90)
java.lang.Thread.run(Thread.java:662)
--------------------------------------------------------------------------------

2011-05-24 13:23:00,328 (org.ofbiz.service.job.JobPoller@1004363) [         JobManager.java:187:ERROR]
---- exception report ----------------------------------------------------------
Error in polling JobSandbox: [org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception occured in updateByCondition (SQL Exception while executing the following:UPDATE JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2011-05-24 13:21:44.015' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (Table 'ofbiz.job_sandbox' doesn't exist))]. Rolling back transaction.
Exception: org.ofbiz.entity.GenericDataSourceException
Message: Generic Entity Exception occured in updateByCondition (SQL Exception while executing the following:UPDATE JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2011-05-24 13:21:44.015' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (Table 'ofbiz.job_sandbox' doesn't exist))
---- cause ---------------------------------------------------------------------
Exception: org.ofbiz.entity.GenericDataSourceException
Message: SQL Exception while executing the following:UPDATE JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2011-05-24 13:21:44.015' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (Table 'ofbiz.job_sandbox' doesn't exist)
---- cause ---------------------------------------------------------------------
Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
Message: Table 'ofbiz.job_sandbox' doesn't exist
---- stack trace ---------------------------------------------------------------
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ofbiz.job_sandbox' doesn't exist
sun.reflect.GeneratedConstructorAccessor6.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
com.mysql.jdbc.Util.getInstance(Util.java:386)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)

貌似就木有创建的语句

千笙结 2021-11-11 11:17:26

查看一下生成的sql日志,看看语法在那错了

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