Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 41525 invoked from network); 11 Sep 2007 16:18:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2007 16:18:43 -0000 Received: (qmail 81450 invoked by uid 500); 11 Sep 2007 16:18:33 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 81439 invoked by uid 500); 11 Sep 2007 16:18:33 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 81428 invoked by uid 99); 11 Sep 2007 16:18:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2007 09:18:33 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.247.21.92] (HELO mail.local.wis.nl) (83.247.21.92) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 11 Sep 2007 16:18:30 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7F48F.45258B1C" X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: RE: How to map a list of double? Date: Tue, 11 Sep 2007 18:17:37 +0200 Message-ID: <50CA25BD6EEA954FA592C097399942E319376116@CM1.wis.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to map a list of double? Thread-Index: Acf0iBDKXyFLOgavQni+7cRXGA59/gABrfXw From: "Niels Beekman" To: X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C7F48F.45258B1C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable My first guess was right, iBATIS tries to cast primitive arrays to Object arrays, this is not allowed. Following is a patch that fixes this, I don't know if this is the best way to fix it. You could apply this patch and build iBATIS yourself, in any case, please raise a JIRA issue @ http://issues.apache.org/jira/browse/IBATIS. =20 ResultLoader.java: =20 private static Object listToArray(List list, Class type) { Object array =3D java.lang.reflect.Array.newInstance(type, = list.size()); if (type.isPrimitive()) { Iterator iter =3D list.iterator(); int index =3D 0; while (iter.hasNext()) { Array.set(array, index++, iter.next()); } } else { array =3D list.toArray((Object[]) array); } return array; } =20 Niels =20 ________________________________ From: Jonathan Alvarsson [mailto:jonathan.alvarsson@gmail.com]=20 Sent: dinsdag 11 september 2007 17:26 To: user-java@ibatis.apache.org Subject: Re: How to map a list of double? =20 On 9/11/07, Niels Beekman wrote: I don't understand how iBATIS thinks you're trying to map to an array, do you have overloads for the values-property? Try setting some debug breakpoints in ResultLoader and find out what's going on. It definitely should be possible to map to a List or array. Yes I had that. Removed all such things now bu still can't get this to work. Here follows the code from my latest attempt using an array: (and at the end a stack trace) This time I tried to send as much as possible because it must be possible to get this to work, otherwise I might as well give up iBatis...=20 =20 =20 {CALL insertMoleculeDescriptor(#id#, #name#)}=20 =20 =20 =20 =20 public abstract class AbstractDescriptor extends PCMBaseObject { private double[] values; private DescriptorType descriptorType;=20 private DescriptorDatasetRow descriptorDataSetRow; public AbstractDescriptor() { super(); values =3D new double[] {0, 0.1}; } public AbstractDescriptor( String name, DescriptorType descriptorType, double[] values ) { super(name); setValues(values); this.descriptorType =3D descriptorType; } public AbstractDescriptor( AbstractDescriptor ad ) { super(ad); values =3D ad.values; descriptorType =3D ad.getDescriptorType (); } public double[] getValues() {=20 return values; } public void setValues(double[] values) { this.values =3D values; } public boolean hasValuesEqualTo( PCMBaseObject object ) { =20 if( !super.hasValuesEqualTo(object) ) { return false;=20 } if( !(object instanceof AbstractDescriptor) ) {=20 return false; } if( this.values.length !=3D ( (AbstractDescriptor)object ).getValues().length ) { return false; } AbstractDescriptor other =3D (AbstractDescriptor)object; for( int i =3D 0; i < values.length; i++ ) { if( values.length !=3D other.getValues()[i] ) { return false; } } if( !descriptorType.hasValuesEqualTo( other.getDescriptorType () ) ) { return false; } return true; } public DescriptorType getDescriptorType() { return descriptorType; } public void setDescriptorType(DescriptorType descriptorType) { this.descriptorType =3D descriptorType;=20 } public DescriptorDatasetRow getDescriptorDataSetRow() {=20 return descriptorDataSetRow; } public void setDescriptorDataSetRow(DescriptorDatasetRow descriptorDataSetRow) { this.descriptorDataSetRow =3D descriptorDataSetRow; if( !descriptorDataSetRow.getDescriptors().contains(this) ) {=20 descriptorDataSetRow.addDescriptor(this); } } } public class MoleculeDescriptor extends AbstractDescriptor {=20 private PCMMolecule molecule; =20 public MoleculeDescriptor() { super(); } public MoleculeDescriptor( String name, double[] values, PCMMolecule molecule, DescriptorType descriptorType ) { super(name, descriptorType, values); this.molecule =3D molecule; if( !molecule.getMoleculeDescriptors().contains(this) ) { molecule.addMoleculeDescriptor(this); } } public MoleculeDescriptor( MoleculeDescriptor md ) {=20 super( md ); } public boolean hasValuesEqualTo( PCMBaseObject object ) {=20 =20 if( !super.hasValuesEqualTo(object) ) {=20 return false; } if( !(object instanceof MoleculeDescriptor) ) { return false; } return true; } public PCMMolecule getMolecule() { return molecule;=20 } public void setMolecule(PCMMolecule molecule) {=20 this.molecule =3D molecule; } } org.springframework.jdbc.UncategorizedSQLException : SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; =20 --- The error occurred in mapping/MoleculeDescriptor.xml. =20 --- The error occurred while applying a result map. =20 --- Check the MoleculeDescriptor. =20 --- Check the result mapping for the 'values' property. =20 --- Cause: java.lang.ClassCastException: [D; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: =20 --- The error occurred in mapping/MoleculeDescriptor.xml. =20 --- The error occurred while applying a result map. =20 --- Check the MoleculeDescriptor. =20 --- Check the result mapping for the 'values' property. =20 --- Cause: java.lang.ClassCastException: [D Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: =20 --- The error occurred in mapping/MoleculeDescriptor.xml. =20 --- The error occurred while applying a result map. =20 --- Check the MoleculeDescriptor. =20 --- Check the result mapping for the 'values' property. =20 --- Cause: java.lang.ClassCastException: [D at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery WithCallback(GeneralStatement.java:188) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery ForList(GeneralStatement.java:123) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap ExecutorDelegate.java:615) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList (SqlMapExecutorDelegate.java:589) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessi onImpl.java :118) at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(S qlMapClientTemplate.java:268)=20 at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClient Template.java:193) at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResul t(SqlMapClientTemplate.java:219) at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapC lientTemplate.java:266) at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList (SqlMapClientTemplate.java:260) at net.bioclipse.pcm.dao.GenericDao.getAll(GenericDao.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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.pcm.dao.FetchIntroductionInterceptor.invoke(FetchIntroduct ionInterceptor.java:22) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAo pProxy.java :204) at $Proxy0.getAll(Unknown Source) at net.bioclipse.pcm.dao.GenericDaoTest.testGetAll(GenericDaoTest.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:168)=20 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)=20 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.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run (JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja va:38)=20 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.ClassCastException: [D at com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.listToArray( ResultLoader.java:85) at com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(Re sultLoader.java:75) at com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult (ResultLoader.java:59) at com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getNestedSelectMa ppingValue(BasicResultMap.java :502) at com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(BasicR esultMap.java:340) at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor .java:381) 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) ... 46 more --=20 // Jonathan=20 ------_=_NextPart_001_01C7F48F.45258B1C Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

