Skip to content

oracle数据库插入数据报 "ID": 标识符无效 异常 #4241

Open
@goetboy

Description

@goetboy

oracle项目引入seata,但由于表名比较特殊 所有的字段都是用""括起来的,引入seata后发现所有的insert语句都不能正常执行,报下面的错误,复制打印的语句到数据库也能正常执行,请问这是为什么?

### Cause: java.sql.SQLSyntaxErrorException: ORA-00904: "ID": 标识符无效

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00904: "ID": 标识符无效
]

org.springframework.jdbc.BadSqlGrammarException: 
### Error updating database.  Cause: java.sql.SQLSyntaxErrorException: ORA-00904: "ID": 标识符无效

### The error may exist in cn/ztjz/module/bankStore/mapper/FiBillReceiptengiinvoMapper.java (best guess)
### The error may involve cn.ztjz.module.bankStore.mapper.FiBillReceiptengiinvoMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO ZTZS_ERP2."FI_Bill_ReceiptEngiInvo"  ( "Id", "ReceiptId",  "Number", "Code", "Amount", "AmountNoTax", "InvoDate",  "CreateUser", "CreateTime", "UpdateUser", "UpdateTime" )  VALUES  ( ?, ?,  ?, ?, ?, ?, ?,  ?, ?, ?, ? )
### Cause: java.sql.SQLSyntaxErrorException: ORA-00904: "ID": 标识符无效

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00904: "ID": 标识符无效

	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:235) ~[spring-jdbc-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:88) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at com.sun.proxy.$Proxy131.insert(Unknown Source) ~[na:na]
	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:60) ~[mybatis-plus-core-3.4.2.jar:3.4.2]
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148) ~[mybatis-plus-core-3.4.2.jar:3.4.2]
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) ~[mybatis-plus-core-3.4.2.ja

Ⅵ. Environment:

  • JDK version : 1.8
  • Seata version: 1.4.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions