You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Lear.Li (JIRA)" <ib...@incubator.apache.org> on 2005/09/15 06:26:02 UTC

[jira] Created: (IBATIS-191) operation(insert and update) Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any DATA

operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
----------------------------------------------------------------------------------------------------------------

         Key: IBATIS-191
         URL: http://issues.apache.org/jira/browse/IBATIS-191
     Project: iBatis for Java
        Type: Bug
  Components: SQL Maps  
    Versions: 2.1.5    
 Environment: Apache/2.0.47 (Win32) PHP/5.1.0b3 mod_jk/1.2.14
Tomcat/4.1.27
jdk1.5.0_02
Oracle 9i2

    Reporter: Lear.Li


operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA

i has find and fix code in ibatis as:

com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback

    public void setParameter(ParameterSetter setter, Object parameter) throws
            SQLException {
        String s = (String) parameter;
        if (s != null) {
            StringReader reader = new StringReader(s);
            setter.setCharacterStream(reader, s.length());
        } else {
            setter.setString(null);
        }
       //setter.setString((String) parameter);  // ? why put the line at here, i test and find ,set double times, will close tomcat
    }

issue:
     if remark up line , will ok


com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback

 public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
     System.out.println("[Fixed BLOB SET]");
    if (null != parameter) {
     byte[] bytes = (byte[]) parameter;
     ByteArrayInputStream bis=new ByteArrayInputStream(bytes);
     setter.setBinaryStream(bis,(int)(bytes.length));
     //setter.setBytes(bytes);  // don't use set byte, use setBinaryStream will ok
   }
 }

issue:
     use setBinaryStream will ok


wish usefull




-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (IBATIS-191) operation(insert and update) Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any DATA

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


> operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
> ----------------------------------------------------------------------------------------------------------------
>
>          Key: IBATIS-191
>          URL: http://issues.apache.org/jira/browse/IBATIS-191
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.5
>  Environment: Apache/2.0.47 (Win32) PHP/5.1.0b3 mod_jk/1.2.14
> Tomcat/4.1.27
> jdk1.5.0_02
> Oracle 9i2
>     Reporter: Lear.Li
>     Assignee: Clinton Begin

>
> operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
> i has find and fix code in ibatis as:
> com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback
>     public void setParameter(ParameterSetter setter, Object parameter) throws
>             SQLException {
>         String s = (String) parameter;
>         if (s != null) {
>             StringReader reader = new StringReader(s);
>             setter.setCharacterStream(reader, s.length());
>         } else {
>             setter.setString(null);
>         }
>        //setter.setString((String) parameter);  // ? why put the line at here, i test and find ,set double times, will close tomcat
>     }
> issue:
>      if remark up line , will ok
> com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback
>  public void setParameter(ParameterSetter setter, Object parameter)
> throws SQLException {
>      System.out.println("[Fixed BLOB SET]");
>     if (null != parameter) {
>      byte[] bytes = (byte[]) parameter;
>      ByteArrayInputStream bis=new ByteArrayInputStream(bytes);
>      setter.setBinaryStream(bis,(int)(bytes.length));
>      //setter.setBytes(bytes);  // don't use set byte, use setBinaryStream will ok
>    }
>  }
> issue:
>      use setBinaryStream will ok
> wish usefull

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-191) operation(insert and update) Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any DATA

Posted by "Sven Boden (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-191?page=comments#action_12330311 ] 

Sven Boden commented on IBATIS-191:
-----------------------------------

Could you try using the JDBC library of Oracle 10g. We've had similar problems in the past that were solved by using the version 10 drivers with Oracle 9i (Oracle has this even as solution to some Oracle 9i problems in MetaLink).

You can find them at http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

Regards,
Sven

> operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
> ----------------------------------------------------------------------------------------------------------------
>
>          Key: IBATIS-191
>          URL: http://issues.apache.org/jira/browse/IBATIS-191
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.5
>  Environment: Apache/2.0.47 (Win32) PHP/5.1.0b3 mod_jk/1.2.14
> Tomcat/4.1.27
> jdk1.5.0_02
> Oracle 9i2
>     Reporter: Lear.Li

