ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Sack" <pisym...@gmail.com>
Subject Re: Major issue with iBatis 2.1.7.597 and JBoss/cglib
Date Thu, 16 Mar 2006 19:30:24 GMT
Thanks Clinton, it really should be...again is there a reason why this
barfs, i.e. why does iBatis think it needs to use cglib to construct a
java.lang.Boolean object? (just curious)

-aps

On 3/16/06, Clinton Begin <clinton.begin@gmail.com> wrote:
>
> Yes, if they're running in the same JVM, if I recall correctly,
> enhancement may be a per-JVM setting.
>
> Cheers,
> Clinton
>
>
> On 3/16/06, Alexander Sack <pisymbol@gmail.com> wrote:
> >
> > You would think so...but it doesn't...first thing I tried!  With that
> > said, if I have other iBatis maps that have the enhancementEnabled on, will
> > that cause a problem?
> >
> > (btw, also, why does iBatis even call into cglib since ClassInfo seems
> > to have Boolean.class as a fundamental datatype iBatis should know
> > about? (I started to peak at the code))
> >
> > -aps
> >
> >
> > On 3/16/06, Clinton Begin < clinton.begin@gmail.com> wrote:
> > >
> > >
> > > 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
> > > >
> > >
> > >
> >
> >
> > --
> > "What lies behind us and what lies in front of us is of little concern
> > to what lies within us." -Ralph Waldo Emerson
> >
>
>


--
"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