You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Alexander Dederer (JIRA)" <ib...@incubator.apache.org> on 2004/12/21 09:47:30 UTC

[jira] Created: (IBATIS-34) Exception while serializable NULL value (CacheModel)

Exception while serializable NULL value (CacheModel)
----------------------------------------------------

         Key: IBATIS-34
         URL: http://nagoya.apache.org/jira/browse/IBATIS-34
     Project: iBatis for Java
        Type: Bug
  Components: SQL Maps  
    Versions: 2.0.8    
 Environment: Cache turn on: <settings cacheModelsEnabled="true" />
Cache model:
<cacheModel id="ActionCacheModel" type="LRU" readOnly="false" serialize="true">
   ...
</cacheModel>

    Reporter: Alexander Dederer
    Priority: Critical


Method addObject craches when trying serializate null value.
INFO:
SQL request return empty ResultSet. CacheModel.java trying caching null value througth Serializable is serialize variable is TRUE and craches with Exception.

To resolve this bug nedeed changes in addObject and getObject methods:

/* com.ibatis.sqlmap.engine.cache.CacheModel.addObject */
300    if (null == value) value = NULL_OBJECT;
301    if (serialize && !readOnly && value != null) {
to:
300    if (null == value) value = NULL_OBJECT;
301    if (serialize && !readOnly && value != NULL_OBJECT) { 


/* com.ibatis.sqlmap.engine.cache.CacheModel.getObject */
270    if (serialize && !readOnly && value != null) {
to:
270    if (serialize && !readOnly && (value != NULL_OBJECT && value != null)) { 

and finally return realy null referene when founded NULL_OBJECT in the cache:
289    return value;
to:
289    return value == NULL_OBJECT ? null : value; 



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (IBATIS-34) Exception while serializable NULL value (CacheModel)

Posted by "Larry Meadors (JIRA)" <ib...@incubator.apache.org>.
     [ http://nagoya.apache.org/jira/browse/IBATIS-34?page=history ]
     
Larry Meadors resolved IBATIS-34:
---------------------------------

     Assign To:     (was: Larry Meadors)
    Resolution: Fixed

Applied patch, ran unit tests, and committed.

> Exception while serializable NULL value (CacheModel)
> ----------------------------------------------------
>
>          Key: IBATIS-34
>          URL: http://nagoya.apache.org/jira/browse/IBATIS-34
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.8
>  Environment: Cache turn on: <settings cacheModelsEnabled="true" />
> Cache model:
> <cacheModel id="ActionCacheModel" type="LRU" readOnly="false" serialize="true">
>    ...
> </cacheModel>
>     Reporter: Alexander Dederer
>     Priority: Critical
>  Attachments: CacheModel.java
>
> Method addObject craches when trying serializate null value.
> INFO:
> SQL request return empty ResultSet. CacheModel.java trying caching null value througth Serializable is serialize variable is TRUE and craches with Exception.
> To resolve this bug nedeed changes in addObject and getObject methods:
> /* com.ibatis.sqlmap.engine.cache.CacheModel.addObject */
> 300    if (null == value) value = NULL_OBJECT;
> 301    if (serialize && !readOnly && value != null) {
> to:
> 300    if (null == value) value = NULL_OBJECT;
> 301    if (serialize && !readOnly && value != NULL_OBJECT) { 
> /* com.ibatis.sqlmap.engine.cache.CacheModel.getObject */
> 270    if (serialize && !readOnly && value != null) {
> to:
> 270    if (serialize && !readOnly && (value != NULL_OBJECT && value != null)) { 
> and finally return realy null referene when founded NULL_OBJECT in the cache:
> 289    return value;
> to:
> 289    return value == NULL_OBJECT ? null : value; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (IBATIS-34) Exception while serializable NULL value (CacheModel)

Posted by "Alexander Dederer (JIRA)" <ib...@incubator.apache.org>.
     [ http://nagoya.apache.org/jira/browse/IBATIS-34?page=history ]

Alexander Dederer updated IBATIS-34:
------------------------------------

    Attachment: CacheModel.java

Source file vith fixes this bug.

> Exception while serializable NULL value (CacheModel)
> ----------------------------------------------------
>
>          Key: IBATIS-34
>          URL: http://nagoya.apache.org/jira/browse/IBATIS-34
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.8
>  Environment: Cache turn on: <settings cacheModelsEnabled="true" />
> Cache model:
> <cacheModel id="ActionCacheModel" type="LRU" readOnly="false" serialize="true">
>    ...
> </cacheModel>
>     Reporter: Alexander Dederer
>     Priority: Critical
>  Attachments: CacheModel.java
>
> Method addObject craches when trying serializate null value.
> INFO:
> SQL request return empty ResultSet. CacheModel.java trying caching null value througth Serializable is serialize variable is TRUE and craches with Exception.
> To resolve this bug nedeed changes in addObject and getObject methods:
> /* com.ibatis.sqlmap.engine.cache.CacheModel.addObject */
> 300    if (null == value) value = NULL_OBJECT;
> 301    if (serialize && !readOnly && value != null) {
> to:
> 300    if (null == value) value = NULL_OBJECT;
> 301    if (serialize && !readOnly && value != NULL_OBJECT) { 
> /* com.ibatis.sqlmap.engine.cache.CacheModel.getObject */
> 270    if (serialize && !readOnly && value != null) {
> to:
> 270    if (serialize && !readOnly && (value != NULL_OBJECT && value != null)) { 
> and finally return realy null referene when founded NULL_OBJECT in the cache:
> 289    return value;
> to:
> 289    return value == NULL_OBJECT ? null : value; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (IBATIS-34) Exception while serializable NULL value (CacheModel)

Posted by "Larry Meadors (JIRA)" <ib...@incubator.apache.org>.
     [ http://nagoya.apache.org/jira/browse/IBATIS-34?page=history ]

Larry Meadors reassigned IBATIS-34:
-----------------------------------

    Assign To: Larry Meadors

> Exception while serializable NULL value (CacheModel)
> ----------------------------------------------------
>
>          Key: IBATIS-34
>          URL: http://nagoya.apache.org/jira/browse/IBATIS-34
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.8
>  Environment: Cache turn on: <settings cacheModelsEnabled="true" />
> Cache model:
> <cacheModel id="ActionCacheModel" type="LRU" readOnly="false" serialize="true">
>    ...
> </cacheModel>
>     Reporter: Alexander Dederer
>     Assignee: Larry Meadors
>     Priority: Critical
>  Attachments: CacheModel.java
>
> Method addObject craches when trying serializate null value.
> INFO:
> SQL request return empty ResultSet. CacheModel.java trying caching null value througth Serializable is serialize variable is TRUE and craches with Exception.
> To resolve this bug nedeed changes in addObject and getObject methods:
> /* com.ibatis.sqlmap.engine.cache.CacheModel.addObject */
> 300    if (null == value) value = NULL_OBJECT;
> 301    if (serialize && !readOnly && value != null) {
> to:
> 300    if (null == value) value = NULL_OBJECT;
> 301    if (serialize && !readOnly && value != NULL_OBJECT) { 
> /* com.ibatis.sqlmap.engine.cache.CacheModel.getObject */
> 270    if (serialize && !readOnly && value != null) {
> to:
> 270    if (serialize && !readOnly && (value != NULL_OBJECT && value != null)) { 
> and finally return realy null referene when founded NULL_OBJECT in the cache:
> 289    return value;
> to:
> 289    return value == NULL_OBJECT ? null : value; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-34) Exception while serializable NULL value (CacheModel)

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-34?page=history ]
     
Clinton Begin closed IBATIS-34:
-------------------------------

    Assign To: Larry Meadors

fixed as larry decribed

> Exception while serializable NULL value (CacheModel)
> ----------------------------------------------------
>
>          Key: IBATIS-34
>          URL: http://issues.apache.org/jira/browse/IBATIS-34
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.8
>  Environment: Cache turn on: <settings cacheModelsEnabled="true" />
> Cache model:
> <cacheModel id="ActionCacheModel" type="LRU" readOnly="false" serialize="true">
>    ...
> </cacheModel>
>     Reporter: Alexander Dederer
>     Assignee: Larry Meadors
>     Priority: Critical
>  Attachments: CacheModel.java
>
> Method addObject craches when trying serializate null value.
> INFO:
> SQL request return empty ResultSet. CacheModel.java trying caching null value througth Serializable is serialize variable is TRUE and craches with Exception.
> To resolve this bug nedeed changes in addObject and getObject methods:
> /* com.ibatis.sqlmap.engine.cache.CacheModel.addObject */
> 300    if (null == value) value = NULL_OBJECT;
> 301    if (serialize && !readOnly && value != null) {
> to:
> 300    if (null == value) value = NULL_OBJECT;
> 301    if (serialize && !readOnly && value != NULL_OBJECT) { 
> /* com.ibatis.sqlmap.engine.cache.CacheModel.getObject */
> 270    if (serialize && !readOnly && value != null) {
> to:
> 270    if (serialize && !readOnly && (value != NULL_OBJECT && value != null)) { 
> and finally return realy null referene when founded NULL_OBJECT in the cache:
> 289    return value;
> to:
> 289    return value == NULL_OBJECT ? null : value; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira