Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D65D78BD for ; Tue, 20 Sep 2011 21:40:47 +0000 (UTC) Received: (qmail 92902 invoked by uid 500); 20 Sep 2011 21:40:46 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 92856 invoked by uid 500); 20 Sep 2011 21:40:46 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 92847 invoked by uid 99); 20 Sep 2011 21:40:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 21:40:46 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [148.87.113.117] (HELO rcsinet15.oracle.com) (148.87.113.117) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 21:40:36 +0000 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p8KLeDEC032484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Sep 2011 21:40:15 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p8KLeBJs016411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 20 Sep 2011 21:40:12 GMT Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p8KLe6JH007762 for ; Tue, 20 Sep 2011 16:40:06 -0500 Received: from [127.0.0.1] (/188.113.85.108) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 Sep 2011 14:40:06 -0700 Message-ID: <4E790831.6060706@oracle.com> Date: Tue, 20 Sep 2011 23:40:01 +0200 From: "Dag H. Wanvik" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.20) Gecko/20110804 Thunderbird/3.1.12 MIME-Version: 1.0 To: Derby Discussion Subject: Re: derby can not reload procedure class? can not use ResultSet.updateRow()? References: In-Reply-To: Content-Type: text/plain; charset=x-gbk; format=flowed Content-Transfer-Encoding: 8bit X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090207.4E79083F.0072,ss=1,re=0.000,fgs=0 X-Virus-Checked: Checked by ClamAV on apache.org On 9/19/2011 6:09 PM, �ױ� wrote: > nice to contact every one,This is my first time to mail in > english,please forgive me. > #1.It seems that when procedure in a class was loaded, drop and > reloaded, the changes of JAR file havn't take effected! Not quite sure what you did here, but did you look at/try the system procedure REPLACE_JAR? http://db.apache.org/derby/docs/10.8/tools/ttoolsjarload1003120.html It seems you remove the jar before (re)installing it, that should work as well, though.. Dag > eg script: > drop PROCEDURE test; > call sqlj.remove_jar('admin.creaateClient', 0); > call sqlj.install_jar('export\testproc.jar','admin.creaateClient', 0); > CREATE PROCEDURE test( IN orgID INTEGER, > IN groupID INTEGER, > IN name varchar(60), > IN faceFileID bigint, > IN recStatus smallint, > IN creator bigint > ) > PARAMETER STYLE JAVA READS SQL DATA LANGUAGE JAVA > EXTERNAL NAME 'com.bana.commonServer.procedure.Client_info.creaateClient'; > call test(1,2,'name',4,5,6); > -- code ended > when I change and re-complie the JAR ( a little changes of > logic,nothing of the other changeed), I repeat the script but the > logic is the old one...�� > #2 > sql = "SELECT groupSize,seq from SEQ where seqType =101 and orgID =? > and groupID =? "; > pSeq= connection.prepareStatement(sql, > ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE); > pSeq.setInt(1, orgID); > pSeq.setInt(2, groupID); > System.out.println(" exe SQL��"+sql); > rs = pSeq.executeQuery(); > if(rs.next()){ > groupSize =rs.getInt(1); > seq = rs.getInt(2); > System.out.println("seq:"+seq); > > if(seq>=groupSize){ > //returnCode[0] =4002; > return; > } > System.out.println("groupSize:"+groupSize); > rs.updateInt("seq", seq+1); /////////////not executed > rs.updateRow();//////////////////not executed > System.out.println("update:"+seq+1);//////////////////not executed > the return message is: > The exception 'java.sql.SQLException:........ ' was thrown while > evaluating an expression. > I try the same code in independent java source and execute passed.I > feel confused ,It my first time to try derby.... > I look forward to your reply.thank you for you intention.