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 
(Continue reading)

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
정용환 | 29 Jul 07:03 2014
Picon

Hellow, I have some problem in customize security policy with derby (modified)


Hellow, I am derby user in korea.



I have a problem while I try to replication.



I success to replication with embeded mode.

and replication with server mode with no security manager.



but replication not work with  server mode with security manager.



manual said

"If you want to perform replication with the security manager enabled, you must modify
 the security policy file on both the master and slave systems to allow the master-slave
network connection."



so I try to modify security policy file

follow with "Customizing the Network Server's security policy" section

but when I start server with

C:\Apache\db-derby-10.8.2.2-bin-slave\bin\startNetworkServer.bat -h 192.168.0.10 -p 1530

and following is part of startNetworkServer.bat

"%_JAVACMD%" -Djava.security.manager -Djava.security.policy=C:\Apache\db-derby-10.8.2.2-bin-slave\lib %DERBY_OPTS% -classpath "%LOCALCLASSPATH%" org.apache.derby.drda.NetworkServerControl start %DERBY_CMD_LINE_ARGS%

cmd log
"Thread[main,5,main] java.security.AccessControlException : access denied (java.io.FilePermission derby.log read)"

then server start
but when I connect db
, error messege show
"data volume is not enough , expected minimum volume is 6 byte but
received volume is obyte. connect is end."

please give me hint or solution to solve that problem.

OS is window 7


Thank you.

정용환 | 29 Jul 04:49 2014
Picon

Hellow, I have some problem in customize security policy with derby

Hellow, I am derby user in korea.

I have a problem while I try to replication.

I success to replication with embeded mode.
and replication with server mode with no security manager.

but replication not work with  server mode with security manager.

manual said
"If you want to perform replication with the security manager enabled, you must modify
the security policy file on both the master and slave systems to allow the master-slave
network connection."

so I try to modify security policy file
follow with "Customizing the Network Server's security policy" section

but it is not work. with deny access derby.log (File.io. exception)


thank you.
Michael McCollough | 28 Jul 17:53 2014

CONCUR_UPDATABLE set but not allowing WHERE cause with simple field = value

I have a program that scans a directory and all subdirectories, generating a SHA1_HASH for the first 16K of each file.
After that finishes, I get all duplicate candidates by querying derby for:
select coun(*), precheck_sha1_hash, file_size from derbydb where (not preshceck_sha1_hash is null and not precheck_sha1_hash = '') group by precheck_sha1_hash, file_size having count(*) > 1

I then use ThreadPoolExecutor (10 threads) but am currently doing non-threaded with same result:
new ReportUtility(db, miniHash, fileSize)

Files with the same 16K hash and file size are duplicate candidates so I will generate full hashes for these files to compare them.

Problem is, when I use a where clause in the rs query, I cannot update. It will work fine if I remove there where clause (I have tried with both where parameters and only one): (_db is the db passed to the contructor above)
PreparedStatement stmt = _db.prepareStatement("select sha1_hash, file_path from derbydb where precheck_sha1_hash = '" + _miniHash + "' and file_size = '"+ _fileSize + "', ResultSet.CONCUR_UPDATEABLE);

ResultSet rs = stmt.executeQuery();

while(rs.next()) {
   File file = new File(rs.getString("file_path");
   String hash = generateHash(file);
   rs.updateString("sha1_hash", hash);  // Exception thrown here when my resultset contains a where clause
  rs.updateRow();
}

rs.close();


I am using 10.5.1.1_201105231903 of Derby at the moment. I know you cannot have updatable resultsets with group by, etc but this should be supported I would think. I hope I am doing something dumb here. (for the purist critics, yes, I will turn it into a parameterized PreparedStatement), just trying to simplify into pseudocode vs. retying whole thing.

Thanks in advance
Michael

vasilis papadinas | 24 Jul 23:02 2014
Picon

Prefabricated database with specific properties and hidden structure.‏

How can I make a derby data base for only two types of users, (user1 and user2). 

User1 has the power only to modify the data base structure (create – delete tables) and nothing else. This user must no has access in data of the data base. No one else except user1 must not see any information of the structure of the database and any derby.properties file. 

User2 he has the power to work only with the data into data base (read, write, delete data rows inside the tables), but he has no any access in structure of the data base. 

Each user must he has the own key entry.

These two keys must store with cryptography in side of derby database. 

The database will be distributed with those properties and each holder will always user2. 

Along with the database, extra will be given and a ready set of sql queries, ready to run. So user2 can write java programs linked to this database and perform the given sql queries. 

The user2 should be able to change its own key.

 


Gmane