ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Alvarsson" <jonathan.alvars...@gmail.com>
Subject Re: Lazy loading -- IllegalArgumentException: argument type mismatch
Date Tue, 02 Oct 2007 10:20:38 GMT
I will interpret this as "You don't need interfaces for the proxying in lazy
loading to work" and send some more info. Attached are a lot of files... :)

On 10/2/07, Niels Beekman <n.beekman@wis.nl> wrote:
>
>  Please post relevant SQLMap and net.bioclipse.structuredb.domain.Librarycode. It's difficult
to see what's going on without them.
>
>
>
> Niels
>  ------------------------------
>
> *From:* Jonathan Alvarsson [mailto:jonathan.alvarsson@gmail.com]
> *Sent:* dinsdag 2 oktober 2007 11:02
> *To:* user-java@ibatis.apache.org
> *Subject:* Lazy loading -- IllegalArgumentException: argument type
> mismatch
>
>
>
> I have tried to activate the lazy loading in iBatis. From working
> perfectly without lazy loading I turn into lot's of exceptions like this
> one:
>
> org.springframework.jdbc.UncategorizedSQLException: SqlMapClient
> operation; uncategorized SQLException for SQL []; SQL state [null]; error
> code [0];
> --- The error occurred in sqlMap.xml.
> --- The error occurred while applying a result map.
> --- Check the Library.
> --- The error happened while setting a property on the result object.
> --- Cause: java.lang.RuntimeException: Error setting property
> 'setStructures' of 'net.bioclipse.structuredb.domain.Library@8f4bee9a '.
> Cause: java.lang.IllegalArgumentException: argument type mismatch; nested
> exception is com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in sqlMap.xml.
> --- The error occurred while applying a result map.
> --- Check the Library.
> --- The error happened while setting a property on the result object.
> --- Cause: java.lang.RuntimeException: Error setting property
> 'setStructures' of 'net.bioclipse.structuredb.domain.Library@8f4bee9a '.
> Cause: java.lang.IllegalArgumentException: argument type mismatch
> Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in sqlMap.xml.
> --- The error occurred while applying a result map.
> --- Check the Library.
> --- The error happened while setting a property on the result object.
> --- Cause: java.lang.RuntimeException: Error setting property
> 'setStructures' of 'net.bioclipse.structuredb.domain.Library@8f4bee9a '.
> Cause: java.lang.IllegalArgumentException: argument type mismatch
>     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback
> (GeneralStatement.java:188)
>     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(
> GeneralStatement.java:104)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java:566)
>     at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject
> (SqlMapExecutorDelegate.java :541)
>     at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(
> SqlMapSessionImpl.java:106)
>     at
> org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(
> SqlMapClientTemplate.java:243)
>     at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(
> SqlMapClientTemplate.java:193)
>     at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(
> SqlMapClientTemplate.java:241)
>     at net.bioclipse.structuredb.persistency.dao.GenericDao.getById (
> GenericDao.java:55)
>     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
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(
> AopUtils.java:296)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
> ReflectiveMethodInvocation.java:177)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:144)
>     at
> net.bioclipse.structuredb.persistency.dao.FetchIntroductionInterceptor.invoke(
> FetchIntroductionInterceptor.java:36)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:166)
>     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke (
> JdkDynamicAopProxy.java:204)
>     at $Proxy6.getById(Unknown Source)
>     at net.bioclipse.structuredb.persistency.dao.GenericDaoTest.testUpdate
> (GenericDaoTest.java:122)
>     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:168)
>     at junit.framework.TestCase.runBare(TestCase.java:134)
>     at org.springframework.test.ConditionalTestCase.runBare(
> ConditionalTestCase.java :69)
>     at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001
> (AbstractAnnotationAwareTransactionalTests.java:47)
>     at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1.run(
> AbstractAnnotationAwareTransactionalTests.java:115)
>     at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTest
> (AbstractAnnotationAwareTransactionalTests.java:180)
>     at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTestTimed(
> AbstractAnnotationAwareTransactionalTests.java:153)
>     at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runBare
> (AbstractAnnotationAwareTransactionalTests.java:111)
>     at junit.framework.TestResult$1.protect (TestResult.java:110)
>     at junit.framework.TestResult.runProtected(TestResult.java:128)
>     at junit.framework.TestResult.run(TestResult.java:113)
>     at junit.framework.TestCase.run(TestCase.java:124)
>     at junit.framework.TestSuite.runTest(TestSuite.java:232)
>     at junit.framework.TestSuite.run(TestSuite.java:227)
>     at org.junit.internal.runners.OldTestClassRunner.run(
> OldTestClassRunner.java:76)
>     at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (
> JUnit4TestReference.java:38)
>     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)
> Caused by: java.lang.RuntimeException: Error setting property
> 'setStructures' of 'net.bioclipse.structuredb.domain.Library@8f4bee9a'.
> Cause: java.lang.IllegalArgumentException : argument type mismatch
>     at
> com.ibatis.sqlmap.engine.accessplan.PropertyAccessPlan.setProperties(
> PropertyAccessPlan.java:52)
>     at com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(
> JavaBeanDataExchange.java :112)
>     at
> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.setResultObjectValues
> (BasicResultMap.java:373)
>     at
> com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResultObject
> (RowHandlerCallback.java :64)
>     at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(
> SqlExecutor.java:382)
>     at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(
> SqlExecutor.java:301)
>     at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery (
> SqlExecutor.java:190)
>     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery
> (GeneralStatement.java:205)
>     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(
> GeneralStatement.java:173)
>     ... 45 more
> Caused by: java.lang.IllegalArgumentException: argument type mismatch
>     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
> com.ibatis.sqlmap.engine.accessplan.PropertyAccessPlan.setProperties (
> PropertyAccessPlan.java:46)
>     ... 53 more
>
> What am I doing wrong? Do I need interfaces for my domain objects? I
> didn't need it when using Hibernate so I thought that maybe... Or what?
>
> --
> // Jonathan
>



-- 
// Jonathan

Mime
View raw message