My first guess was right, iBATIS = tries to cast primitive arrays to Object arrays, this is not allowed. Following = is a patch that fixes this, I don’t know if this is the best way to fix = it. You could apply this patch and build iBATIS yourself, in any case, please = raise a JIRA issue @ http://issues.apache= .org/jira/browse/IBATIS.

 

ResultLoader.java:=

 

private static Object = listToArray(List list, Class type) {

  Object array =3D java.lang.reflect.Array.newInstance(type, = list.size());

  if (type.isPrimitive()) = {

    Iterator iter = =3D list.iterator();

    int index =3D = 0;

    while = (iter.hasNext()) {

      = Array.set(array, index++, iter.next());

    = }

  } else = {

    array =3D = list.toArray((Object[]) array);

  = }

  return = array;

}

 

Niels

 


From: = Jonathan Alvarsson [mailto:jonathan.alvarsson@gmail.com]
Sent: dinsdag 11 = september 2007 17:26
To: user-java@ibatis.apache.org
Subject: Re: How to map a = list of double?

 

On 9/11/07, Niels Beekman <n.beekman@wis.nl> wrote:

I don't understand how iBATIS thinks you're trying to = map to an array, do you have overloads for the values-property? Try setting = some debug breakpoints in ResultLoader and find out what's going on. It definitely = should be possible to map to a List or array.

Yes I had that. Removed all such things now bu still can't get = this to work.
Here follows the code from my latest attempt using an array: (and at the = end a stack trace) This time I tried to send as much as possible because it = must be possible to get this to work, otherwise I might as well give up = iBatis...


