ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: Major issue with iBatis 2.1.7.597 and JBoss/cglib
Date Thu, 16 Mar 2006 18:47:59 GMT
This should do the trick...

<settings .... enhancementEnabled="false" ... />


On 3/16/06, Alexander Sack <pisymbol@gmail.com> wrote:
>
> I'm using JDK1.5_06,  JBoss 4.0.3SP1 (or JBoss 4.0.4RC1) and iBatis
> 2.1.7.597.  JBoss ships with cglib-2.1jboss.jar (both for JBoss and its
> EJB3 deployer).  I have a simple mapfile that specifies
> a resultMap with a subquery via the "select" statement, e.g.:
>
> <resultMap id="myClassResultMap" class="myClass">
>   <result property="myClassField" column="id" nullValue="false"
> select="some_sub_query_ret_bool"/>
> </resultMap>
>
> The "some_sub_query_ret_bool" has java.lang.Boolean as its resultClass.
> On JBoss this fails miserably with:
>
> 11:53:23,187 ERROR [STDERR] java.lang.IllegalArgumentException: Cannot
> subclass final class boolean
> 11:53:23,187 ERROR [STDERR]     at
> net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:446)
> 11:53:23,187 ERROR [STDERR]     at
> net.sf.cglib.core.DefaultGeneratorStrategy.generate(
> DefaultGeneratorStrategy.java:25)
> 11:53:23,187 ERROR [STDERR]     at
> net.sf.cglib.core.AbstractClassGenerator.create(
> AbstractClassGenerator.java:215)
> 11:53:23,187 ERROR [STDERR]     at
> net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
> 11:53:23,187 ERROR [STDERR]     at net.sf.cglib.proxy.Enhancer.create(
> Enhancer.java:285)
> 11:53:23,187 ERROR [STDERR]     at net.sf.cglib.proxy.Enhancer.create(
> Enhancer.java:654)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadResult
> (EnhancedLazyResultLoader.java:104)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader.loadResult
> (EnhancedLazyResultLoader.java:59)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.loadResult(
> ResultLoader.java:53)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getNestedSelectMappingValue
> (BasicResultMap.java:455)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(
> BasicResultMap.java:315)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(
> SqlExecutor.java:394)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(
> SqlExecutor.java:185)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery
> (GeneralStatement.java:205)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback
> (GeneralStatement.java:173)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject
> (GeneralStatement.java:104)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(
> SqlMapExecutorDelegate.java:561)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(
> SqlMapExecutorDelegate.java:536)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(
> SqlMapSessionImpl.java:93)
> 11:53:23,187 ERROR [STDERR]     at
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(
> SqlMapClientImpl.java:70)
>
> If I remove cglib from JBoss completely (which I don't want to do), iBatis
> will not use it and everything works.  Is there a way I can work around this
> issue?  This seems like a bug in iBatis.
>
> -aps
>
> --
> "What lies behind us and what lies in front of us is of little concern to
> what lies within us." -Ralph Waldo Emerson
>

Mime
View raw message