[jira] Updated: (DERBY-3142) sysinfo ignores derby.ui.locale
[ https://issues.apache.org/jira/browse/DERBY-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3142: -- Attachment: d3142-2a.diff Updated patch to resolve conflict with DERBY-2903. > sysinfo ignores derby.ui.locale > --- > > Key: DERBY-3142 > URL: https://issues.apache.org/jira/browse/DERBY-3142 > Project: Derby > Issue Type: Bug > Components: Localization, Tools >Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0 >Reporter: Knut Anders Hatlen >Assignee: Knut Anders Hatlen >Priority: Minor > Attachments: d3142-1.diff, d3142-2.diff, d3142-2a.diff > > > Sysinfo messages are localized using the system's default locale instead of > the locale specified by derby.ui.locale. > Example: > $ java -Dderby.ui.locale=de_DE -jar derbyrun.jar sysinfo|head > > -- Java Information -- > Java Version:1.6.0_01 > Java Vendor: Sun Microsystems Inc. > Java home: /usr/jdk/instances/jdk1.6.0/jre > Java classpath: derbyrun.jar > OS name: SunOS > OS architecture: x86 > OS version: 5.11 > Java user name: kah > Java user home: /home/kah > Setting the default locale works correctly: > $ LC_ALL=de_DE.UTF-8 java -jar derbyrun.jar sysinfo|head > -- Java-Informationen -- > Java-Version: 1.6.0_01 > Java-Anbieter: Sun Microsystems Inc. > Java-Home: /usr/jdk/instances/jdk1.6.0/jre > Java-Klassenpfad: derbyrun.jar > Name des Betriebssystems: SunOS > Architektur des Betriebssystems: x86 > Betriebssystemversion: 5.11 > Java-Benutzername: kah > Java-Benutzerausgangsverzeichnis: /home/kah -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3142) sysinfo ignores derby.ui.locale
[ https://issues.apache.org/jira/browse/DERBY-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3142: -- Derby Info: [Patch Available] > sysinfo ignores derby.ui.locale > --- > > Key: DERBY-3142 > URL: https://issues.apache.org/jira/browse/DERBY-3142 > Project: Derby > Issue Type: Bug > Components: Localization, Tools >Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0 >Reporter: Knut Anders Hatlen >Assignee: Knut Anders Hatlen >Priority: Minor > Attachments: d3142-1.diff, d3142-2.diff, d3142-2a.diff, > d3142-with-test.diff, d3142-with-test.stat > > > Sysinfo messages are localized using the system's default locale instead of > the locale specified by derby.ui.locale. > Example: > $ java -Dderby.ui.locale=de_DE -jar derbyrun.jar sysinfo|head > > -- Java Information -- > Java Version:1.6.0_01 > Java Vendor: Sun Microsystems Inc. > Java home: /usr/jdk/instances/jdk1.6.0/jre > Java classpath: derbyrun.jar > OS name: SunOS > OS architecture: x86 > OS version: 5.11 > Java user name: kah > Java user home: /home/kah > Setting the default locale works correctly: > $ LC_ALL=de_DE.UTF-8 java -jar derbyrun.jar sysinfo|head > -- Java-Informationen -- > Java-Version: 1.6.0_01 > Java-Anbieter: Sun Microsystems Inc. > Java-Home: /usr/jdk/instances/jdk1.6.0/jre > Java-Klassenpfad: derbyrun.jar > Name des Betriebssystems: SunOS > Architektur des Betriebssystems: x86 > Betriebssystemversion: 5.11 > Java-Benutzername: kah > Java-Benutzerausgangsverzeichnis: /home/kah -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3142) sysinfo ignores derby.ui.locale
[ https://issues.apache.org/jira/browse/DERBY-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3142: -- Attachment: d3142-with-test.stat d3142-with-test.diff I have now added a test to the patch. Derbyall and suites.All ran cleanly. The test loads the sysinfo class in a separate class loader a number of times with different combinations of default locale and derby.ui.locale. A separate class loader was needed because the tools detect which locale they are running under the first time they are loaded, and they will not detect changes to the locale setting unless the classes are unloaded and then reloaded. Also, the test does not run under a security manager. The reason for this is that the test requires permission to create a class loader. I see in other tests (such as AggregateClassLoadingTest) that we don't want to grant that permission to derbyTesting.jar since then no tests fail if code in derby.jar forgets to use privileged blocks when creating class loaders. > sysinfo ignores derby.ui.locale > --- > > Key: DERBY-3142 > URL: https://issues.apache.org/jira/browse/DERBY-3142 > Project: Derby > Issue Type: Bug > Components: Localization, Tools >Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0 >Reporter: Knut Anders Hatlen >Assignee: Knut Anders Hatlen >Priority: Minor > Attachments: d3142-1.diff, d3142-2.diff, d3142-2a.diff, > d3142-with-test.diff, d3142-with-test.stat > > > Sysinfo messages are localized using the system's default locale instead of > the locale specified by derby.ui.locale. > Example: > $ java -Dderby.ui.locale=de_DE -jar derbyrun.jar sysinfo|head > > -- Java Information -- > Java Version:1.6.0_01 > Java Vendor: Sun Microsystems Inc. > Java home: /usr/jdk/instances/jdk1.6.0/jre > Java classpath: derbyrun.jar > OS name: SunOS > OS architecture: x86 > OS version: 5.11 > Java user name: kah > Java user home: /home/kah > Setting the default locale works correctly: > $ LC_ALL=de_DE.UTF-8 java -jar derbyrun.jar sysinfo|head > -- Java-Informationen -- > Java-Version: 1.6.0_01 > Java-Anbieter: Sun Microsystems Inc. > Java-Home: /usr/jdk/instances/jdk1.6.0/jre > Java-Klassenpfad: derbyrun.jar > Name des Betriebssystems: SunOS > Architektur des Betriebssystems: x86 > Betriebssystemversion: 5.11 > Java-Benutzername: kah > Java-Benutzerausgangsverzeichnis: /home/kah -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3142) sysinfo ignores derby.ui.locale
[ https://issues.apache.org/jira/browse/DERBY-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3142: -- Derby Info: (was: [Patch Available]) Fix Version/s: 10.4.0.0 Committed revision 597610. If this check-in doesn't cause any regression test failures the next few days, I intend to back-port it to 10.3. > sysinfo ignores derby.ui.locale > --- > > Key: DERBY-3142 > URL: https://issues.apache.org/jira/browse/DERBY-3142 > Project: Derby > Issue Type: Bug > Components: Localization, Tools >Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0 >Reporter: Knut Anders Hatlen >Assignee: Knut Anders Hatlen >Priority: Minor > Fix For: 10.4.0.0 > > Attachments: d3142-1.diff, d3142-2.diff, d3142-2a.diff, > d3142-with-test.diff, d3142-with-test.stat > > > Sysinfo messages are localized using the system's default locale instead of > the locale specified by derby.ui.locale. > Example: > $ java -Dderby.ui.locale=de_DE -jar derbyrun.jar sysinfo|head > > -- Java Information -- > Java Version:1.6.0_01 > Java Vendor: Sun Microsystems Inc. > Java home: /usr/jdk/instances/jdk1.6.0/jre > Java classpath: derbyrun.jar > OS name: SunOS > OS architecture: x86 > OS version: 5.11 > Java user name: kah > Java user home: /home/kah > Setting the default locale works correctly: > $ LC_ALL=de_DE.UTF-8 java -jar derbyrun.jar sysinfo|head > -- Java-Informationen -- > Java-Version: 1.6.0_01 > Java-Anbieter: Sun Microsystems Inc. > Java-Home: /usr/jdk/instances/jdk1.6.0/jre > Java-Klassenpfad: derbyrun.jar > Name des Betriebssystems: SunOS > Architektur des Betriebssystems: x86 > Betriebssystemversion: 5.11 > Java-Benutzername: kah > Java-Benutzerausgangsverzeichnis: /home/kah -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3142) sysinfo ignores derby.ui.locale
[ https://issues.apache.org/jira/browse/DERBY-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3142: -- Attachment: d3142-1.diff The attached patch seems to fix the problem. It loads the sysinfo's ResourceBundle through LocalizedResource and therefore gets the bundle localized for derby.ui.locale if it's set. I haven't written any new tests, and no tests have been run yet. > sysinfo ignores derby.ui.locale > --- > > Key: DERBY-3142 > URL: https://issues.apache.org/jira/browse/DERBY-3142 > Project: Derby > Issue Type: Bug > Components: Localization, Tools >Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0 >Reporter: Knut Anders Hatlen >Assignee: Knut Anders Hatlen >Priority: Minor > Attachments: d3142-1.diff > > > Sysinfo messages are localized using the system's default locale instead of > the locale specified by derby.ui.locale. > Example: > $ java -Dderby.ui.locale=de_DE -jar derbyrun.jar sysinfo|head > > -- Java Information -- > Java Version:1.6.0_01 > Java Vendor: Sun Microsystems Inc. > Java home: /usr/jdk/instances/jdk1.6.0/jre > Java classpath: derbyrun.jar > OS name: SunOS > OS architecture: x86 > OS version: 5.11 > Java user name: kah > Java user home: /home/kah > Setting the default locale works correctly: > $ LC_ALL=de_DE.UTF-8 java -jar derbyrun.jar sysinfo|head > -- Java-Informationen -- > Java-Version: 1.6.0_01 > Java-Anbieter: Sun Microsystems Inc. > Java-Home: /usr/jdk/instances/jdk1.6.0/jre > Java-Klassenpfad: derbyrun.jar > Name des Betriebssystems: SunOS > Architektur des Betriebssystems: x86 > Betriebssystemversion: 5.11 > Java-Benutzername: kah > Java-Benutzerausgangsverzeichnis: /home/kah -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3142) sysinfo ignores derby.ui.locale
[ https://issues.apache.org/jira/browse/DERBY-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3142: -- Attachment: d3142-2.diff Attaching an updated patch which also fixes the bug in LocalizedResource. All the tests ran cleanly. I'm not sure how to add a test for this bug. I know how to do it in the old test harness, but not in the new harness. The problem is that to run the tools (not only sysinfo) with different derby.ui.locale values, their classes need to be unloaded, since they store their locale and resource bundles in static fields. This means we either need a class-loader stunt or we need to spawn a new java process to run sysinfo. While spawning a process is not very difficult, making it portable is. If I remember correctly, the old harness contained lots of logic to make sure that the spawning of java processes worked correctly on all supported platforms (not all of which start java processes with a command named "java"). Suggestions would be welcome. > sysinfo ignores derby.ui.locale > --- > > Key: DERBY-3142 > URL: https://issues.apache.org/jira/browse/DERBY-3142 > Project: Derby > Issue Type: Bug > Components: Localization, Tools >Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0 >Reporter: Knut Anders Hatlen >Assignee: Knut Anders Hatlen >Priority: Minor > Attachments: d3142-1.diff, d3142-2.diff > > > Sysinfo messages are localized using the system's default locale instead of > the locale specified by derby.ui.locale. > Example: > $ java -Dderby.ui.locale=de_DE -jar derbyrun.jar sysinfo|head > > -- Java Information -- > Java Version:1.6.0_01 > Java Vendor: Sun Microsystems Inc. > Java home: /usr/jdk/instances/jdk1.6.0/jre > Java classpath: derbyrun.jar > OS name: SunOS > OS architecture: x86 > OS version: 5.11 > Java user name: kah > Java user home: /home/kah > Setting the default locale works correctly: > $ LC_ALL=de_DE.UTF-8 java -jar derbyrun.jar sysinfo|head > -- Java-Informationen -- > Java-Version: 1.6.0_01 > Java-Anbieter: Sun Microsystems Inc. > Java-Home: /usr/jdk/instances/jdk1.6.0/jre > Java-Klassenpfad: derbyrun.jar > Name des Betriebssystems: SunOS > Architektur des Betriebssystems: x86 > Betriebssystemversion: 5.11 > Java-Benutzername: kah > Java-Benutzerausgangsverzeichnis: /home/kah -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.