Re: Help needed to understand deadlock

2024-02-12 Thread Rick Hillegas
the table definition. On Sat, 10 Feb 2024, 23:13 Rick Hillegas, wrote: I get the following error when I run this DDL: ERROR 42X93: Table 'ACTIVE_LIST' contains a constraint definition with column 'STUDENTID' which is not in the table. On 2/10/24 6:03 AM, John English wrote: CREATE TABLE a

Re: Help needed to understand deadlock

2024-02-10 Thread Rick Hillegas
I get the following error when I run this DDL: ERROR 42X93: Table 'ACTIVE_LIST' contains a constraint definition with column 'STUDENTID' which is not in the table. On 2/10/24 6:03 AM, John English wrote: CREATE TABLE active_list (   username    VARCHAR(15)   NOT NULL,   surname

Re: Help needed to understand deadlock

2024-02-05 Thread Rick Hillegas
I would need to see your full schema before speculating about why these statements grab these locks. On 2/2/24 11:46 AM, John English wrote: My system recently reported the following: java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and

Re: Help needed to understand deadlock

2024-02-03 Thread Rick Hillegas
The following information may be helpful: o Developer Guide material on Derby locking: https://db.apache.org/derby/docs/10.17/devguide/cdevconcepts30291.html o Reference Guide material on the SYSCS_DIAG.LOCK_TABLE diagnostic table:

Re: Apache Derby CURRENT_TIMESTAMP not working in BEFORE INSERT and BEFORE UPDATE triggers at runtime

2023-12-04 Thread Rick Hillegas
but not for this particular need. Moving to using Procedures for rights seems off the path of feasibly solving the need to intercepting DML statements to control column values the application needs. Thanks for trying to help, it is very much appreciated, Steve On Fri, Dec 1, 2023 at 1:42 PM Rick Hillegas wrote

Re: Apache Derby CURRENT_TIMESTAMP not working in BEFORE INSERT and BEFORE UPDATE triggers at runtime

2023-12-01 Thread Rick Hillegas
for your help, Steve On Wed, Nov 29, 2023 at 12:35 PM Rick Hillegas wrote: You could replace the INSERT trigger with a generated column. I don't see how to eliminate the UPDATE trigger and preserve the behavior you want. Here's how to eliminate the INSERT trigger. First make the following class

Re: Apache Derby CURRENT_TIMESTAMP not working in BEFORE INSERT and BEFORE UPDATE triggers at runtime

2023-11-29 Thread Rick Hillegas
, -Steve On Tue, Nov 28, 2023 at 6:33 PM Rick Hillegas wrote: Hi Steven, Derby hews fairly closely to SQL Standard syntax. Your triggers look wrong to me. Your triggered SQL statements are VALUES statements, which simply manufacture some values and throw them into the void. I think that is why you

Re: Apache Derby CURRENT_TIMESTAMP not working in BEFORE INSERT and BEFORE UPDATE triggers at runtime

2023-11-28 Thread Rick Hillegas
Hi Steven, Derby hews fairly closely to SQL Standard syntax. Your triggers look wrong to me. Your triggered SQL statements are VALUES statements, which simply manufacture some values and throw them into the void. I think that is why you had to include MODE DB2SQL in your syntax. I don't think

[ANNOUNCE] Apache Derby 10.17.1.0 released

2023-11-14 Thread Rick Hillegas
The Apache Derby project is pleased to announce feature release 10.17.1.0. Apache Derby is a sub-project 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

Re: Doubts about encoding, using the database across different OS/encoding

2023-10-17 Thread Rick Hillegas
Character data is always stored and retrieved with UTF8 encoding. If you move your database from a Windows to a Linux platform, the character encoding will remain UTF8 and everything should work. This assumes that you are using character-based methods

Re: disable creations of new databases when running the network server

2023-09-29 Thread Rick Hillegas
he network server, with derby,properties that is derby.authentication.provider=NATIVE:credentials the valid users that can create a new db are the one defined in the credentials db, right? Thanks for the help. - fed On Sat, 16 Sept 2023 at 20:04, Rick Hillegas wrote: You are correct. Any vali

Re: Writing hex integer constants?

2023-09-24 Thread Rick Hillegas
Derby INTEGER constants are signed decimal numbers, that is, legal inputs to the java.lang.Integer.valueOf(String s) method. The radix is always 10. Hex/octal constants won't work, as you've discovered. On 9/24/23 9:05 AM, John English wrote: Is there a way to use hex constants as integers in

Re: disable creations of new databases when running the network server

2023-09-16 Thread Rick Hillegas
You are correct. Any valid user can create as many databases as they want, provided that the databases are created in a part of the file system which is write-accessible to the engine jar and to the account which runs the server. There is no way to prevent a valid user from creating databases.

Re: Doubts about online backups using freeze / unfreeze

2023-08-08 Thread Rick Hillegas
I never use the freeze and unfreeze commands but your understanding of them sounds correct and is consistent with the following ij experiment: ij version 10.17 ij> CONNECT 'jdbc:derby:zdb;create=true'; ij> CREATE TABLE t(a INT); 0 rows inserted/updated/deleted ij> INSERT INTO t VALUES (1);

Re: Custom sorting in ORDER BY

2023-02-02 Thread Rick Hillegas
I can think of two solutions to your problem: 1) Write a custom Java collator and install it as the default sort order for all string data in your database. See the following sections in the Derby Developer's Guide: https://db.apache.org/derby/docs/10.16/devguide/cdevcollation.html and

Re: not getting proper database shutdown message in embedded mode

2022-12-22 Thread Rick Hillegas
Since it only happens with Derby 10.15 onward, the problem is probably caused by a misconfigured classpath: Derby 10.15 requires more jar files. I would take this up with the Netbeans community and point them at the release notes for 10.15.1.3:

Re: Network server with different java (or derby) version between client and server

2022-12-01 Thread Rick Hillegas
th the url handle of your Derby code library (file:///Users/me/derbyInstallation/10.15.2.0/) so that the lines look like this: grant codeBase"file:///Users/me/derbyInstallation/10.15.2.0/derbyshared.jar" Hope this helps, -Rick Thanks for the help. On Fri, 25 Nov 2022 at 21:02,

Re: Network server with different java (or derby) version between client and server

2022-11-25 Thread Rick Hillegas
/tadminappschangingyourclasspath.html and https://db.apache.org/derby/docs/10.15/publishedapi/org.apache.derby.server/module-summary.html On 11/25/22 9:51 AM, Rick Hillegas wrote: This indicates that the server is running with a Java SecurityManager and that the policy file does not grant read

Re: not getting proper database shutdown message in embedded mode

2022-11-25 Thread Rick Hillegas
This indicates that Derby cannot find the localized messages for your environment. Only the English messages are bundled inside derby.jar. What happens when you run the following program: import java.sql.*; import java.util.*; public class Z {     public static void main(String... args)

Re: Network server with different java (or derby) version between client and server

2022-11-25 Thread Rick Hillegas
e no problems. Best Regards -fed On Thu, 24 Nov 2022 at 19:52, Rick Hillegas wrote: The SQLState indicates that the server was not able to boot the database. Look in the server-side derby.log to see if there is a detailed error message describing why the boot failed. On 11/23/22 4:42 PM, fed

Re: Network server with different java (or derby) version between client and server

2022-11-24 Thread Rick Hillegas
The SQLState indicates that the server was not able to boot the database. Look in the server-side derby.log to see if there is a detailed error message describing why the boot failed. On 11/23/22 4:42 PM, fed wrote: Hi, Sorry for the late answer but I lost your reply. Two tests: I have a

Re: deadlock when running SYSCS_UTIL.SYSCS_COMPRESS_TABLE

2022-10-03 Thread Rick Hillegas
r.txn.AsyncAutoCommitTransaction.enqueue(AsyncAutoCommitTransaction.java:294) at org.apache.qpid.server.message.RoutingResult.send(RoutingResult.java:124) On Fri, Sep 30, 2022 at 2:46 PM Rick Hillegas wrote: I don't have any theories yet about what is going on. Can you try issuing the following statement jus

Re: deadlock when running SYSCS_UTIL.SYSCS_COMPRESS_TABLE

2022-09-30 Thread Rick Hillegas
he code is inside a try-catch-finally that is inside a TimerTask. conn = newConnection(); LOGGER.info("connection.getAutoCommit() is " + conn.getAutoCommit()); LOGGER.info("Compressing qpid_queue_entries"); conn.prepareStatement("call SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP',

Re: deadlock when running SYSCS_UTIL.SYSCS_COMPRESS_TABLE

2022-09-29 Thread Rick Hillegas
I'm not an expert on the table compression code, but it does need an overhaul (see https://issues.apache.org/jira/browse/DERBY-3683). If I'm interpreting the error correctly, the table compressor is blocked trying to escalate its lock on the SYSCONGLOMERATES row from shared to exclusive. But

Re: ResultSetMetaData question

2022-07-07 Thread Rick Hillegas
On 7/7/22 2:03 AM, John English wrote: On 05/07/2022 17:26, Rick Hillegas wrote: In any event, as you've noticed, getLabelName() returns the same value as getColumnName() in Derby. So basically I need to write my own SQL parser for a sequence of SelectItems between SELeCT and FROM if I want

Re: ResultSetMetaData question

2022-07-05 Thread Rick Hillegas
On 7/4/22 11:50 AM, John English wrote: On 04/07/2022 16:21, Rick Hillegas wrote: I'm afraid I don't understand your results. When I run your experiment, "2" is the name and label of the second column of the query "SELECT country,count(*) FROM customer GROUP BY country ORDER BY

Re: ResultSetMetaData question

2022-07-04 Thread Rick Hillegas
I'm afraid I don't understand your results. When I run your experiment, "2" is the name and label of the second column of the query "SELECT country,count(*) FROM customer GROUP BY country ORDER BY country". Does the following give you what you want:   SELECT country,count(*) AS "count(*)"

[ANNOUNCE] Apache Derby 10.16.1.1 released

2022-06-15 Thread Rick Hillegas
The Apache Derby project is pleased to announce feature release 10.16.1.1. Apache Derby is a sub-project 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

Re: Strange sorting behaviour

2022-04-27 Thread Rick Hillegas
Sorting behavior is only defined for the columns in the ORDER BY clause. If a column is not included in the ORDER BY clause, then its sort order can be arbitrary and not even consistent across executions of the query. Hope this helps, -Rick On 4/27/22 4:35 AM, John English wrote: I have a

Re: query timeout

2022-04-20 Thread Rick Hillegas
ird option is, AFAIK, out of scope in my case. Marco. On Apr 20 2022, at 4:46 pm, Rick Hillegas wrote: I'm not an expert on using JPA. The following link suggests that there is a way to configure query timeout in an xml-formatted JPA configuration file: http://www.mastertheboss.com/hiberna

Re: query timeout

2022-04-20 Thread Rick Hillegas
the datasource with the minimum configuration possible : JdbcDriver org.apache.derby.jdbc.ClientDriver JdbcUrl jdbc:derby://database:1527/dbpromo;create=false UserName DBPROMO Password dbpromo Could it be that I am failing to activate something on the Derby side ? Thanks in advance Ma

Re: query timeout

2022-04-19 Thread Rick Hillegas
java.sql.Statement.setQueryTimeout(int) should do the trick. On 4/19/22 3:30 AM, Marco Ferretti wrote: Hi all, I am trying to simulate a query timeout in a stored procedure by simply adding a delay in my (test) jar. I then am launching the stored procedure in my java code via JPA and try to

Re: Problem with FOR UPDATE

2022-02-06 Thread Rick Hillegas
On 2/5/22 10:52 AM, John English wrote: On 05/02/2022 20:10, Rick Hillegas wrote: I don't think you need the FOR UPDATE clause. The following simpler code works for me: try (Statement updatable = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE

Re: Problem with FOR UPDATE

2022-02-05 Thread Rick Hillegas
I don't think you need the FOR UPDATE clause. The following simpler code works for me: import java.sql.*; public class Z {     private static final String SELECT_ALL = "SELECT * FROM t";     public static void main(String... args) throws Exception     {     Connection conn =

Re: Column is in more than one table?

2021-09-28 Thread Rick Hillegas
On 9/28/21 4:51 AM, John English wrote: If I issue the following query: SELECT t_time,facility FROM system_log,(SELECT time FROM system_log ORDER BY facility) AS x WHERE system_log.time=x.time I get an error: "Column name 'FACILITY' is in more than one table in the FROM list." Why does it

Re: Using indexes

2021-09-28 Thread Rick Hillegas
Glad that you have made progress on this puzzle. One comment inline... On 9/28/21 4:10 AM, John English wrote: A couple more data points, from testing different variants of the inner select: 1) SELECT time FROM system_log ORDER BY time DESC NULLS LAST FETCH NEXT 20 ROWS ONLY; 419ms,

Re: Using indexes

2021-09-26 Thread Rick Hillegas
On 9/25/21 11:59 AM, John English wrote: On 25/09/2021 21:14, Rick Hillegas wrote: On 9/25/21 7:39 AM, John English wrote: SELECT id,DateTimeFormat(time,null) AS t_time,name,username,facility,event,details FROM system_log ORDER BY id DESC NULLS LAST FETCH FIRST 20 ROWS ONLY; I can remember

Re: Using indexes

2021-09-25 Thread Rick Hillegas
On 9/25/21 7:39 AM, John English wrote: SELECT id,DateTimeFormat(time,null) AS t_time,name,username,facility,event,details FROM system_log ORDER BY id DESC NULLS LAST FETCH FIRST 20 ROWS ONLY; I can remember whether you tried to rewrite the query to use a subquery. Something like this:

Re: Case insensitive ORDER BY?

2021-08-21 Thread Rick Hillegas
0 will be sorted as 1,10,2." On Sat, Aug 21, 2021 at 8:34 AM Rick Hillegas wrote: Some responses inline... On 8/21/21 8:03 AM, John English wrote: On 20/08/2021 20:13, Rick Hillegas wrote: You could solve this problem with a custom character collation. See https://db.apac

Re: Case insensitive ORDER BY?

2021-08-21 Thread Rick Hillegas
Some responses inline... On 8/21/21 8:03 AM, John English wrote: On 20/08/2021 20:13, Rick Hillegas wrote: You could solve this problem with a custom character collation. See https://db.apache.org/derby/docs/10.15/devguide/cdevcollation.html Great! If you don't need to sort the embedded

Re: Case insensitive ORDER BY?

2021-08-20 Thread Rick Hillegas
You could solve this problem with a custom character collation. See https://db.apache.org/derby/docs/10.15/devguide/cdevcollation.html If you don't need to sort the embedded numbers, then the simplest solution is to create a database which uses a case-insensitive sort order. See

Re: Difficulty enforcing a table invariant

2021-08-11 Thread Rick Hillegas
Triggers sound like the right tool for the job. I can't offer any more specific advice. I don't understand why item_count and item_location_count are hard-coded into the tables rather than being constructed on the fly by queries. On 8/11/21 7:31 AM, Mark Raynsford wrote: Hello. I have the

Re: Self-study tutorial and permissions

2021-08-06 Thread Rick Hillegas
attention, given their plan to deprecate the security manager: https://openjdk.java.net/jeps/411 On 8/6/21 7:52 AM, Rick Hillegas wrote: I agree with Bryan that this looks like a platform-specific Open JDK bug. In your bug report, please include the version numbers for the Derby, Open JDK

Re: Self-study tutorial and permissions

2021-08-06 Thread Rick Hillegas
the next exception for details. Fri Aug 06 10:14:54 AEST 2021 Thread[DRDAConnThread_2,5,main] (DATABASE = seconddb), (DRDAID = {1}), Startup failed due to an exception. See next exception for details. Fri Aug 06 10:14:54 AEST 2021 Thread[DRDAConnThread_2,5,main] (DATABASE = seconddb), (DRDAID = {1}

Re: Self-study tutorial and permissions

2021-08-05 Thread Rick Hillegas
("java.lang.RuntimePermission" "getenv.SOURCE_DATE_EPOCH"): java.security.AccessControlException'. I'll post the stack trace too if you need it. Thanks Art On Fri, 6 Aug 2021 at 00:36, Rick Hillegas wrote: Using Derby 10.15.2.0 and Open JDK 11 (build 11+28) on Mac OSX 11.2.3, I get good, e

Re: Self-referential foreign key

2021-06-28 Thread Rick Hillegas
You're welcome to log an issue. Thanks. On 6/28/21 6:30 AM, John English wrote: On 23/03/2021 17:06, Rick Hillegas wrote: This may help: https://stackoverflow.com/questions/29297043/on-delete-set-null-on-self-referencing-relationship I solved this with triggers, as suggested. Problem

Re: Derby Encryption Verification

2021-06-18 Thread Rick Hillegas
Look in the service.properties file in the top level of the database directory tree. You should see several encryption properties with names like the following:   encryptionKeyLength   encryptionAlgorithm   derby.encryptionBlockSize   encryptedBootPassword   data_encrypt_algorithm_version  

Re: DBSeeder Version 2.9.0

2021-06-05 Thread Rick Hillegas
On 6/5/21 2:18 AM, Walter Weinmann wrote: We are happy to announce that version 2.9.0 of DBSeeder ( https://github.com/KonnexionsGmbH/db_seeder) is now available for general use. DBSeeder also supports the latest version of Apache Derby (10.15.2.0). Thanks, Walter. This looks like a very

Re: Index Corruption

2021-04-16 Thread Rick Hillegas
Please see my responses on DERBY-7113 and continue the discussion there if necessary. Thanks. On 4/16/21 1:22 AM, Geraldine McCormack wrote: Hi Folks - I have opened this new issue and am wondering if others have seen it, and if there are any mitigations to prevent this from happening :

Re: Self-referential foreign key

2021-03-23 Thread Rick Hillegas
This may help: https://stackoverflow.com/questions/29297043/on-delete-set-null-on-self-referencing-relationship On 3/23/21 6:09 AM, John English wrote: I have a table in which I want to include a self-referential foreign key to the same table:   CREATE TABLE x (     id  INTEGER  GENERATED

Re: Embedded database, authentication, and derby.system.home

2021-03-23 Thread Rick Hillegas
to and starting an embedded database. There's no SQL at play since it's the connecting and starting that's failing. If I can reproduce it with ij I'll let you know. -Original Message- From: Rick Hillegas Sent: Monday, March 22, 2021 1:09 PM To: derby-user@db.apache.org Subject: Re: Embedded

Re: Embedded database, authentication, and derby.system.home

2021-03-22 Thread Rick Hillegas
original database, I DO experience the error as demonstrated above. Unfortunately, I do not remember which version of Derby I used to create the original database, but obviously it was an older version. So perhaps this has something to do with an older database version? Mike From: Rick Hillegas

Re: Embedded database, authentication, and derby.system.home

2021-03-19 Thread Rick Hillegas
by.system.home doesn't seem to matter. -Original Message- From: Rick Hillegas Sent: Friday, March 19, 2021 11:22 AM To: derby-user@db.apache.org Subject: Re: Embedded database, authentication, and derby.system.home Hi Mike, What kind of authentication are you using: LDAP, NATIVE,

Re: Embedded database, authentication, and derby.system.home

2021-03-19 Thread Rick Hillegas
Hi Mike, What kind of authentication are you using: LDAP, NATIVE, or custom? On 3/19/21 7:05 AM, Michael Remijan wrote: Greetings, I have an interesting issue I just ran into and it took a little while to debug and figure out exactly what is happening. I have a project that uses an embedded

Re: How to disable detailed logging/buffer dumps?

2021-03-10 Thread Rick Hillegas
These look like network trace messages. Has someone set the following system property:   derby.drda.traceAll=true See the section on drda properties in the Admin Guide: https://db.apache.org/derby/docs/10.15/adminguide/tadminconfigsettingnetwrokserverproperties.html On 3/9/21 10:50 PM,

Re: dropping index dead lock

2021-02-15 Thread Rick Hillegas
Derby DDL is a heavy-weight operation. CREATE/DROP statements invalidate the in-memory metadata cache, effectively seizing a database-wide lock on the cache. Applications which perform a lot of DDL at steady-state will perform badly. I don't have any better advice than to recommend that you

Re: Out-of-memory errors

2021-02-15 Thread Rick Hillegas
scan. I don't understand why the subquery plan is so convoluted. However, it looks like you eliminated the memory-exhausting sort. On 2/15/21 8:49 AM, John English wrote: On 09/02/2021 18:05, Rick Hillegas wrote: As Bryan points out, please consult the Tuning Guide for information on how to view

Re: Slow mount times

2021-02-15 Thread Rick Hillegas
way to check if you are going to run database recovery at boot time by looking into logs subfolder. If you gracefully shut down, there are only two log files. If there are more your database will perform roll forward recovery, in worst case applying all the log files. *From:* Rick Hillegas

Re: Out-of-memory errors

2021-02-10 Thread Rick Hillegas
The index key (time desc, username, name, facility, event, sector, item, details) could potentially be 32867 bytes long. However, an index key must be less than 1/2 the page size, according to the "Page size and key size" topic at https://db.apache.org/derby/docs/10.15/ref/rrefsqlj20937.html

Re: Out-of-memory errors

2021-02-09 Thread Rick Hillegas
On 2/9/21 8:21 AM, John English wrote: On 09/02/2021 18:05, Rick Hillegas wrote: As Bryan points out, please consult the Tuning Guide for information on how to view your query plan. In any event, your descending index is not a covering index. That is, it does not contain all of the columns

Re: Out-of-memory errors

2021-02-08 Thread Rick Hillegas
The MergeInserter is doing a merge sort because there is no usable descending index on system_log.time. The storage layer's page cache (the ConcurrentCache) is filling up because you have to fault-in the entire contents of system_log. The logic in MergeInserter.insert() does not seem to be

Re: Slow mount times

2021-02-07 Thread Rick Hillegas
/6/21 6:53 PM, Alex O'Ree wrote: Thanks i'll give it a shot. Is there any logging in derby that i can enable into regarding this? On Sat, Feb 6, 2021 at 7:08 PM Rick Hillegas wrote: The usual cause for this behavior is that the application was brought down ungracefully, say via a control-c

Re: Slow mount times

2021-02-06 Thread Rick Hillegas
The usual cause for this behavior is that the application was brought down ungracefully, say via a control-c or by killing the window where it was running. The engine then needs to reconstruct the state of the database by replaying many recovery logs. To gracefully exit Derby, you need to

Re: AW: AW: Paging performance problem

2021-01-05 Thread Rick Hillegas
ed records from the table. I hope I could explain the magic behind it a little bit, so helps others who may come across similar issues. Best regards, Gerrit -----Ursprüngliche Nachricht- Von: Rick Hillegas Gesendet: Montag, 4. Januar 2021 16:43 An: Derby Discussion ; Hohl, Gerrit Betr

Re: AW: Paging performance problem

2021-01-04 Thread Rick Hillegas
Hi Gerrit, It's hard to say without seeing the query plans for these scenarios. What query plans do you see when you follow the instructions in the "Working with RunTimeStatistics" section of the Derby Tuning Guide: http://db.apache.org/derby/docs/10.15/tuning/ctundepth13055.html -Rick On

Re: AW: Indexes grow over time insanly big and can't be shrunk

2020-09-19 Thread Rick Hillegas
, Gerrit -Ursprüngliche Nachricht- Von: Hohl, Gerrit Gesendet: Mittwoch, 16. September 2020 09:21 An: Rick Hillegas Betreff: AW: Indexes grow over time insanly big and can't be shrunk Hello Rick, thanks for your reply. A1) SELECT * FROM TABLE(SYSCS_DIAG.SPACE_TABLE()) AS x WHERE

Re: Indexes grow over time insanly big and can't be shrunk

2020-09-15 Thread Rick Hillegas
Hi Gerrit, I don't have a theory about what caused this problem. Maybe COMPRESS_TABLE() has a serious bug. A couple questions: Q1) Do you have the results of SPACE_TABLE() for this situation? Q2) What value did you specify for the SEQUENTIAL argument of COMPRESS_TABLE()? Q3) Other than

Re: database in a jar : conglomerate does not exists

2020-09-15 Thread Rick Hillegas
, then creating the table and populating it Solved the problem. Archiving the database in a jar was not the reason. Cheers François -Original Message- From: Rick Hillegas Sent: 12 September 2020 18:13 To: RAPPAZ Francois Cc: derby-user@db.apache.org Subject: Re: database in a jar

Re: database in a jar : conglomerate does not exists

2020-09-12 Thread Rick Hillegas
("jdbc:derby:classpath:docentries"); François -Original Message----- From: Rick Hillegas Sent: 11 September 2020 00:49 To: Derby Discussion ; RAPPAZ Francois Subject: Re: database in a jar : conglomerate does not exists Also, look inside the jar file for a directory called docentries/

Re: database in a jar : conglomerate does not exists

2020-09-12 Thread Rick Hillegas
nge for years.) François -Original Message----- From: Rick Hillegas Sent: 11 September 2020 00:49 To: Derby Discussion ; RAPPAZ Francois Subject: Re: database in a jar : conglomerate does not exists Also, look inside the jar file for a directory called docentries/seg0. Does it contain a file ca

Re: database in a jar : conglomerate does not exists

2020-09-10 Thread Rick Hillegas
Also, look inside the jar file for a directory called docentries/seg0. Does it contain a file called c560.dat? On 9/10/20 8:53 AM, Rick Hillegas wrote: Sorry. Make that query: SELECT s.schemaName, t.tableName, c.conglomerateName FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t

Re: database in a jar : conglomerate does not exists

2020-09-10 Thread Rick Hillegas
Sorry. Make that query: SELECT s.schemaName, t.tableName, c.conglomerateName FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t WHERE c.conglomerateNumber = 1376 AND c.tableID = t.tableID AND t.schemaID = s.schemaID ; On 9/10/20 8:22 AM, Rick Hillegas wrote: Hi François, Do

Re: database in a jar : conglomerate does not exists

2020-09-10 Thread Rick Hillegas
Hi François, Do you have any information or theories about how your database became corrupted? I have never encountered this situation before. A database in a jar file should be read-only, so the only theory I have is that the jar file itself was corrupted by some process outside Derby.

Re: Users suddenly denied database access - Connection authentication error.

2020-08-22 Thread Rick Hillegas
Hi Kerry, Thanks for that detailed explanation of your issue. The most likely problem is that your user passwords have expired. Check the value of the system property derby.authentication.native.passwordLifetimeMillis. The following command should get you that value:   VALUES

Re: best practice for jpa/integration tests

2020-08-08 Thread Rick Hillegas
Can't you to tell the object/relational mapping layer or the test framework to swallow certain errors? Note that an in-memory database can be dropped and recreated for each test case if you really need a blank slate. On 8/6/20 3:39 AM, Marco Ferretti wrote: Hi all, I have been struggling to

Re: So, Derby works...

2020-07-09 Thread Rick Hillegas
"sa" ); I have learned a great deal more about JDBC drivers than I had planned thanks to deciding to use Derby, replacing this old test mock and with your help which I hugely appreciate! Russ On 7/8/20 5:15 PM, Rick Hillegas wrote: It's hard to say what's going on, but the instabilit

Re: So, Derby works...

2020-07-08 Thread Rick Hillegas
It's hard to say what's going on, but the instability in your experiments is hard to reconcile against the deterministic code paths involved in JDBC autoloading. I can only speculate about what is causing this instability: 1) What JDBC URLs does your MockDriver claim to support? 2) Is

Re: Driver registration, Derby drivers and Derby versions

2020-07-08 Thread Rick Hillegas
Hi Russell, This is a little complicated because it involves a bit of history. Derby and Java grew up together. The core of Derby is the Cloudscape database engine, which appeared around 1996, close to the the appearance of Java itself. Two significant events in the evolution of Java have

Re: AW: AW: Questions about query execution and optimization

2020-07-06 Thread Rick Hillegas
tyle things: I guess you're talking about this here. https://db.apache.org/derby/docs/10.14/tuning/ctun_xplain_style.html Seems like a neat little project on its own... Regards, Gerrit -Ursprüngliche Nachricht- Von: Rick Hillegas Gesendet: Montag, 6. Juli 2020 14:54 An: Derby Discussion ; H

Re: AW: Questions about query execution and optimization

2020-07-06 Thread Rick Hillegas
Hi Gerrit, I suspect that your query performs poorly because your indexes do not cover the query. That means that you are selecting columns which don't appear in the indexes. In this case, the optimizer knows that Derby cannot satisfy the query by simply reading index pages. Derby also has

Re: How to migrate a Derby database?

2020-06-30 Thread Rick Hillegas
. Would be grateful to learn about any flaws in my assessment of this situation and many thanks for the help. ajax ... On 6/29/2020 6:40 PM, Rick Hillegas wrote: Hi Ajax, I don't know why you are not receiving email which I posted to the derby-user list. In any event, you can try posting your

Re: How to migrate a Derby database?

2020-06-29 Thread Rick Hillegas
an email addressed to Rick Hillegas. I'm able to do this because of his reply to my original post which was done by sending an email. It seems that I'm not able to respond to that reply via the website being used to send this message. I sort of thought your reply might have shown up in my inbox

Re: How to migrate a Derby database?

2020-06-28 Thread Rick Hillegas
Hi Ajax, Here are a couple points to consider: 0) Derby supports two kinds of upgrade: soft and hard. Soft-upgraded databases can be downgraded to previous releases of Derby (but not to a release earlier than the original version of the database). Hard-upgraded databases can not be

Re: java.sql.SQLException: No suitable driver found for jdbc:derby:memory:sampledb;create=true

2020-06-26 Thread Rick Hillegas
e. Further thoughts? On 6/25/20 5:01 PM, Russell Bateman wrote: Thank you; that's very kind. It now works. (I'm not using DataSources for now.) I greatly appreciate your help. Best regards, Russ On 6/25/20 4:48 PM, Rick Hillegas wrote: The 10.15 family of releases introduced a JPMS modularization

Re: java.sql.SQLException: No suitable driver found for jdbc:derby:memory:sampledb;create=true

2020-06-25 Thread Rick Hillegas
The 10.15 family of releases introduced a JPMS modularization of Derby. That re-factored the code a bit. You will need to add derbyshared.jar to the classpath and build dependencies. If you are using DataSources, then you will also need to add derbytools.jar. Please see the detailed release

Re: Is create=true thread-safe?

2020-03-20 Thread Rick Hillegas
The first thread which gets through will create the database and the others will block until the first thread finishes. I am not aware of any thead safety issues here. Do you have a test case which suggests otherwise? Thanks, -Rick On 3/19/20 10:24 PM, Behrang Saeedzadeh wrote: Hi, Is the

Re: I don't find the JDBC driver class in derbyclient.jar

2020-03-05 Thread Rick Hillegas
on turned off. The default schema (and username) is APP (without a password). I am surprised that you were not able to connect without a username and password. Can you share the details of how you are connecting? Thanks, -Rick Richard Le 05/03/2020 à 00:53, Rick Hillegas a écrit : H

Re: I don't find the JDBC driver class in derbyclient.jar

2020-03-04 Thread Rick Hillegas
Hey Richard, The drivers moved into derbytools.jar as part of the JPMS modularization work introduced by the previous feature release (10.15.1.3). In addition to derbyclient.jar, you will need to put derbyshared.jar and derbytools.jar on your client-side classpath or modulepath. Please see

[ANNOUNCE] Apache Derby 10.15.2.0 released

2020-02-29 Thread Rick Hillegas
The Apache Derby project is pleased to announce maintenance release 10.15.2.0. Apache Derby is a sub-project 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

Re: Derby newbie - error seen creating 'seconddb' thru ij for network-server Derby

2019-11-08 Thread Rick Hillegas
A basic server policy (which you should customize) can be found in the Derby Security Guide at http://db.apache.org/derby/docs/10.15/security/rsecbasicserver.html It is also located in the bin distribution at demo/templates/serverTemplate.policy. Hope this helps, -Rick On 11/8/19 2:26 AM,

Re: Database maintenance routines

2019-11-05 Thread Rick Hillegas
On 11/5/19 4:03 AM, Alex O'Ree wrote: I have a use case where by I add a bunch of rows, export then in an archive, then delete all the rows and repeat for weeks or months on end. Are there any maintenance procedures I should be running after each purge? Postgres and mssql has some functions to

Re: Derby driver class name v10.15.1.3

2019-10-22 Thread Rick Hillegas
Thanks for this discussion, Kerry and Jerry. Please file a docs bug and suggest how this can be described better. You are right, it is the modularization of Derby which broke this behavior for you. Before modularization, the two drivers (embedded and network) lived in the same package but

Re: OSGi manifest headers

2019-10-17 Thread Rick Hillegas
On 10/17/19 3:04 AM, Mark Raynsford wrote: Hello! Derby is now fully modularized in the JPMS sense, but I notice that there's a rather glaring lack of OSGi manifest headers. This means that Derby can't be used in an OSGi environment. Is there any chance of getting Bnd or the