<?xml version=3D"1.0" encoding=3D"UTF-8" = standalone=3D"no"?>
<!DOCTYPE sqlMap PUBLIC "-//iBatis.com//iBatis.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dt= d/sql-map-2.dtd">
<sqlMap>

    <resultMap class=3D"MoleculeDescriptor" id=3D"MoleculeDescriptor">
        <result property=3D"id"     column=3D"id"   />
        <result property=3D"name"   column=3D"name" = />
        <result = property=3D"values" column=3D"id" = select=3D"MoleculeDescriptor.getValueList" />
    </resultMap>
   
    <procedure = id=3D"MoleculeDescriptor.insert" parameterClass=3D"MoleculeDescriptor">
        {CALL = insertMoleculeDescriptor(#id#, #name#)}
    </procedure>
   
    <select = id=3D"MoleculeDescriptor.getValueList" resultClass=3D"double" parameterClass=3D"String"> =
        SELECT
            value AS = value
        FROM
            = DescriptorValue
        WHERE
            abstractDescriptor=3D#value#
        ORDER BY
            arrayPos
    </select>
   
    <select id=3D"MoleculeDescriptor.getAll" resultMap=3D"MoleculeDescriptor">
        SELECT
            p.id   AS id,
            p.name AS name
        FROM
            = AbstractDescriptor a INNER JOIN PCMBaseObject p ON (a.pcmBaseObject =3D p.id)
                        &= nbsp;        INNER JOIN MoleculeDescriptor m ON (a.id =3D = m.id)
    </select>
   
    <select = id=3D"MoleculeDescriptor.getById" resultMap=3D"MoleculeDescriptor" = parameterClass=3D"String">
        SELECT
            p.id   AS id,
            p.name AS name
        FROM
            = AbstractDescriptor a INNER JOIN PCMBaseObject p ON ( a.pcmBaseObject =3D p.id)
                        &= nbsp;        INNER JOIN MoleculeDescriptor m ON ( a.id = =3D m.id)
        WHERE
            p.id =3D #value#
    </select>

</sqlMap>

public abstract class AbstractDescriptor extends PCMBaseObject {

    private double[] values;
    private DescriptorType descriptorType;
    private DescriptorDatasetRow = descriptorDataSetRow;

    public AbstractDescriptor() {
        super();
        values =3D new double[] {0, = 0.1};
    }
    public AbstractDescriptor( String name, = DescriptorType descriptorType, double[] values ) {
        super(name);
        setValues(values);
        this.descriptorType =3D = descriptorType;
    }
    public AbstractDescriptor( AbstractDescriptor ad ) = {
        super(ad);
        values =3D ad.values;
        descriptorType =3D = ad.getDescriptorType ();
    }
    public double[] getValues() {
        return values;
    }
    public void setValues(double[] values) {
        this.values =3D values;
    }
    public boolean hasValuesEqualTo( PCMBaseObject object = ) {
       
        if( = !super.hasValuesEqualTo(object) ) {
            return false; =
        }
        if( !(object instanceof AbstractDescriptor) ) {
            return = false;
        }
        if( this.values.length !=3D ( (AbstractDescriptor)object ).getValues().length ) {
            return = false;
        }
        AbstractDescriptor other =3D (AbstractDescriptor)object;
        for( int i =3D 0; i < = values.length; i++ ) {
            if( = values.length !=3D other.getValues()[i] ) {
            =     return false;
            }
        }
        if( = !descriptorType.hasValuesEqualTo( other.getDescriptorType () ) ) {
            return = false;
        }
        return true;
    }
    public DescriptorType getDescriptorType() {
        return descriptorType;
    }
    public void setDescriptorType(DescriptorType = descriptorType) {
        this.descriptorType =3D = descriptorType;

    }
    public DescriptorDatasetRow getDescriptorDataSetRow() = {
        return descriptorDataSetRow;
    }
    public void = setDescriptorDataSetRow(DescriptorDatasetRow descriptorDataSetRow) {
        this.descriptorDataSetRow =3D descriptorDataSetRow;
        if( !descriptorDataSetRow.getDescriptors().contains(this) ) {
            = descriptorDataSetRow.addDescriptor(this);
        }
    }
}

public class MoleculeDescriptor extends AbstractDescriptor = {


    private PCMMolecule molecule;
   
    public MoleculeDescriptor() {
        super();
    }
    public MoleculeDescriptor( String name, double[] = values, PCMMolecule molecule, DescriptorType descriptorType ) {
        super(name, descriptorType,  values);
        this.molecule =3D molecule;
        if( !molecule.getMoleculeDescriptors().contains(this) ) {
            molecule.addMoleculeDescriptor(this);
        }
    }
    public MoleculeDescriptor( MoleculeDescriptor md ) = {


        super( md );
    }
    public boolean hasValuesEqualTo( PCMBaseObject object = ) {
       
        if( = !super.hasValuesEqualTo(object) ) {
            return = false;
        }
        if( !(object instanceof MoleculeDescriptor) ) {
            return = false;
        }
        return true;
    }
    public PCMMolecule getMolecule() {
        return molecule;
=
    }
    public void setMolecule(PCMMolecule molecule) {
        this.molecule =3D molecule;
    }
}


org.springframework.jdbc.UncategorizedSQLException : SqlMapClient operation; uncategorized SQLException for SQL []; SQL = state [null]; error code [0];  
--- The error occurred in mapping/MoleculeDescriptor.xml. 
--- The error occurred while applying a result map. 
--- Check the MoleculeDescriptor. 
--- Check the result mapping for the 'values' property. 
--- Cause: java.lang.ClassCastException: [D; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:  
--- The error occurred in mapping/MoleculeDescriptor.xml. 
--- The error occurred while applying a result map. 
--- Check the MoleculeDescriptor. 
--- Check the result mapping for the 'values' property. 
--- Cause: java.lang.ClassCastException: [D
Caused by: = com.ibatis.common.jdbc.exception.NestedSQLException:  
--- The error occurred in mapping/MoleculeDescriptor.xml. 
--- The error occurred while applying a result map. 
--- Check the MoleculeDescriptor. 
--- Check the result mapping for the 'values' property. 
--- Cause: java.lang.ClassCastException: [D
    at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryW= ithCallback(GeneralStatement.java:188)
    at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryF= orList(GeneralStatement.java:123)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapE= xecutorDelegate.java:615)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList (SqlMapExecutorDelegate.java:589)
    at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessio= nImpl.java :118)
    at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(Sq= lMapClientTemplate.java:268)

    at = org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientT= emplate.java:193)
    at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult= (SqlMapClientTemplate.java:219)
    at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapCl= ientTemplate.java:266)
    at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList (SqlMapClientTemplate.java:260)
    at net.bioclipse.pcm.dao.GenericDao.getAll(GenericDao.java:38)
    at = sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at = sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke = (Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown = Source)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(A= opUtils.java:296)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpo= int(ReflectiveMethodInvocation.java:177)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Refl= ectiveMethodInvocation.java:144)
    at net.bioclipse.pcm.dao.FetchIntroductionInterceptor.invoke(FetchIntroducti= onInterceptor.java:22)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:166)
    at = org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAop= Proxy.java :204)
    at $Proxy0.getAll(Unknown Source)
    at net.bioclipse.pcm.dao.GenericDaoTest.testGetAll(GenericDaoTest.java:59)     at sun.reflect.NativeMethodAccessorImpl.invoke0 = (Native Method)
    at = sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at = sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown = Source)
    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.AbstractAnnotationAwareTransactionalT= ests.access$001 (AbstractAnnotationAwareTransactionalTests.java:47)
    at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalT= ests$1.run (AbstractAnnotationAwareTransactionalTests.java:115)
    at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalT= ests.runTest (AbstractAnnotationAwareTransactionalTests.java:180)
    at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalT= ests.runTestTimed (AbstractAnnotationAwareTransactionalTests.java:153)
    at = org.springframework.test.annotation.AbstractAnnotationAwareTransactionalT= ests.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.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run (JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.jav= a:38)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunn= er.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main = (RemoteTestRunner.java:196)
Caused by: java.lang.ClassCastException: [D
    at com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.listToArray(R= esultLoader.java:85)
    at com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(Res= ultLoader.java:75)
    at com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult (ResultLoader.java:59)
    at com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getNestedSelectMap= pingValue(BasicResultMap.java :502)
    at = com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(BasicRe= sultMap.java:340)
    at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.= java:381)
    at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlE= xecutor.java:301)
    at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery (SqlExecutor.java:190)
    at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQue= ry(GeneralStatement.java :205)
    at = com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryW= ithCallback(GeneralStatement.java :173)
    ... 46 more

--
// Jonathan

------_=_NextPart_001_01C7F48F.45258B1C--