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 Guy Rouillier <gu...@burntmail.com> on 2009/10/12 20:29:00 UTC

iBatis 3 Beta 4 new external dependencies

I switched a project under development from Beta 3 to Beta 4, and got 
several iterations of class not found exceptions.  So far, I've 
identified the following dependencies on external JARs:

cglib-2.2.jar : http://cglib.sourceforge.net/

asm-3.2.jar : http://asm.ow2.org/

-- 
Guy Rouillier

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: iBatis 3 Beta 4 new external dependencies

Posted by Clinton Begin <cl...@gmail.com>.
Ah... yes.  That's something I need to look into.  Turning lazy loading off
does work.  I got rid of the "enhancementEnabled" flag, as the new lazy
loader can only work with enhancement.
Clinton

On Mon, Oct 12, 2009 at 1:14 PM, Martin Ellis <el...@gmail.com> wrote:

> On Mon, Oct 12, 2009 at 7:29 PM, Guy Rouillier <gu...@burntmail.com>
> wrote:
> > I switched a project under development from Beta 3 to Beta 4, and got
> > several iterations of class not found exceptions.  So far, I've
> identified
> > the following dependencies on external JARs:
> >
> > cglib-2.2.jar : http://cglib.sourceforge.net/
> > asm-3.2.jar : http://asm.ow2.org/
>
> They're not mandatory dependencies - ibatis isn't intended to have any.
>
> Perhaps try this setting, which should prevent it from trying to use
> cglib/asm:
>  <settings>
>    <setting name="lazyLoadingEnabled" value="false"/>
>  </settings>
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Re: iBatis 3 Beta 4 new external dependencies

Posted by Clinton Begin <cl...@gmail.com>.
Lazy loading is now disabled by default in trunk.  It actually was already
depending on how you configured it.  But no matter, now it is for sure.

Clinton

On Mon, Oct 12, 2009 at 8:03 PM, Clinton Begin <cl...@gmail.com>wrote:

> In a nutshell, if a nested Statement or ResultMap is used to populate a
> non-collection (List) field:
>   * If all columns mapped are null, the field should be null as well.
>   * This should be consistent with lazy loading enabled or disabled.
>
> If it's a collection type (List), then:
>
>   * If all columns mapped are null, the field should be set to an empty
> collection.
>   * This should be consistent with lazy loading enabled or disabled.
>
> Cheers,
> Clinton
>
> On Mon, Oct 12, 2009 at 2:15 PM, Guy Rouillier <gu...@burntmail.com>wrote:
>
>> Clinton Begin wrote:
>>
>>> Only collection properties should be populated when you refer to them
>>> (empty collections).  But complex association types should be null.
>>>
>>
>> Sorry, I'm not comprehending the implications of your last statement.  I
>> have complex (non-primitive) object types in my associations.  Are you
>> saying that from Beta 4 onwards, all such associations will not be populated
>> if lazy loading is enabled?  So if you have non-primitive associations, then
>> you must disable lazy loading?
>>
>> Thanks.
>>
>>
>> --
>> Guy Rouillier
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>
>>
>

Re: iBatis 3 Beta 4 new external dependencies

Posted by Clinton Begin <cl...@gmail.com>.
In a nutshell, if a nested Statement or ResultMap is used to populate a
non-collection (List) field:
  * If all columns mapped are null, the field should be null as well.
  * This should be consistent with lazy loading enabled or disabled.

If it's a collection type (List), then:

  * If all columns mapped are null, the field should be set to an empty
collection.
  * This should be consistent with lazy loading enabled or disabled.

Cheers,
Clinton

On Mon, Oct 12, 2009 at 2:15 PM, Guy Rouillier <gu...@burntmail.com>wrote:

> Clinton Begin wrote:
>
>> Only collection properties should be populated when you refer to them
>> (empty collections).  But complex association types should be null.
>>
>
> Sorry, I'm not comprehending the implications of your last statement.  I
> have complex (non-primitive) object types in my associations.  Are you
> saying that from Beta 4 onwards, all such associations will not be populated
> if lazy loading is enabled?  So if you have non-primitive associations, then
> you must disable lazy loading?
>
> Thanks.
>
>
> --
> Guy Rouillier
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Re: iBatis 3 Beta 4 new external dependencies

