jamsterdam | 12 Sep 01:14 2014
Picon

Boot derby with missing containers, ERROR 40XD2

Hi all,

I accidentally deleted a few of the disk pages files in /seg0 and now I get
the following error when trying to start the database: 

ERROR 40XD2: Container Container(0, 560) cannot be opened; it either has
been dropped or does not exist.

Is there a way to force boot the database even though the data may be
inconsistent? I don't think the data was backed up ever before, or at least
I cannot find where it could have been backed up.

Any suggestions?

--
View this message in context: http://apache-database.10148.n7.nabble.com/Boot-derby-with-missing-containers-ERROR-40XD2-tp142077.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Raffaele Sgarro | 8 Sep 19:15 2014
Picon

Improving performance of encrypted databases by increasing page cache

Database encryption turned out to be the performance bottleneck of my application. Running the same queries on the same data gives very different figures when the database is encrypted. Since I must keep the data encrypted on disk, I thought I could avoid the decryption overhead by increasing the page cache and warming up the cache by loading tables and indices at application startup. Virtually, I want to run queries against in-memory tables and indices. I run the Derby network server in its own dedicated VM process, gave the JVM 1GB of heap, and configured 400MB of page cache (4KB page size * 100K pages), database backup being 200MB.

The performance gain is really impressive (as expected) once the cache has been warmed. Unfortunately, a quick test showed there must be lots of cache misses with real usage patterns. I wonder if it's simply a matter of sizing the cache (but how can 200MB of db not fit into 400MB of memory? Are record compressed on disk?), or if it doesn't work the way I think, and I should use a cache at the application level (that maybe I'll do anyhow, but if it workd, it'd be a big win for us)

Raffaele
Kessler, Joerg | 9 Sep 10:20 2014
Picon

Problem with Select statement

Hi,

I want to execute select statement on a table using a Java program and JDBC. The statement is actually not very difficult:

SELECT MSG_NO, SEND_TO, CREATED_TIME, CONTENT, ENCRYPTION_KEY FROM TESTTABLE  WHERE SEQ_ID = ? AND (MSGSTATE IS NULL OR MSGSTATE = 'A')

When this statement is executed by a test I receive errors like

 

Column 'A' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'A' is not a column in the target table.

 

When I change the statement to

SELECT MSG_NO, SEND_TO, CREATED_TIME, CONTENT, ENCRYPTION_KEY FROM TESTTABLE  WHERE SEQ_ID = ? AND MSGSTATE IS NULL

there is no problem. Also when I execute the above statement via Eclipse Database Development/SQL Scrapbook using a fix SEQ_ID the statement is executed without error.

 

What am I doing wrong?

 

Best Regards,

 

Jörg

Tim Dudgeon | 29 Aug 17:17 2014

NPE from InternalTriggerExecutionContext.cleanup()

Using Derby 10.10.1.1 I'm seeing strange behaviour when doing a series 
of inserts that have triggers associated.
About 2000 rows get inserted fine, then it blows up completely.
The derby.log file contains stuff like this:

Database Class Loader started - 
derby.database.classpath='APP.ExtraFunctions'
Loaded chemaxon.misc.derby.functions.MiniregFunctions from database jar 
"APP"."EXTRAFUNCTIONS"
Fri Aug 29 15:37:56 BST 2014 Thread[Default RequestProcessor,1,system] 
(XID = 448992), (SESSIONID = 1), (DATABASE = 
C:\Users\timbo\Documents\IJCProjects\mini-regs\Vanilla 
Oracle/.config/derby-minireg-11-jun/db), (DRDAID = null), Cleanup action 
starting
Fri Aug 29 15:37:56 BST 2014 Thread[Default RequestProcessor,1,system] 
(XID = 448992), (SESSIONID = 1), (DATABASE = C:\Users\ ... ), (DRDAID = 
null), Failed Statement is: INSERT INTO APP.COMPOUNDS ( ... ) VALUES 
(?,?,?,?,?,?,?,CURRENT_TIMESTAMP,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) 
with 31 parameters begin parameter #1: BLOB:Length=1658 :end ...
java.lang.NullPointerException
	at 
org.apache.derby.impl.sql.execute.InternalTriggerExecutionContext.cleanup(Unknown 
Source)
	at 
org.apache.derby.impl.sql.execute.TriggerEventActivator.cleanup(Unknown 
Source)
	at org.apache.derby.impl.sql.execute.InsertResultSet.cleanUp(Unknown 
Source)
	at 
org.apache.derby.impl.sql.conn.GenericStatementContext.cleanupOnError(Unknown 
Source)
	at 
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown 
Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown 
Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown 
Source)
	at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown 
Source)
	at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown 
Source)
	at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown 
Source)
...

(somethings cut out for brevity)

The trigger involved uses a custom java function that's been added to 
the DB, so the real problem might well be there, but the stack trace 
doesn't give much of a pointer.

Any suggestions for where to look?

Tim

