5
回答
项目中使用druid连接池启动的时候报TODO : IDENTIFIER AGENTCODE错误
华为云数据库免费试用   

@wenshao 你好,想跟你请教个问题:

项目中使用druid连接池启动的时候报TODO : IDENTIFIER AGENTCODE错误,具体错误日志如下:
 com.alibaba.druid.sql.parser.ParserException: TODO : IDENTIFIER AGENTCODE
    at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseAlterTable(OracleStatementParser.java:869)
    at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parserAlter(OracleStatementParser.java:668)
    at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:200)

举报
苏珊大妈
发帖于5年前 5回/1K+阅
共有5个答案 最后回答: 5年前
<2013-9-4 下午01时27分40秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<2013-9-4 下午01时27分40秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<2013-9-4 下午01时27分40秒 CST> <Warning> <HTTP> <BEA-101339> <The context parameter: weblogic.httpd.inputCharset./* has been deprecated. Instead use the element: charset-params in weblogic.xml.>
2013-09-04 13:27:59,444 ERROR [com.alibaba.druid.filter.stat.StatFilter] - merge sql error, dbType oracle, sql :
alter table GPS_CONTRBSE add AGENTCODE varchar2(100)
 com.alibaba.druid.sql.parser.ParserException: TODO : IDENTIFIER AGENTCODE
        at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseAlterTable(OracleStatementParser.java:869)
        at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parserAlter(OracleStatementParser.java:668)
        at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:200)
        at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:142)
        at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:76)

我和楼主的错误类似,我是由a表空间换到b表空间,表结构相同,然后报错,

alter table SYS_USERS_USERGROUPS 
        add constraint FKEFA61B682527F232 
        foreign key (USERID) 
        references SYS_USERGROUP_
com.alibaba.druid.sql.parser.ParserException: TODO : FOREIGN foreign
at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseConstaint(OracleStatementParser.java:991)
at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseAlterTable(OracleStatementParser.java:867)

没有出错sql,代码是:

@SuppressWarnings("unchecked")
@Override
public T get(Class<T> c, Serializable id) {
return (T) this.getCurrentSession().get(c, id);
}

喔,对了,补充一下,将hibernate.hbm2ddl.auto=update改为validate就不报错了。


不过确实不影响运行,我要的值打印出来了,可是毕竟是报错,不乐意看!

2014-01-16 09:27:16,224 ERROR [com.alibaba.druid.filter.stat.StatFilter] - merge sql error, dbType oracle, sql : 
alter table GPS_CONTRBSE add AGENTCODE varchar2(100)
 com.alibaba.druid.sql.parser.ParserException: TODO : IDENTIFIER AGENTCODE
	at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseAlterTable(OracleStatementParser.java:869)
	at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parserAlter(OracleStatementParser.java:668)
	at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:200)
	at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:142)
	at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:76)
	at com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils.parameterize(ParameterizedOutputVisitorUtils.java:42)
	at com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:145)
	at com.alibaba.druid.filter.stat.StatFilter.createSqlStat(StatFilter.java:629)
	at com.alibaba.druid.filter.stat.StatFilter.internalBeforeStatementExecute(StatFilter.java:397)
	at com.alibaba.druid.filter.stat.StatFilter.statementExecuteUpdateBefore(StatFilter.java:325)
	at com.alibaba.druid.filter.FilterEventAdapter.statement_executeUpdate(FilterEventAdapter.java:324)
	at com.alibaba.druid.filter.FilterChainImpl.statement_executeUpdate(FilterChainImpl.java:2373)
	at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeUpdate(StatementProxyImpl.java:225)
	at com.alibaba.druid.pool.DruidPooledStatement.executeUpdate(DruidPooledStatement.java:169)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)



引用来自“wenshao”的答案

这个错误不影响运行,是否能够提供出错的sql给我?
没有SQL的。。见上的上一楼回复
顶部