db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6828) Network Server don't start in czech localized enviroment due missing key DRDA_MissingNetworkJar.S
Date Sat, 13 Feb 2016 02:12:18 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145716#comment-15145716
] 

Bryan Pendleton commented on DERBY-6828:
----------------------------------------

The silence when derby.drda.debug is fall is apparently by design, 
witness this code in NetworkServerControlImpl.java:

    /**
     * Write an exception to console output stream,
     * but only if debugOutput is true.
     *
     * @param e exception
     */
    public void consoleExceptionPrint(Exception e)
    {
        if (debugOutput == true)
            consoleExceptionPrintTrace(e);

        return;
    }

We get to consoleExceptionPrint from the master exception handler in
NetworkServerControl.main:

            //if there was an error, exit(1)
            if ((e.getMessage() == null) ||
                !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
                printErrors
            )
            {
                if (server != null)
                    server.consoleExceptionPrint(e);
                else
                    e.printStackTrace();  // default output stream is System.out
            }
            // else, we've already printed a trace, so just exit.
            System.exit(1);

So although I agree with you that this is frustrating behavior, it's not new behavior.

Your other question is very interesting too, but I have to study it some more.

> Network Server don't start in czech localized enviroment due missing key DRDA_MissingNetworkJar.S
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6828
>                 URL: https://issues.apache.org/jira/browse/DERBY-6828
>             Project: Derby
>          Issue Type: Bug
>          Components: Localization, Network Server
>    Affects Versions: 10.11.1.1
>         Environment: Windows 7 Profesional SP1 64bit (localized CS),
> java version "1.8.0_51"
> Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
> Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
>            Reporter: David Je┼żek
>            Priority: Minor
>              Labels: easyfix
>         Attachments: nullGuard.diff
>
>
> Network Server don't start in czech localized enviroment due missing key DRDA_MissingNetworkJar.S
in file org/apache/derby/loc/drda/messages_cs.properties
> Exception:
> Thu Jul 23 15:56:24 CEST 2015 : null
> java.lang.NullPointerException
>         at org.apache.derby.iapi.tools.i18n.LocalizedResource.getTextMessage(Unknown
Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.localizeMessage(Unknown
Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.localizeMessage(Unknown
Source)
>         at org.apache.derby.drda.NetworkServerControl.installSecurityManager(Unknown
Source)
>         at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)
> Missing key is called in file org.apache.derby.drda.NetworkServerControl.java at line
818.
> Reproduce under windows in console run:
> set DERBY_OPTS=-Duser.language=cs
> startNetworkServer.bat
> Workaround:
> Run derby server under en localization.
> Windows consola run:
> set DERBY_OPTS=-Duser.language=en
> startNetworkServer.bat



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message