[ http://issues.apache.org/jira/browse/DERBY-375?page=comments#action_12331941 ]
Deepa Remesh commented on DERBY-375: ------------------------------------ The default values for network server properties mentioned in Derby Server and Administration Guide are: derby.drda.host - If no host name is specified, the Network Server listens on the loopback address of the current machine (localhost). derby.drda.keepAlive - true derby.drda.logConnections - false derby.drda.maxThreads - 1 derby.drda.minThreads - 1 derby.drda.portNumber - If no port number is specified, 1527 is the default. derby.drda.startNetworkServer - false derby.drda.timeSlice - 1 derby.drda.traceAll - false derby.drda.traceDirectory - If the derby.system.home property has been set, it is the default. Otherwise, the default is the current directory. derby.drda.debug - false However, in the code, default value of minThreads, maxThreads and timeSlice is '0'. In my patch too, I am using '0' as the default value for these. I also saw a test (maxThread.java) which tests default value of maxThreads as '0'. I think the document needs to be updated. Also, the property 'derby.drda.debug' is not listed in the admin guide. Is this an internal property not exposed to users? > Specification of incomplete server properties on command line causes NPE with > NetworkServerControl when starting the server. > ---------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-375 > URL: http://issues.apache.org/jira/browse/DERBY-375 > Project: Derby > Type: Bug > Components: Network Server > Versions: 10.2.0.0, 10.1.1.0 > Environment: Running Derby Network Server and using command line API to > start the server. > Reporter: A B > Assignee: Deepa Remesh > Fix For: 10.2.0.0 > > When using the command line to start the Network Server, there a couple of > cases where if a property is specified on the command line but no value is > given (ex. "-Dderby.drda.maxThreads" instead of "-Dderby.drda.maxThreads=3"), > a Null Pointer Exception will result, when the correct behavior should be to > use some kind of default. > For example: > > java -Dderby.drda.maxThreads org.apache.derby.drda.NetworkServerControl > > start -p 1528 > java.lang.NullPointerException > at > org.apache.derby.impl.drda.NetworkServerControlImpl.localizeMessage(NetworkServerControlImpl.java) > at > org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessageWork(NetworkServerControlImpl.java) > at > org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessage(NetworkServerControlImpl.java) > at > org.apache.derby.impl.drda.NetworkServerControlImpl.getIntPropVal(NetworkServerControlImpl.java) > at > org.apache.derby.impl.drda.NetworkServerControlImpl.getPropertyInfo(NetworkServerControlImpl.java) > at > org.apache.derby.impl.drda.NetworkServerControlImpl.<init>(NetworkServerControlImpl.java) > at > org.apache.derby.drda.NetworkServerControl.main(NetworkServerControl.java) > Note that even though we see this NPE, it appears that the server still > starts up, although the startup may not be complete (subsequent attempts to > connect might lead to errors like "Invalid reply from network server: > Insufficient data."). > For other properties, this will just result in the default value being used, > which is the correct behavior. For example: > > java -Dderby.drda.host org.apache.derby.drda.NetworkServerControl start -p > > 1528 > Server is ready to accept connections on port 1528. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