Posted by Guy Rouillier <gu...@burntmail.com>.
Clinton Begin wrote:
> Only collection properties should be populated when you refer to them 
> (empty collections).  But complex association types should be null.

Sorry, I'm not comprehending the implications of your last statement.  I 
have complex (non-primitive) object types in my associations.  Are you 
saying that from Beta 4 onwards, all such associations will not be 
populated if lazy loading is enabled?  So if you have non-primitive 
associations, then you must disable lazy loading?

Thanks.

-- 
Guy Rouillier

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: iBatis 3 Beta 4 new external dependencies

Posted by Clinton Begin <cl...@gmail.com>.
Good call on the default...
Only collection properties should be populated when you refer to them (empty
collections).  But complex association types should be null.

Clinton

On Mon, Oct 12, 2009 at 2:02 PM, Guy Rouillier <gu...@burntmail.com>wrote:

> Martin Ellis wrote:
>
>> On Mon, Oct 12, 2009 at 7:29 PM, Guy Rouillier <gu...@burntmail.com>
>> wrote:
>>
>>> I switched a project under development from Beta 3 to Beta 4, and got
>>> several iterations of class not found exceptions.  So far, I've
>>> identified
>>> the following dependencies on external JARs:
>>>
>>> cglib-2.2.jar : http://cglib.sourceforge.net/
>>> asm-3.2.jar : http://asm.ow2.org/
>>>
>>
>> They're not mandatory dependencies - ibatis isn't intended to have any.
>>
>> Perhaps try this setting, which should prevent it from trying to use
>> cglib/asm:
>>  <settings>
>>    <setting name="lazyLoadingEnabled" value="false"/>
>>  </settings>
>>
>
> Thanks, that works.  This also addresses the next issue I had.  Beta 3 was
> populating associations, but Beta 4 was not.  According to the docs, lazy
> loaded values should be populated when I refer to them.  This is not
> happening in Beta 4.
>
> Because of that and the external dependencies, I'd suggest the default for
> lazyLoadingEnabled should be false.
>
> --
> Guy Rouillier
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Re: iBatis 3 Beta 4 new external dependencies

Posted by Guy Rouillier <gu...@burntmail.com>.
Martin Ellis wrote:
> On Mon, Oct 12, 2009 at 7:29 PM, Guy Rouillier <gu...@burntmail.com> wrote:
>> I switched a project under development from Beta 3 to Beta 4, and got
>> several iterations of class not found exceptions.  So far, I've identified
>> the following dependencies on external JARs:
>>
>> cglib-2.2.jar : http://cglib.sourceforge.net/
>> asm-3.2.jar : http://asm.ow2.org/
> 
> They're not mandatory dependencies - ibatis isn't intended to have any.
> 
> Perhaps try this setting, which should prevent it from trying to use cglib/asm:
>   <settings>
>     <setting name="lazyLoadingEnabled" value="false"/>
>   </settings>

Thanks, that works.  This also addresses the next issue I had.  Beta 3 
was populating associations, but Beta 4 was not.  According to the docs, 
lazy loaded values should be populated when I refer to them.  This is 
not happening in Beta 4.

Because of that and the external dependencies, I'd suggest the default 
for lazyLoadingEnabled should be false.

-- 
Guy Rouillier

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: iBatis 3 Beta 4 new external dependencies

Posted by Martin Ellis <el...@gmail.com>.
On Mon, Oct 12, 2009 at 7:29 PM, Guy Rouillier <gu...@burntmail.com> wrote:
> I switched a project under development from Beta 3 to Beta 4, and got
> several iterations of class not found exceptions.  So far, I've identified
> the following dependencies on external JARs:
>
> cglib-2.2.jar : http://cglib.sourceforge.net/
> asm-3.2.jar : http://asm.ow2.org/

They're not mandatory dependencies - ibatis isn't intended to have any.

Perhaps try this setting, which should prevent it from trying to use cglib/asm:
  <settings>
    <setting name="lazyLoadingEnabled" value="false"/>
  </settings>

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org