>
> operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
> i has find and fix code in ibatis as:
> com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback
>     public void setParameter(ParameterSetter setter, Object parameter) throws
>             SQLException {
>         String s = (String) parameter;
>         if (s != null) {
>             StringReader reader = new StringReader(s);
>             setter.setCharacterStream(reader, s.length());
>         } else {
>             setter.setString(null);
>         }
>        //setter.setString((String) parameter);  // ? why put the line at here, i test and find ,set double times, will close tomcat
>     }
> issue:
>      if remark up line , will ok
> com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback
>  public void setParameter(ParameterSetter setter, Object parameter)
> throws SQLException {
>      System.out.println("[Fixed BLOB SET]");
>     if (null != parameter) {
>      byte[] bytes = (byte[]) parameter;
>      ByteArrayInputStream bis=new ByteArrayInputStream(bytes);
>      setter.setBinaryStream(bis,(int)(bytes.length));
>      //setter.setBytes(bytes);  // don't use set byte, use setBinaryStream will ok
>    }
>  }
> issue:
>      use setBinaryStream will ok
> wish usefull

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-191) operation(insert and update) Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any DATA

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

    Resolution: Fixed
     Assign To: Clinton Begin


Fixed as described.  

> operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
> ----------------------------------------------------------------------------------------------------------------
>
>          Key: IBATIS-191
>          URL: http://issues.apache.org/jira/browse/IBATIS-191
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.5
>  Environment: Apache/2.0.47 (Win32) PHP/5.1.0b3 mod_jk/1.2.14
> Tomcat/4.1.27
> jdk1.5.0_02
> Oracle 9i2
>     Reporter: Lear.Li
>     Assignee: Clinton Begin

>
> operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
> i has find and fix code in ibatis as:
> com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback
>     public void setParameter(ParameterSetter setter, Object parameter) throws
>             SQLException {
>         String s = (String) parameter;
>         if (s != null) {
>             StringReader reader = new StringReader(s);
>             setter.setCharacterStream(reader, s.length());
>         } else {
>             setter.setString(null);
>         }
>        //setter.setString((String) parameter);  // ? why put the line at here, i test and find ,set double times, will close tomcat
>     }
> issue:
>      if remark up line , will ok
> com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback
>  public void setParameter(ParameterSetter setter, Object parameter)
> throws SQLException {
>      System.out.println("[Fixed BLOB SET]");
>     if (null != parameter) {
>      byte[] bytes = (byte[]) parameter;
>      ByteArrayInputStream bis=new ByteArrayInputStream(bytes);
>      setter.setBinaryStream(bis,(int)(bytes.length));
>      //setter.setBytes(bytes);  // don't use set byte, use setBinaryStream will ok
>    }
>  }
> issue:
>      use setBinaryStream will ok
> wish usefull

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-191) operation(insert and update) Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any DATA

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

    Fix Version: 2.2.0
     Resolution: Fixed

> operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
> ----------------------------------------------------------------------------------------------------------------
>
>          Key: IBATIS-191
>          URL: http://issues.apache.org/jira/browse/IBATIS-191
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.5
>  Environment: Apache/2.0.47 (Win32) PHP/5.1.0b3 mod_jk/1.2.14
> Tomcat/4.1.27
> jdk1.5.0_02
> Oracle 9i2
>     Reporter: Lear.Li
>     Assignee: Clinton Begin
>      Fix For: 2.2.0

>
> operation(insert and update)  Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any  DATA
> i has find and fix code in ibatis as:
> com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback
>     public void setParameter(ParameterSetter setter, Object parameter) throws
>             SQLException {
>         String s = (String) parameter;
>         if (s != null) {
>             StringReader reader = new StringReader(s);
>             setter.setCharacterStream(reader, s.length());
>         } else {
>             setter.setString(null);
>         }
>        //setter.setString((String) parameter);  // ? why put the line at here, i test and find ,set double times, will close tomcat
>     }
> issue:
>      if remark up line , will ok
> com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback
>  public void setParameter(ParameterSetter setter, Object parameter)
> throws SQLException {
>      System.out.println("[Fixed BLOB SET]");
>     if (null != parameter) {
>      byte[] bytes = (byte[]) parameter;
>      ByteArrayInputStream bis=new ByteArrayInputStream(bytes);
>      setter.setBinaryStream(bis,(int)(bytes.length));
>      //setter.setBytes(bytes);  // don't use set byte, use setBinaryStream will ok
>    }
>  }
> issue:
>      use setBinaryStream will ok
> wish usefull

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira