连接数据库失败

系统管理中配置外部数据库,连接MySQL数据库时出现数据导入异常,截图及详细信息如下:


配置页面截图:


image.png


MySQL中的finedb数据库中导入的数据表截图:

image.png


详细信息:

com.fr.third.org.hibernate.exception.SQLGrammarException: could not execute statement

at com.fr.third.org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)

at com.fr.third.org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)

at com.fr.third.org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)

at com.fr.third.org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)

at com.fr.third.org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)

at com.fr.third.org.hibernate.hql.internal.ast.exec.BasicExecutor.doExecute(BasicExecutor.java:91)

at com.fr.third.org.hibernate.hql.internal.ast.exec.BasicExecutor.execute(BasicExecutor.java:60)

at com.fr.third.org.hibernate.hql.internal.ast.exec.DeleteExecutor.execute(DeleteExecutor.java:111)

at com.fr.third.org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:429)

at com.fr.third.org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:374)

at com.fr.third.org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1360)

at com.fr.third.org.hibernate.internal.QueryImpl.executeUpdate(QueryImpl.java:102)

at com.fr.decision.migration.manager.AbstractTransferManager.truncateTable(AbstractTransferManager.java:368)

at com.fr.decision.migration.manager.AbstractTransferManager.truncateTables(AbstractTransferManager.java:276)

at com.fr.decision.migration.manager.AbstractTransferManager.transfer(AbstractTransferManager.java:179)

at com.fr.decision.migration.manager.AbstractTransferManager.startTransfer(AbstractTransferManager.java:69)

at com.fr.decision.migration.MigrationContext$TransferManagerCollection.startTransfer(MigrationContext.java:286)

at com.fr.decision.migration.MigrationContext$1.run(MigrationContext.java:114)

at java.lang.Thread.run(Thread.java:748)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'finedb.qrtz_calendars' doesn't exist

at sun.reflect.GeneratedConstructorAccessor572.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

at com.mysql.jdbc.Util.getInstance(Util.java:408)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2487)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)

at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079)

at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013)

at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104)

at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998)

at com.fr.third.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:252)

at com.fr.third.org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)

... 14 more


FineBI 用户h3990969 发布于 2020-5-19 16:58
1min目标场景问卷 立即参与
回答问题
悬赏:4 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
3
zsh331Lv8专家互助
发布于2020-10-30 11:02

楼主: MySQL外接数据库导入数据失败一般和MySQL库的编码有关系;

  配置外接数据库-https://help.fanruan.com/finereport/doc-view-2458.html


image.png

最佳回答
1
冷枫逸Lv3见习互助
发布于2020-10-30 11:10

可能性有很多种,比如数据库表主键没有设置自增,或者插入数据库的时候向非空字段插入空值等等。看你的报错信息,应该是缺少表image.png

最佳回答
0
用户J0360571Lv1见习互助
发布于2020-10-30 10:57

我也遇到了这个问题   请问你解决了么


  • 4关注人数
  • 599浏览人数
  • 最后回答于:2020-10-30 11:10
    请选择关闭问题的原因
    确定 取消
    返回顶部