this.parameter = bindParam;
}
------------------------------------------------------------------------------------------
●SQL
------------------------------------------------------------------------------------------
select * from hoge where id = #parameter[0]#
●エラー内容
------------------------------------------------------------------------------------------
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
--- The error occurred in definition/Hoge_sqlMap.xml.
--- The error occurred while preparing the mapped statement for execution.
--- Check the marginCallJudgment.selectHoge.
--- Check the parameter map.
--- Cause: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'parameter' in class '[Ljava.lang.String;'; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in definition/Hoge_sqlMap.xml.
--- The error occurred while preparing the mapped statement for execution.
--- Check the marginCallJudgment.selectHoge.
--- Check the parameter map.
--- Cause: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'parameter' in class '[Ljava.lang.String;'
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in definition/Hoge_sqlMap.xml.
--- The error occurred while preparing the mapped statement for execution.
--- Check the marginCallJudgment.selectHoge.
--- Check the parameter map.
--- Cause: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'parameter' in class '[Ljava.lang.String;'
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:615)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:589)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:268)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:193)
at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:219)
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:266)
at jp.terasoluna.fw.dao.ibatis.QueryDAOiBatisImpl.executeForObjectArray(QueryDAOiBatisImpl.java:267)
at logic.returns.Hoge.HogenReturnTest.testHogen01(HogenReturnTest.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jp.co.dgic.eclipse.jdt.internal.junit.runner.DJUnitRunner.main(DJUnitRunner.java:49)
Caused by: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'parameter' in class '[Ljava.lang.String;'
at com.ibatis.common.beans.ClassInfo.getGetter(ClassInfo.java:259)
at com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:304)
at com.ibatis.common.beans.BaseProbe.getIndexedProperty(BaseProbe.java:56)
at com.ibatis.common.beans.GenericProbe.getObject(GenericProbe.java:56)
at com.ibatis.sqlmap.engine.exchange.ComplexDataExchange.getData(ComplexDataExchange.java:65)
at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.getParameterObjectValues(BasicParameterMap.java:132)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:165)
... 34 more
RE: 【バッチFW】SQL初期データ取得時の単体テストでのバインド方法 (2009-11-24 10:42 by taromaru #47136)
> There is no READABLE property named 'parameter' in
> class '[Ljava.lang.String;'
パラメータとして渡されたオブジェクト(String配列)から、
「parameter」というプロパティを取ろうとしたが、
プロパティ「parameter」が定義されていなかった
というメッセージです。