Rick Hillegas | 27 Aug 14:40 2014
Picon

[ANNOUNCE] Apache Derby 10.11.1.1 released

The Apache Derby project is pleased to announce feature release 10.11.1.1.

Apache Derby is a subproject of the Apache DB project. Derby is a pure 
Java relational database engine which conforms to the ISO/ANSI SQL and 
JDBC standards. Derby aims to be easy for developers and end-users to 
work with.

Derby 10.11.1.1 can be obtained from the Derby download site:

    http://db.apache.org/derby/derby_downloads.html.

Derby 10.11.1.1 contains the following new features:

     * MERGE statement - MERGE is a single, join-driven statement which 
INSERTs, UPDATEs, and DELETEs rows.
     * Deferrable constraints - Constraint enforcement can now be 
deferred, typically to the end of a transaction.
     * WHEN clause in CREATE TRIGGER - An optional WHEN clause has been 
added which determines which rows fire a trigger.
     * Rolling log file - The Derby diagnostic log can now be split 
across a sequence of files.
     * Experimental Lucene support - Derby text columns can now be 
indexed and queried via Apache Lucene.
     * Simple case expression - The "simple" and "extended" syntax for 
CASE expressions has been added.
     * Better concurrency for identity columns - The concurrency of 
identity columns has been boosted.
     * New ij HoldForConnection command - A new ij command has been 
added to change the default cursor holdability.
     * Standard syntax for altering column nullability - Standard syntax 
has been added for altering the nullability of columns.

In addition, Derby 10.11.1.1 contains many bug, security, and 
documentation fixes.

Please try out this new release.

Myrna van Lunteren | 25 Aug 05:28 2014
Picon

10.11.1 release candidate delayed

I found this message stuck in moderation and my attempt to moderate it through failed.

George,

Looks like the 10.11 release is really close. There were some delays because of vacation times and the testing exposed some bugs that had to be fixed first.

The Release Manager set the new Target Release date for August 29.

Myrna

-----------------------------------
From: spykee <toma.george89-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
To: derby-dev-PvNy6fhA98DNLxjTenLetw@public.gmane.org
Cc: 
Date: Tue, 5 Aug 2014 10:21:43 -0700 (PDT)
Subject: Re: 10.11.1 release candidate delayed
Hi folks,

Any news with the release ?

Cheers,
George
Myrna van Lunteren | 25 Aug 05:14 2014
Picon

How to get Derby folder size from remote Server?

This message was stuck in moderation also; my attempt to moderate it through failed.
---------------

From: Nguyen Hai Dong <dongngh-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
To: derby-user-PvNy6fhA98BaOpEYXzEtiA@public.gmane.orgrg
Cc: 
Date: Mon, 21 Jul 2014 00:26:59 -0700 (PDT)
Subject: How to get Derby folder size from remote Server?
Hi,

My java application and Database is running in different servers. How can i
get whole *database folder size* in java program. Thanks.
Myrna van Lunteren | 25 Aug 05:10 2014
Picon

Feedback on documentation "Getting started with Java DB"

another lost moderated message - from July 21
------------------
From: "Mathias Trapp" <Mathias.Trapp-Mmb7MZpHnFY@public.gmane.org>
To: <derby-user-PvNy6fhA98DNLxjTenLetw@public.gmane.org>
Cc: 
Date: Mon, 21 Jul 2014 07:12:15 +0200
Subject: Feedback on documentation "Getting started with Java DB"
Hi derby team,
 
I am just examining the JDK 1.7.0.65 and it's Java DB implementation.
In the document "Getting started with Java DB" on page 23 I found the placeholder <at> MIMIMUM_JDK <at> which - IMHO - should be replaced by the actual minimum version number.
 
Best wishes,
 
Mathias Trapp
Nuremberg, Germany
Myrna van Lunteren | 21 Aug 23:23 2014
Picon

missed moderated message

Hi,

I noticed there were a few moderated messages that I do not think made it to the list. I tried to moderate it through, but that failed - perhaps it's too long ago...

Here's one from July 3...

Myrna
-------------

