From derby-user-return-13157-apmail-db-derby-user-archive=db.apache.org@db.apache.org Wed Oct 06 07:07:39 2010 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 26034 invoked from network); 6 Oct 2010 07:07:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Oct 2010 07:07:39 -0000 Received: (qmail 82802 invoked by uid 500); 6 Oct 2010 07:07:39 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 82667 invoked by uid 500); 6 Oct 2010 07:07:37 -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 82660 invoked by uid 99); 6 Oct 2010 07:07:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 07:07:36 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Mamatha.Venkatesh@ness.com designates 59.145.150.86 as permitted sender) Received: from [59.145.150.86] (HELO mail7.ness.com) (59.145.150.86) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 07:07:30 +0000 Received: from inblrnt11.ness.com ([192.168.105.65]) by mail7.ness.com with ESMTP; 06 Oct 2010 12:37:02 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Upgrade issue from 10.5.3 - Problem inserting a record with derby 10.6.1.0 Date: Wed, 6 Oct 2010 12:37:00 +0530 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Upgrade issue from 10.5.3 - Problem inserting a record with derby 10.6.1.0 Thread-Index: Actk0oxfVihxO8rgQtGZlkNFaFRh8QAUFL5A References: <882726.5453.qm@web65714.mail.ac4.yahoo.com><882580.13111.qm@web65710.mail.ac4.yahoo.com> From: "Mamatha Kodigehalli Venkatesh" To: "Derby Discussion" Hello all, Below is the ddl for the table that I created using 10.5.3. When = arecord is inserted into tidlrblt table trigger- gls_blt_trg will push a = corresponding record into tidlggls table CREATE TABLE tidlrblt (=20 blt_number INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START = WITH 1, INCREMENT BY 1), blt VARCHAR(4000) NOT NULL,=20 blt_size INTEGER NOT NULL,=20 min_max_size INTEGER NOT NULL, CONSTRAINT blt_pk PRIMARY KEY (blt_number) ); =20 CREATE TABLE tidlggls=20 (=20 blt_number INTEGER DEFAULT 0 NOT NULL, tt_number INTEGER DEFAULT 0 NOT NULL,=20 tt_size INTEGER DEFAULT 0 NOT NULL, alias1_number INTEGER DEFAULT 0 NOT NULL, alias1_size INTEGER DEFAULT 0 NOT NULL, alias2_number INTEGER DEFAULT 0 NOT NULL, alias2_size INTEGER DEFAULT 0 NOT NULL, alias3_number INTEGER DEFAULT 0 NOT NULL, alias3_size INTEGER DEFAULT 0 NOT NULL, alias4_number INTEGER DEFAULT 0 NOT NULL,=20 alias4_size INTEGER DEFAULT 0 NOT NULL, min_max_size INTEGER DEFAULT 0 NOT NULL, create_date CHAR (10) NOT NULL,=20 update_date CHAR (10) NOT NULL,=20 propagation_date CHAR (10) NOT NULL,=20 glossary_status CHAR (10) NOT NULL,=20 application_ver CHAR (8) DEFAULT '7.0.1' NOT NULL,=20 time_stamp CHAR (26) NOT NULL ); CREATE TRIGGER gls_blt_trg AFTER INSERT ON tidlrblt INSERT INTO = tidlggls(blt_number,create_date,update_date,propagation_date,glossary_sta= tus, time_stamp,min_max_size ) VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE, CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select = min_max_size from tidlrblt where blt_number =3D (select max(blt_number) = from tidlrblt))); =20 INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha = Testing2', 15, 20); Lily, as you doubt triggers are causing some issue. Because insert into a simple table created in 10.5.3 works. Please ret-try at your end and let me know your thoughts. Thanks again=20 Mamatha -----Original Message----- From: Mamta Satoor [mailto:msatoor@gmail.com]=20 Sent: Wednesday, October 06, 2010 2:45 AM To: Derby Discussion Subject: Re: Upgrade issue from 10.5.3 - Problem inserting a record with = derby 10.6.1.0 Hi Mamatha, Like Lily mentioned, it will be very helpful to have a setup script for the tables in questions to reproduce the problem. Would it possible for you to provide that? Mamta On Tue, Oct 5, 2010 at 10:41 AM, Lily Wei wrote: > Hi Mamatha: > =A0=A0=A0=A0 Are you using trigger in 10.5? Do you have the definition = of those > trigger? i.e. the SQL statement. > > Thanks, > Lily > ________________________________ > From: Lily Wei > To: derby-user@db.apache.org > Sent: Tue, October 5, 2010 10:16:54 AM > Subject: Re: Upgrade issue from 10.5.3 - Problem inserting a record = with > derby 10.6.1.0 > > Hi Mamath: > > =A0=A0=A0=A0 Before you do upgrade=3Dtrue, were you doing a = softupgrade? > > I just try upgrade from 10.5 to 10.6.2.1(the release candidate) with > softupgrade. > > I did not see the Exception with my try. This is what I did: > > > > On 10.5 > > =3D=3D=3D=3D=3D=3D > > > > ij version 10.5 > > ij> connect > = 'jdbc:derby:TestDerbyDB;user=3Dadmin;password=3Dpassword;create=3Dtrue'; > > ij> create table tidlrblt(BLT char(10), BLT_SIZE int, MIN_MAX_SIZE = int); > > 0 rows inserted/updated/deleted > > ij> insert into tidlrblt values ('Test 1', 15, 20); > > 1 row inserted/updated/deleted > > ij> insert into tidlrblt values ('Test 2', 20, 25); > > 1 row inserted/updated/deleted > > ij> insert into tidlrblt values ('Test 3', 25, 30); > > 1 row inserted/updated/deleted > > ij> select * from tidlrblt; > > BLT=A0=A0=A0=A0=A0=A0 |BLT_SIZE=A0=A0 |MIN_MAX_SI& > > ---------------------------------- > > Test 1=A0=A0=A0 |15=A0=A0=A0=A0=A0=A0=A0=A0 |20 > > Test 2=A0=A0=A0 |20=A0=A0=A0=A0=A0=A0=A0=A0 |25 > > Test 3=A0=A0=A0 |25=A0=A0=A0=A0=A0=A0=A0=A0 |30 > > > > 3 rows selected=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 up > > $ export > = CLASSPATH=3D".;c:/derby/10.6/tools/java/junit.jar;c:/derby/10.6/jars/san > > = e/derbyrun.jar;c:/derby/10.6/jars/sane/derbyTesting.jar;c:/derby/10.6/too= ls/jar > > s/java/jakarta-oro-2.0.8.jar" > > > > lily@LILY-PC /c/derby/10.5/testtmp > > $ ij > > ij version 10.6 > > ij> connect 'jdbc:derby:TestDerbyDB;user=3Dadmin;password=3Dpassword'; > > ij> insert into tidlrblt values ('TUpdate 1.', 30, 35); > > 1 row inserted/updated/deleted > > ij> select * from tidlrblt; > > BLT=A0=A0=A0=A0=A0=A0 |BLT_SIZE=A0=A0 |MIN_MAX_SI& > > ---------------------------------- > > Test 1=A0=A0=A0 |15=A0=A0=A0=A0=A0=A0=A0=A0 |20 > > Test 2=A0=A0=A0 |20=A0=A0=A0=A0=A0=A0=A0=A0 |25 > > Test 3=A0=A0=A0 |25=A0=A0=A0=A0=A0=A0=A0=A0 |30 > > TUpdate 1.|30=A0=A0=A0=A0=A0=A0=A0=A0 |35 > > > > 4 rows selected > > > > Do you see you are doing anything different with you upgrade step = before try > the upgrade=3Dtrue option? > > > > If I miss anything, please feel free to comment. > > > > Thanks, > > Lily > > From: Mamatha Kodigehalli Venkatesh > To: Derby Discussion > Sent: Tue, October 5, 2010 5:50:11 AM > Subject: Upgrade issue from 10.5.3 - Problem inserting a record with = derby > 10.6.1.0 > > Hello all, > > Currently I have my tables with data that was created using 10.5.3 = version. > Where I was able to perform all operations like select ,insert, update > successfully. > > Now=A0 I upgraded to 10.6.1 and unable to perform insert into existing = tables > of the database that was created in 10.5.3 however am able to perform = select > & update operations. > > NOTE :=A0 There is no problem to insert data into the newly created = table for > existing database that was created in the 10.5.3 > > I=A0 also tried > Connect > = jdbc:derby:C:\DATA\L10NEnvSetup\DERBY\TestDerbyDB;user=3Dadmin;password=3D= password;upgrade=3Dtrue'; > > But end up getting > ij> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha > Testing2', 1 > 5, 20); > ERROR XJ001: Java exception: > 'org.apache.derby.iapi.sql.execute.ResultSetFactory > = .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResu= ltSet;L > = org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/i= api/ser > = vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/Gene= ratedMe > thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: > java.lang.NoSuchM > ethodError'. > ij> > > Thanks > Mamatha > >