ピットのMapper.xmlファイルmybitesフレームワークは、任意のコメントを追加しない遭遇しました

オリジナルリンクします。https://blog.csdn.net/streetlight8023/article/details/69388495/

私は解決策についてお話しましょう:

org.mybatis.spring.MyBatisSystemException:ネストされた例外はorg.apache.ibatis.type.TypeExceptionです:マッピング用のパラメータを設定できませんでした:ParameterMapping {プロパティ= 'のclientId'、モードIN =、のJavaType =クラスjava.lang.Objectの、jdbcType = NULL、numericScale =ヌル、resultMapId = 'NULL'、jdbcTypeNameは= 'NULL'、式= 'NULL'}。原因:org.apache.ibatis.type.TypeException:エラーJdbcTypeヌルとパラメータ#2のための非ヌルを設定します。このパラメータまたは別の構成プロパティごとに異なるJdbcTypeを設定してみてください。原因:org.apache.ibatis.type.TypeException:エラーJdbcTypeヌルとパラメータ#2のための非ヌルを設定します。このパラメータまたは別の構成プロパティごとに異なるJdbcTypeを設定してみてください。原因:ます。java.sql.SQLException:範囲外のパラメータインデックス(1パラメータの2>数)。


org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)で
org.mybatis.spring.SqlSessionTemplate $ SqlSessionInterceptor.invokeで(SqlSessionTemplate.java:371)
com.sun.proxy。$ Proxy12.selectListで(不明なソース)
org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)で
org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:122)で
org.apache.ibatis.binding.MapperMethod.executeで( MapperMethod.java:64)
org.apache.ibatis.binding.MapperProxy.invokeで(MapperProxy.java:53)
com.sun.proxy。$ Proxy32.findByClientId(不明なソース)で
com.sinofaith.idaplus.admin.serviceで.impl.ClientInfoServiceImpl.getClientInfoByClientId(ClientInfoServiceImpl.java:54)
ClientInfoTest.test2(ClientInfoTest.java:35)で
sun.reflect.NativeMethodAccessorImpl.invoke0(ネイティブメソッド)で
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)で
sun.reflect.DelegatingMethodAccessorImpl.invokeで(DelegatingMethodAccessorImpl.java :43)
java.lang.reflect.Method.invoke(Method.java:498)で
org.junit.runners.model.FrameworkMethod $ 1.runReflectiveCall(FrameworkMethod.java:47)で
org.junit.internal.runners.modelで.ReflectiveCallable.run(ReflectiveCallable.java:12)
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)で
org.junit.internal.runners.statements.InvokeMethod.evaluateで(InvokeMethod.java:17 )
org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)で
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)で
org.junit.runners.BlockJUnit4ClassRunner.runChildで(BlockJUnit4ClassRunner.java:50 )
org.junit.runners.ParentRunner $ 3.run(ParentRunner.java:238)で
org.junit.runners.ParentRunner $ 1.schedule(ParentRunner.java:63)で
org.junit.runners.ParentRunner.runChildren(ParentRunnerで。 Javaの:236)
org.junit.runners.ParentRunner.access $ 000(ParentRunner.java:53)で
org.junit.runners.ParentRunner $ 2.evaluateで(ParentRunner.java:229)
org.junit.runners.ParentRunner.runで(ParentRunner.java:309)
org.junit.runner.JUnitCore.runで(JUnitCore.java:160)
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)で
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgsで(JUnit4IdeaTestRunner.java:42)
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStartで(JUnitStarter .java:234)
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)で
org.apache.ibatis.type.TypeException:によって引き起こさマッピングのためのパラメータを設定できませんでした:ParameterMapping {プロパティ= 'のclientId'、モード= IN、のJavaType =クラスjava.lang.Objectの、jdbcType =ヌル、numericScale =ヌル、resultMapId = 'NULL'、jdbcTypeNameは= 'NULL'、式= 'NULL'}。原因:org.apache.ibatis.type.TypeException:エラーJdbcTypeヌルとパラメータ#2のための非ヌルを設定します。このパラメータまたは別の構成プロパティごとに異なるJdbcTypeを設定してみてください。原因:org.apache.ibatis.type.TypeException:エラーJdbcTypeヌルとパラメータ#2のための非ヌルを設定します。このパラメータまたは別の構成プロパティごとに異なるJdbcTypeを設定してみてください。原因:ます。java.sql.SQLException:範囲外のパラメータインデックス(1パラメータの2>数)。
org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:89)で
org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize(PreparedStatementHandler.java:85)で
org.apache.ibatis.executorで.statement.RoutingStatementHandler.parameterize(RoutingStatementHandler.java:63)
org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:77)で
org.apache.ibatis.executor.SimpleExecutor.doQueryで(SimpleExecutor.java:61 )
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:303)で
org.apache.ibatis.executor.BaseExecutor.queryで(BaseExecutor.java:154)
org.apache.ibatis.executor.CachingExecutorました。クエリ(CachingExecutor.java:102)
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:82)で
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120)で
org.apache.ibatis.session.defaultsで.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
sun.reflect.NativeMethodAccessorImpl.invoke0(ネイティブメソッド)で
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)で
sun.reflect.DelegatingMethodAccessorImpl.invokeで(DelegatingMethodAccessorImpl.java :43)
java.lang.reflect.Method.invoke(Method.java:498)で
org.mybatis.spring.SqlSessionTemplate $ SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)で
... 30以上
org.apache.ibatis.type.TypeException:による誤差JdbcTypeヌルとパラメータ#2のための非ヌルを設定します。このパラメータまたは別の構成プロパティごとに異なるJdbcTypeを設定してみてください。原因:org.apache.ibatis.type.TypeException:エラーJdbcTypeヌルとパラメータ#2のための非ヌルを設定します。このパラメータまたは別の構成プロパティごとに異なるJdbcTypeを設定してみてください。原因:ます。java.sql.SQLException:範囲外のパラメータインデックス(1パラメータの2>数)。
org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:55)で
org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:87)で
45もっと...
org.apache.ibatis.type.TypeException:による誤差JdbcTypeヌルとパラメータ#2のための非ヌルを設定します。このパラメータまたは別の構成プロパティごとに異なるJdbcTypeを設定してみてください。原因:ます。java.sql.SQLException:範囲外のパラメータインデックス(1パラメータの2>数)。
org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:55)で
org.apache.ibatis.type.UnknownTypeHandler.setNonNullParameter(UnknownTypeHandler.java:45)で
org.apache.ibatis.type.BaseTypeHandler.setParameterで(BaseTypeHandler.java:53)
... 46より
ます。java.sql.SQLException:(1 2>パラメータの数)範囲外パラメータインデックスによって引き起こさ。
com.mysql.jdbc.SQLError.createSQLExceptionで(SQLError.java:1086)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)で
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)で
com.mysql.jdbc.SQLError.createSQLExceptionで(SQLError.java:920 )
com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3796)で
com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3778)で
com.mysql.jdbc.PreparedStatement.setStringで(PreparedStatement.java: 4599)
com.alibaba.druid.filter.FilterChainImpl.preparedStatement_setString(FilterChainImpl.java:2823)で
com.alibaba.druid.filter.FilterAdapter.preparedStatement_setStringで(FilterAdapter.java:1341)
com.alibaba.druid.filter.FilterChainImplで.preparedStatement_setString(FilterChainImpl.java:2820)
com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.setString(PreparedStatementProxyImpl.java:547)で
com.alibaba.druid.pool.DruidPooledPreparedStatement.setString(DruidPooledPreparedStatement.java:365)で
sun.reflect.NativeMethodAccessorImpl.invoke0(ネイティブで方法)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)で
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)で
java.lang.reflect.Method.invoke(Method.java:498で)
でorg.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:67)
com.sun.proxy。$ Proxy88.setString(不明なソース)で
org.apache.ibatis.type.StringTypeHandler.setNonNullParameterで(StringTypeHandler。 Javaの:31)
org.apache.ibatis.type.StringTypeHandler.setNonNullParameter(StringTypeHandler.java:26)で
org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:53)で
... 48以上

 

このエラーはまれであり、2時間の調査は、何が悪かったのか分かりません

これは間違ってsql.xmlです

<ID = "findByClientId"このresultMap = "BaseResultMap" SELECT>
SELECT <=ザはREFIDを含む"Base_Column_List" />
FROM CLIENT_INFO
CLIENT_IDのclientId} = {#
/#* = {WHERE CLIENT_IDのclientId} * /
</ SELECT>を
一見問題ありません。その後、一部が与えられていないノートを削除してみてください。

ピットの父のXML

おすすめ

転載: www.cnblogs.com/qcq0703/p/10978594.html