From: china_wang <2596121187-9uewiaClKEY@public.gmane.org>
To: derby-user-PvNy6fhA98DNLxjTenLetw@public.gmane.org
Cc: 
Date: Thu, 3 Jul 2014 02:36:09 -0700 (PDT)
Subject: I can not get output parameter values from procedure
hi,all: my procedure code is follow:
*****************************************
"create procedure app.getUserName(out userName list) parameter style java reads sql data language java external name 'tool.ProcedureClass.getUserName';" Output parameters type-- 'list' is user-defined type,Defined as follows: " CREATE TYPE list EXTERNAL NAME 'java.util.List' LANGUAGE JAVA " ******************************************* tool.ProcedureClass.getUserName code is public static void getUserName(List[] list) { Connection connection =null; PreparedStatement p=null; ResultSet rs =null; try { list=new ArrayList[1]; list[0]=new ArrayList(); connection = DriverManager.getConnection("jdbc:default:connection"); p = connection.prepareStatement(" select name from pub_user "); rs = p.executeQuery(); while (rs.next()) { list[0].add(rs.getString(1));// I can get value of rs.getString(1) } } catch (Exception e) { e.printStackTrace(); } finally { try { rs.close(); p.close(); connection.close(); } catch (Exception e2) { } } } ******************************************************* i call procedure by follow code: public String getDataSet(String dsId,String dtId)throws Exception { String driver = "org.apache.derby.jdbc.EmbeddedDriver"; String url = "jdbc:derby:metabase;create=true"; try { Class.forName(driver); Connection connection = DriverManager.getConnection(url); CallableStatement cs = connection.prepareCall("CALL APP.getUserName(?)"); cs.registerOutParameter(1, Types.JAVA_OBJECT); cs.execute(); //String retVal=cs.getString(3); cs.getObject(1); // value is null by debug's inspect fucntion return ""; } catch(Exception e) { e.printStackTrace(); throw e; } }
i don't know why cs.getObject(1) return null? Thanks a lot in advance china_wang

Jim Gray | 19 Aug 20:43 2014
Picon

Possible bug: duplicate value order with non-unique indexes

I have a problem which I think is a bug, please let me know if you agree.

 

Also, has anyone else has encountered it and developed a workaround?

 

The problem deals with the ordering of duplicate values within a non-unique index.

 

I have an application that depends upon duplicates occurring in creation order,

but, it appears that the order is different for INSERT versus UPDATE.

 

In my test case below, INSERT always puts the latest duplicate value last.

However, when an UPDATE creates a new duplicate value, it is placed first in index order.

 

The data is randomized with unique values for the first column, and duplicate values in  the second column. 

The third column has the encounter order of the duplicate value.

 

create table t1(c1 int, c2 int, c3 int);

create unique index t1_i1 on t1(c1);

create index t1_i2 on t1(c2);

 

insert into t1 values(7, 3, 1);

insert into t1 values(96, 2, 1);

insert into t1 values(44, 5, 1);

insert into t1 values(95, 2, 2);

insert into t1 values(68, 1, 1);

insert into t1 values(65, 3, 2);

insert into t1 values(62, 1, 2);

insert into t1 values(84, 3, 3);

insert into t1 values(55, 5, 2);

insert into t1 values(5, 3, 4);

insert into t1 values(25, 5, 3);

insert into t1 values(21, 7, 1);

insert into t1 values(45, 9, 1);

insert into t1 values(43, 0, 1);

insert into t1 values(71, 4, 1);

insert into t1 values(33, 4, 2);

insert into t1 values(24, 1, 3);

insert into t1 values(91, 0, 2);

insert into t1 values(60, 1, 4);

insert into t1 values(39, 3, 5);

 

select * from t1 -- DERBY-PROPERTIES index = t1_i2

;

> C1         |C2         |C3

-----------------------------------

43         |0          |1

91         |0          |2

68         |1          |1

62         |1          |2

24         |1          |3

60         |1          |4

96         |2          |1

95         |2          |2

7          |3          |1

65         |3          |2

84         |3          |3

5          |3          |4

39         |3          |5

71         |4          |1

33         |4          |2

44         |5          |1

55         |5          |2

25         |5          |3

21         |7          |1

45         |9          |1

 

update t1 set c2 = 5, c3 = 0 where c1 = 7;

 

select * from t1 -- DERBY-PROPERTIES index = t1_i2

;

> C1         |C2         |C3

-----------------------------------

43         |0          |1

91         |0          |2

68         |1          |1

62         |1          |2

24         |1          |3

60         |1          |4

96         |2          |1

95         |2          |2

65         |3          |2

84         |3          |3

5          |3          |4

39         |3          |5

71         |4          |1

33         |4          |2

7          |5          |0    <- First in duplicate order after update

44         |5          |1

55         |5          |2

25         |5          |3

21         |7          |1

45         |9          |1

 

delete from t1 where c1 = 7;

insert into t1 values(7,5,0);

 

select * from t1 -- DERBY-PROPERTIES index = t1_i2

;

> C1         |C2         |C3

-----------------------------------

43         |0          |1

91         |0          |2

68         |1          |1

62         |1          |2

24         |1          |3

60         |1          |4

96         |2          |1

95         |2          |2

65         |3          |2

84         |3          |3

5          |3          |4

39         |3          |5

71         |4          |1

33         |4          |2

44         |5          |1

55         |5          |2

25         |5          |3

7          |5          |0   <- Last in duplicate order after insert

21         |7          |1

45         |9          |1

 

 

 

 

Peter Ondruška | 31 Jul 13:07 2014
Picon

Difference

Dear all,

what is the difference between version 10.10.2.0 and 10.8.3.0? Or why is there 10.8.3.0 along with 10.10.2.0? Thanks
 
Peter

Gmane