Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 52595 invoked from network); 3 Oct 2005 01:22:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Oct 2005 01:22:35 -0000 Received: (qmail 79172 invoked by uid 500); 3 Oct 2005 01:22:34 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 79075 invoked by uid 500); 3 Oct 2005 01:22:34 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 79064 invoked by uid 500); 3 Oct 2005 01:22:34 -0000 Delivered-To: apmail-incubator-ibatis-dev@incubator.apache.org Received: (qmail 79061 invoked by uid 99); 3 Oct 2005 01:22:34 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Oct 2005 18:22:33 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id E8EAD228 for ; Mon, 3 Oct 2005 03:21:57 +0200 (CEST) Message-ID: <1812593665.1128302517951.JavaMail.jira@ajax.apache.org> Date: Mon, 3 Oct 2005 03:21:57 +0200 (CEST) From: "Clinton Begin (JIRA)" To: ibatis-dev@incubator.apache.org Subject: [jira] Reopened: (IBATIS-191) operation(insert and update) Oracle's(OCI) CLOB and BLOB fail, CLOB will close tomcat, BLOB will miss any DATA In-Reply-To: <1596234568.1126758362118.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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