我正在Rundeck POC上从Jenkins迁移工作。但是,当我使用oracle作为rundeck的后端时,出现以下异常:
Rundeck版本:Rundeck 3.1.2-20190927
方言的dataSource.dialect = org.rundeck.hibernate.RundeckOracleDialect
原因:java.sql.SQLSyntaxErrorException:ORA-00904:“ TRUE”:无效的标识符
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:30)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:931)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1150)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1792)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1745)
at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:334)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
答案 0 :(得分:0)
从Rundeck 3开始,Oracle方言就已可用,只需配置数据库和Rundeck即可使用它。例如,rundeck-config.properties中的以下配置无需添加任何特殊内容即可工作(仅/ var / lib / rundeck / lib目录中的oracle JDBC)
dataSource.url = jdbc:oracle:thin:@192.168.33.30:1521:xe
dataSource.driverClassName = oracle.jdbc.driver.OracleDriver
dataSource.username = rundeckuser
dataSource.password = rundeckpass
dataSource.dialect = org.rundeck.hibernate.RundeckOracleDialect
dataSource.properties.validationQuery = SELECT 1 FROM DUAL
看看这个:
https://docs.rundeck.com/docs/administration/configuration/database/oracle.html