Extracted SQL state class ‘07‘ from value ‘07001‘, No value specified for parameter 1

因为升级了shardingjdbc的版本 之前没问题的逆向工程现在插入数据的时候出现了以下的错误,一直报找不到第一个参数,查了很久才发现xml里的字段里面有mysql的关键字source,导致一直报这个错,直接把source加上两个点即可
在这里插入图片描述

Cause: java.sql.SQLException: No value specified for parameter 1
; bad SQL grammar []; nested exception is java.sql.SQLException: No value specified for parameter 1
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
at org.mybatis.spring.SqlSessionTemplate S q l S e s s i o n I n t e r c e p t o r . i n v o k e ( S q l S e s s i o n T e m p l a t e . j a v a : 364 ) a t c o m . s u n . p r o x y . SqlSessionInterceptor.invoke(SqlSessionTemplate.java:364) at com.sun.proxy. SqlSessionInterceptor.invoke(SqlSessionTemplate.java:364)atcom.sun.proxy.Proxy44.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:236)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:52)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy166.insertSelective(Unknown Source)
at
… 29 common frames omitted
Caused by: java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:937)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:872)
at com.mysql.jdbc.PreparedStatement.checkAllParametersSet(PreparedStatement.java:2285)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2265)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2195)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1169)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:493)
at org.apache.shardingsphere.shardingjdbc.executor.SQLExecuteCallbackFactory$2.executeSQL(SQLExecuteCallbackFactory.java:64)
at org.apache.shardingsphere.shardingjdbc.executor.SQLExecuteCallbackFactory 2. e x e c u t e S Q L ( S Q L E x e c u t e C a l l b a c k F a c t o r y . j a v a : 60 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . c o r e . e x e c u t e . s q l . e x e c u t e . S Q L E x e c u t e C a l l b a c k . e x e c u t e 0 ( S Q L E x e c u t e C a l l b a c k . j a v a : 79 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . c o r e . e x e c u t e . s q l . e x e c u t e . S Q L E x e c u t e C a l l b a c k . e x e c u t e ( S Q L E x e c u t e C a l l b a c k . j a v a : 61 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . c o r e . e x e c u t e . e n g i n e . S h a r d i n g E x e c u t e E n g i n e . s y n c G r o u p E x e c u t e ( S h a r d i n g E x e c u t e E n g i n e . j a v a : 125 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . c o r e . e x e c u t e . e n g i n e . S h a r d i n g E x e c u t e E n g i n e . p a r a l l e l E x e c u t e ( S h a r d i n g E x e c u t e E n g i n e . j a v a : 102 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . c o r e . e x e c u t e . e n g i n e . S h a r d i n g E x e c u t e E n g i n e . g r o u p E x e c u t e ( S h a r d i n g E x e c u t e E n g i n e . j a v a : 83 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . c o r e . e x e c u t e . s q l . e x e c u t e . S Q L E x e c u t e T e m p l a t e . e x e c u t e G r o u p ( S Q L E x e c u t e T e m p l a t e . j a v a : 73 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . c o r e . e x e c u t e . s q l . e x e c u t e . S Q L E x e c u t e T e m p l a t e . e x e c u t e G r o u p ( S Q L E x e c u t e T e m p l a t e . j a v a : 56 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . s h a r d i n g j d b c . e x e c u t o r . A b s t r a c t S t a t e m e n t E x e c u t o r . e x e c u t e C a l l b a c k ( A b s t r a c t S t a t e m e n t E x e c u t o r . j a v a : 140 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . s h a r d i n g j d b c . e x e c u t o r . P r e p a r e d S t a t e m e n t E x e c u t o r . e x e c u t e ( P r e p a r e d S t a t e m e n t E x e c u t o r . j a v a : 153 ) a t o r g . a p a c h e . s h a r d i n g s p h e r e . s h a r d i n g j d b c . j d b c . c o r e . s t a t e m e n t . S h a r d i n g P r e p a r e d S t a t e m e n t . e x e c u t e ( S h a r d i n g P r e p a r e d S t a t e m e n t . j a v a : 192 ) a t o r g . a p a c h e . i b a t i s . e x e c u t o r . s t a t e m e n t . P r e p a r e d S t a t e m e n t H a n d l e r . u p d a t e ( P r e p a r e d S t a t e m e n t H a n d l e r . j a v a : 45 ) a t o r g . a p a c h e . i b a t i s . e x e c u t o r . s t a t e m e n t . R o u t i n g S t a t e m e n t H a n d l e r . u p d a t e ( R o u t i n g S t a t e m e n t H a n d l e r . j a v a : 73 ) a t o r g . a p a c h e . i b a t i s . e x e c u t o r . S i m p l e E x e c u t o r . d o U p d a t e ( S i m p l e E x e c u t o r . j a v a : 49 ) a t o r g . a p a c h e . i b a t i s . e x e c u t o r . B a s e E x e c u t o r . u p d a t e ( B a s e E x e c u t o r . j a v a : 115 ) a t o r g . a p a c h e . i b a t i s . e x e c u t o r . C a c h i n g E x e c u t o r . u p d a t e ( C a c h i n g E x e c u t o r . j a v a : 75 ) a t s u n . r e f l e c t . G e n e r a t e d M e t h o d A c c e s s o r 403. i n v o k e ( U n k n o w n S o u r c e ) a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( D e l e g a t i n g M e t h o d A c c e s s o r I m p l . j a v a : 43 ) a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 498 ) a t o r g . a p a c h e . i b a t i s . p l u g i n . P l u g i n . i n v o k e ( P l u g i n . j a v a : 63 ) a t c o m . s u n . p r o x y . 2.executeSQL(SQLExecuteCallbackFactory.java:60) at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute0(SQLExecuteCallback.java:79) at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute(SQLExecuteCallback.java:61) at org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.syncGroupExecute(ShardingExecuteEngine.java:125) at org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.parallelExecute(ShardingExecuteEngine.java:102) at org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.groupExecute(ShardingExecuteEngine.java:83) at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:73) at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:56) at org.apache.shardingsphere.shardingjdbc.executor.AbstractStatementExecutor.executeCallback(AbstractStatementExecutor.java:140) at org.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor.execute(PreparedStatementExecutor.java:153) at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:192) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:45) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:73) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:115) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75) at sun.reflect.GeneratedMethodAccessor403.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) at com.sun.proxy. 2.executeSQL(SQLExecuteCallbackFactory.java:60)atorg.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute0(SQLExecuteCallback.java:79)atorg.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute(SQLExecuteCallback.java:61)atorg.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.syncGroupExecute(ShardingExecuteEngine.java:125)atorg.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.parallelExecute(ShardingExecuteEngine.java:102)atorg.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.groupExecute(ShardingExecuteEngine.java:83)atorg.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:73)atorg.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:56)atorg.apache.shardingsphere.shardingjdbc.executor.AbstractStatementExecutor.executeCallback(AbstractStatementExecutor.java:140)atorg.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor.execute(PreparedStatementExecutor.java:153)atorg.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:192)atorg.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:45)atorg.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:73)atorg.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49)atorg.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:115)atorg.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)atsun.reflect.GeneratedMethodAccessor403.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atjava.lang.reflect.Method.invoke(Method.java:498)atorg.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)atcom.sun.proxy.Proxy247.update(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:170)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:157)
at sun.reflect.GeneratedMethodAccessor405.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:354)
… 35 common frames omitted

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值