ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: Lazy loading -- IllegalArgumentException: argument type mismatch
Date Tue, 02 Oct 2007 09:15:47 GMT
Please post relevant SQLMap and net.bioclipse.structuredb.domain.Library
code. 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.executeQuery
WithCallback(GeneralStatement.java:188)
    at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
ForObject (GeneralStatement.java:104)
    at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlM
apExecutorDelegate.java:566)
    at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlM
apExecutorDelegate.java :541)
    at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSes
sionImpl.java:106)
    at
org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(S
qlMapClientTemplate.java:243)
    at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClient
Template.java:193)
    at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMa
pClientTemplate.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.jav
a: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.invokeJoinp
oint (ReflectiveMethodInvocation.java:177)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:144)
    at
net.bioclipse.structuredb.persistency.dao.FetchIntroductionInterceptor.i
nvoke (FetchIntroductionInterceptor.java:36)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.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(Gene
ricDaoTest.java:122)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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.AbstractAnnotationAwareTransactional
Tests.access$001(AbstractAnnotationAwareTransactionalTests.java:47)
    at
org.springframework.test.annotation.AbstractAnnotationAwareTransactional
Tests$1.run (AbstractAnnotationAwareTransactionalTests.java:115)
    at
org.springframework.test.annotation.AbstractAnnotationAwareTransactional
Tests.runTest(AbstractAnnotationAwareTransactionalTests.java:180)
    at
org.springframework.test.annotation.AbstractAnnotationAwareTransactional
Tests.runTestTimed (AbstractAnnotationAwareTransactionalTests.java:153)
    at
org.springframework.test.annotation.AbstractAnnotationAwareTransactional
Tests.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.jav
a:76)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
(JUnit4TestReference.java:38)
    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja
va:38)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:460)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:673)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.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(Pro
pertyAccessPlan.java:52)
    at
com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanD
ataExchange.java :112)
    at
com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.setResultObjectVa
lues(BasicResultMap.java:373)
    at
com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResu
ltObject(RowHandlerCallback.java :64)
    at
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor
.java:382)
    at
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(Sql
Executor.java:301)
    at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery
(SqlExecutor.java:190)
    at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQu
ery(GeneralStatement.java:205)
    at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
WithCallback (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(DelegatingMethodAccessor
Impl.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 


Mime
View raw message