Re: not getting proper database shutdown message in embedded mode
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: https://db.apache.org/derby/releases/release-10.15.1.3.html On 12/21/22 9:29 PM, Orange Trees wrote: Hello, Any further suggestions please where and what should I check? Regards, Orange From: Orange Trees Sent: 27 November 2022 12:35 To: Derby Discussion Subject: Re: not getting proper database shutdown message in embedded mode Hi, I investigated this even further. Derby DB version 10.14.2.0 is not having this problem. So in the same environment (LinuxMint 19, Java 17, NetBeans14) problems are at least with Derby DB 10.15.2.0 and 10.16.1.1. Thus I still unsure where exactly the problem is, is it NetBeans or Derby DB? Any help or hints appreciated. Anyway, as a workaround, I will stick with 10.14.2.0 for now until the issue is resolved. Regards, Orange
Re: not getting proper database shutdown message in embedded mode
Hello, Any further suggestions please where and what should I check? Regards, Orange From: Orange Trees Sent: 27 November 2022 12:35 To: Derby Discussion Subject: Re: not getting proper database shutdown message in embedded mode Hi, I investigated this even further. Derby DB version 10.14.2.0 is not having this problem. So in the same environment (LinuxMint 19, Java 17, NetBeans14) problems are at least with Derby DB 10.15.2.0 and 10.16.1.1. Thus I still unsure where exactly the problem is, is it NetBeans or Derby DB? Any help or hints appreciated. Anyway, as a workaround, I will stick with 10.14.2.0 for now until the issue is resolved. Regards, Orange
Re: not getting proper database shutdown message in embedded mode
Hi, I investigated this even further. Derby DB version 10.14.2.0 is not having this problem. So in the same environment (LinuxMint 19, Java 17, NetBeans14) problems are at least with Derby DB 10.15.2.0 and 10.16.1.1. Thus I still unsure where exactly the problem is, is it NetBeans or Derby DB? Any help or hints appreciated. Anyway, as a workaround, I will stick with 10.14.2.0 for now until the issue is resolved. Regards, Orange
Re: not getting proper database shutdown message in embedded mode
Hi, I investigated further. It is something related to my NetBeans IDE. When I run the test program from outside IDE it gives the correct result. But when I do this from IDE the result is as I posted in the previous message. Also, older projects, imported from the previous machine work fine. So I feel it is related to NetBeans project settings. I'm not sure where and what I should change in IDE (or maybe just reinstall it), so I continue my investigation. It seems all is good with Derby DB itself. Thanks for the hints. Regards, Orange
Re: not getting proper database shutdown message in embedded mode
Hi, thanks for looking into it! I executed your program and the result is: Default locale = en_US 08006.D : [0] memory:db I checked Language Settings for my Linux Mint, and Region was actually not US, so I changed everything to be US, restarted the machine and then re-executed your program (what actually gave the same result as when region was not US) [cid:fb941382-5d6e-4e71-9b2e-a1a80dea4358] Regards, Orange From: Rick Hillegas Sent: 25 November 2022 21:33 To: derby-user@db.apache.org Subject: Re: not getting proper database shutdown message in embedded mode 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) throws Exception { println("Default locale = " + Locale.getDefault()); Connection conn = DriverManager.getConnection("jdbc:derby:memory:db;create=true"); conn.prepareStatement("CREATE TABLE t (a INT, b INT)").execute(); try { DriverManager.getConnection("jdbc:derby:memory:db;shutdown=true"); } catch (Exception ex) { println(ex.getMessage()); } } private static void println(String text) { System.out.println(text); } } I see the following output when I run a script which prints out the java version and the classpath and then runs the program: openjdk version "17" 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing) CLASSPATH = /Users/rhillegas/derby/upgradeReleases/10.15.2.0/derby.jar:/Users/rhillegas/derby/upgradeReleases/10.15.2.0/derbyshared.jar:/Users/rhillegas/derby/upgradeReleases/10.15.2.0/derbytools.jar:/Users/rhillegas/src Default locale = en_US Database 'memory:db' shutdown. On 11/25/22 4:33 AM, Orange Trees wrote: Hello, For some reason for my newly created database in embedded mode after issuing shutdown command getConnection("jdbc:derby:" + + ";shutdown=true") I'm not getting the message 'Database shutdown.' (as it was for my previous projects) but instead I'm getting this message: 08006.D : [0] SQL State and error codes are inline (08006 and 45000). I tried with Derby versions 10.15.2.0 and 10.16.1.1. Also executing the included SimpleApp.java demo program gives the same result. For my project I'm including these jars: derby.jar derbyshared.jar derbytools.jar Also tried derbyoptionaltools.jar with no help. Tried several times, deleting and recreating databases etc. Using Linux Mint with OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8) (by the way in this environment my old databases return the correct/expected message) What could be the issue? Regards, Orange
Re: not getting proper database shutdown message in embedded mode
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) throws Exception { println("Default locale = " + Locale.getDefault()); Connection conn = DriverManager.getConnection("jdbc:derby:memory:db;create=true"); conn.prepareStatement("CREATE TABLE t (a INT, b INT)").execute(); try { DriverManager.getConnection("jdbc:derby:memory:db;shutdown=true"); } catch (Exception ex) { println(ex.getMessage()); } } private static void println(String text) { System.out.println(text); } } I see the following output when I run a script which prints out the java version and the classpath and then runs the program: openjdk version "17" 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing) CLASSPATH = /Users/rhillegas/derby/upgradeReleases/10.15.2.0/derby.jar:/Users/rhillegas/derby/upgradeReleases/10.15.2.0/derbyshared.jar:/Users/rhillegas/derby/upgradeReleases/10.15.2.0/derbytools.jar:/Users/rhillegas/src Default locale = en_US Database 'memory:db' shutdown. On 11/25/22 4:33 AM, Orange Trees wrote: Hello, For some reason for my newly created database in embedded mode after issuing shutdown command getConnection("jdbc:derby:" + + ";shutdown=true") I'm not getting the message 'Database shutdown.' (as it was for my previous projects) but instead I'm getting this message: 08006.D : [0] SQL State and error codes are inline (08006 and 45000). I tried with Derby versions 10.15.2.0 and 10.16.1.1. Also executing the included SimpleApp.java demo program gives the same result. For my project I'm including these jars: derby.jar derbyshared.jar derbytools.jar Also tried derbyoptionaltools.jar with no help. Tried several times, deleting and recreating databases etc. Using Linux Mint with OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8) (by the way in this environment my old databases return the correct/expected message) What could be the issue? Regards, Orange