Logback DBAppender url
我正在尝试使用 Logback 的 DBAppender。我的 logback.xml 有以下附加程序:
</appender>
<appender name="DatabaseAppender" class="ch.qos.logback.classic.db.DBAppender">
<connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
<driverClass>oracle.jdbc.OracleDriver</driverClass>
<url>jdbc:oracle:thin:@HOST_URL:PORT:SERVICE_NAME</url>
<user>USER</user>
<password>PASS</password>
</connectionSource>
</appender>
给定的 url 可以与同一项目中的其他 java 类一起使用,但它失败,logback 给出以下错误,
ORA-00904: "ARG3": invalid identifier
at java.sql.SQLException: ORA-00904: "ARG3": invalid identifier
其中 ARG3 是
I'm trying to use Logback's DBAppender. My logback.xml has the following appender:
</appender>
<appender name="DatabaseAppender" class="ch.qos.logback.classic.db.DBAppender">
<connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
<driverClass>oracle.jdbc.OracleDriver</driverClass>
<url>jdbc:oracle:thin:@HOST_URL:PORT:SERVICE_NAME</url>
<user>USER</user>
<password>PASS</password>
</connectionSource>
</appender>
the url given works with other java classes in the same project but it fails with logback giving the following error
ORA-00904: "ARG3": invalid identifier
at java.sql.SQLException: ORA-00904: "ARG3": invalid identifier
where ARG3 is the <url>jdbc:oracle:thin:@HOST_URL:PORT:SERVICEID</url>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我对导致此错误的 Oracle 语句感兴趣。
我的猜测是它正在尝试 INSERT INTO table (arg1, arg2, arg3) 值 (...);
当表不包含该列时。
如果您不知道该表是什么,请检查此处有关在以下情况下强制进行错误转储的信息:遇到 904 错误。
然后
,当出现错误时,数据库会生成一个跟踪文件,该文件应显示类似于以下内容的问题陈述:
I'd be interested in the Oracle statement resulting in this error.
My guess is that it is trying an INSERT INTO table (arg1, arg2, arg3) values (...);
when the table doesn't contain that column.
If you don't know what the table is then checking here about forcing an error dump when the 904 error is encountered.
I can do a
Then, when the error is raised, the database generates a trace file which should show the problem statement similar to the following :
对于数据源连接:
对于 DRIVERMANAGER 连接:
FOR DATASOURCE CONNECTIONS:
FOR DRIVERMANAGER CONNECTIONS: