崖山数据库报错--YAS-00004

349 阅读1分钟

项目启动时候需要自动查询数据,报了一下错误: 错误信息:

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.yashandb.jdbc.exception.YasException: [line: 0 column: 0] YAS-00004 feature "parseQueryImplictTable" is not implemented yet

Caused by: com.yashandb.jdbc.exception.YasException: [line: 0 column: 0] YAS-00004 feature "parseQueryImplictTable" is not implemented yet

问题原因 HikariDataSource的connection-test-query语句 书写不规范

解决办法: HikariDataSource的connection-test-query

原来的写法

connection-test-query: select 1

修改为

connection-test-query: select 1 from dual

以下为全部的配置,以供参考

datasource:
    type: com.zaxxer.hikari.HikariDataSource
    hikari:
      minimum-idle: 5
      maximum-pool-size: 100
      auto-commit: true
      idle-timeout: 600000
      pool-name: HikariCP
      max-lifetime: 600000
      connection-timeout: 60000
      connection-test-query: select 1 from dual
    url: jdbc:yasdb://0.0.0.0:1688/TEST
    username: TEST
    password: test
    driver-class-name: com.yashandb.jdbc.Driver

如果还是不行,可以使用sys用户连接数据库 执行alter system set AUDIT_SYS_OPERATIONS=TRUE scope=memory;再次尝试