Re: Infinite loop - stack overflow

2019-10-07 Thread Rick Hillegas
Hi Geraldine, I have logged https://issues.apache.org/jira/browse/DERBY-7055 to track this issue. If you discover a repro, please update that issue. Thanks, -Rick On 10/4/19 7:12 AM, Geraldine McCormack wrote: I can certainly log the issue but I do not know how to recreate it

Re: [derby] searching within a blob

2019-10-01 Thread Rick Hillegas
wrote: yup, definitely a blob. it looks like the like operator doesnt work for blobs, or maybe i need a cast or some function to the conversion On Mon, Sep 30, 2019 at 6:50 PM Rick Hillegas wrote: On 9/30/19 9:18 AM, Alex O'Ree wrote: I have a use case where i have string data stored in a blob

Re: [derby] searching within a blob

2019-09-30 Thread Rick Hillegas
On 9/30/19 9:18 AM, Alex O'Ree wrote: I have a use case where i have string data stored in a blob and i want to perform a query similar to select * from table where column1 like '%hello world%' It doesn't look like this is possible with derby out of the box. Is there a way to create a function

Re: Constants for CHAR() FOR BIT DATA?

2019-09-28 Thread Rick Hillegas
On 9/28/19 2:11 AM, Mark Raynsford wrote: create table core.users ( user_idchar (16) for bit data not null, user_password_hash_algovarchar (64) not null, user_password_hash varchar (64) not null, user_email varchar (128) not null,

Re: Do triggers block?

2019-09-15 Thread Rick Hillegas
The statement.execute() method will not return until all triggered actions complete. If the trigger invokes a user-written java method, then the trigger will not finish executing until the method returns. All of the transactional work done by the statement operates within a savepoint. That

Re: Calling a java function from a trigger

2019-09-12 Thread Rick Hillegas
You don't need the schema name in the EXTERNAL NAME clause. The INSTALL_JAR and SYSCS_SET_DATABASE_PROPERTY calls wire together a custom classpath for your database. All of the classes in the installed jar files will appear to your database session as though they are on your classpath. So you

Re: Calling a java function from a trigger

2019-09-12 Thread Rick Hillegas
Your sample program needs some tweaking: 1) The CREATE TRIGGER statement needs a REFERENCING clause in order to bind a new row transition variable. That is why you are getting the error 'Column name 'TEST' appears in a statement without a FROM list' 2) After that, you will run into a further

  1   2   3   4   5   6   7   8   9   10   >