You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Guido García Bernardo <gg...@tid.es> on 2005/12/12 18:01:34 UTC

are there inner classes supported ?

I've defined a type alias and a result map using it:

<typeAlias alias="cuenta" type="com.tid.ReportDataCuentas.Row" />
<resultMap id="resultCuentas" class="cuenta">
    ...
</resultMap>

for my inner class:

package com.tid;
public class ReportDataCuentas {   
    public class Row {
    ...
    }
    ...
}

But I get a ClassNotFoundException.
com.ibatis.common.exception.NestedRuntimeException: Error configuring 
Result.  Could not set ResultClass.  Cause: 
java.lang.ClassNotFoundException: com.tid.ReportDataCuentas.Row
Caused by: java.lang.ClassNotFoundException: com.tid.ReportDataCuentas.Row
    at 
com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$14.process(SqlMapParser.java:338)
    ...

Are there inner classes supported by ibatis?
Thank you very much,

-- 
Guido García Bernardo - ggarciab@itdeusto.com
Tfn. +34 983 54 89 08
ITDEUSTO - Valladolid


Re: are there inner classes supported ?

Posted by Guido García Bernardo <gg...@tid.es>.
Thank you.  It worked.
I'll refactor that inner classes... :)

Larry Meadors wrote:

>Editorial: Inner classes suck.
>
>You may be able to get it to work using this name:
>
>com.tid.ReportDataCuentas$Row
>
>Larry
>
>
>On 12/12/05, Guido García Bernardo <gg...@tid.es> wrote:
>  
>
>>I've defined a type alias and a result map using it:
>>
>><typeAlias alias="cuenta" type="com.tid.ReportDataCuentas.Row" />
>><resultMap id="resultCuentas" class="cuenta">
>>    ...
>></resultMap>
>>
>>for my inner class:
>>
>>package com.tid;
>>public class ReportDataCuentas {
>>    public class Row {
>>    ...
>>    }
>>    ...
>>}
>>
>>But I get a ClassNotFoundException.
>>com.ibatis.common.exception.NestedRuntimeException: Error configuring
>>Result.  Could not set ResultClass.  Cause:
>>java.lang.ClassNotFoundException: com.tid.ReportDataCuentas.Row
>>Caused by: java.lang.ClassNotFoundException: com.tid.ReportDataCuentas.Row
>>    at
>>com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$14.process(SqlMapParser.java:338)
>>    ...
>>
>>Are there inner classes supported by ibatis?
>>Thank you very much,
>>
>>--
>>Guido García Bernardo - ggarciab@itdeusto.com
>>Tfn. +34 983 54 89 08
>>ITDEUSTO - Valladolid
>>
>>
>>    
>>
>
>  
>


-- 
Guido García Bernardo - ggarciab@itdeusto.com
Tfn. +34 983 54 89 08
ITDEUSTO - Valladolid


Re: are there inner classes supported ?

Posted by Larry Meadors <lm...@apache.org>.
Editorial: Inner classes suck.

You may be able to get it to work using this name:

com.tid.ReportDataCuentas$Row

Larry


On 12/12/05, Guido García Bernardo <gg...@tid.es> wrote:
> I've defined a type alias and a result map using it:
>
> <typeAlias alias="cuenta" type="com.tid.ReportDataCuentas.Row" />
> <resultMap id="resultCuentas" class="cuenta">
>     ...
> </resultMap>
>
> for my inner class:
>
> package com.tid;
> public class ReportDataCuentas {
>     public class Row {
>     ...
>     }
>     ...
> }
>
> But I get a ClassNotFoundException.
> com.ibatis.common.exception.NestedRuntimeException: Error configuring
> Result.  Could not set ResultClass.  Cause:
> java.lang.ClassNotFoundException: com.tid.ReportDataCuentas.Row
> Caused by: java.lang.ClassNotFoundException: com.tid.ReportDataCuentas.Row
>     at
> com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$14.process(SqlMapParser.java:338)
>     ...
>
> Are there inner classes supported by ibatis?
> Thank you very much,
>
> --
> Guido García Bernardo - ggarciab@itdeusto.com
> Tfn. +34 983 54 89 08
> ITDEUSTO - Valladolid
>
>