Java如何快速定位无效字符,mybatis的报错…ORA-00911: 无效字符,该怎么解决

mybatis的报错……ORA-00911: 无效字符

xml里的配置

resultType="java.lang.String">

select t.sfzh from t_ldrk t

and t.djrq > (sysdate - #{condition.differDay})

and t.djrq

sysdate;

运行报错:

org.springframework.jdbc.BadSqlGrammarException:

### Error querying database.  Cause: java.sql.SQLException: ORA-00911: 无效字符

### The error may involve com.tzyt.people.dao.PeopleMapper.findLocalPeopleSfzh-Inline

### The error occurred while setting parameters

### Cause: java.sql.SQLException: ORA-00911: 无效字符

; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-00911: 无效字符

at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:98)

at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)

at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)

at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)

at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)

at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:346)

at $Proxy9.selectList(Unknown Source)

at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:189)

at org.apache.ibatis.binding.MapperMethod.executeForList(MapperMethod.java:100)

at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:70)

at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:38)

at $Proxy25.findLocalPeopleSfzh(Unknown Source)

at com.tzyt.people.service.impl.PeopleServiceImpl.findLocalPeopleSfzh(PeopleServiceImpl.java:1036)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

at $Proxy41.findLocalPeopleSfzh(Unknown Source)

at com.tzyt.people.junit.PeopleTest.testGetAdminPopedomDetail(PeopleTest.java:42)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值