Issue Details (XML | Word | Printable)

Key: DERBY-375
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Deepa Remesh
Reporter: A B
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Specification of incomplete server properties on command line causes NPE with NetworkServerControl when starting the server.

Created: 19/Jun/05 04:11 PM   Updated: 21/Oct/05 09:03 AM
Return to search
Component/s: Network Server
Affects Version/s: 10.1.1.0, 10.2.1.6
Fix Version/s: 10.1.2.1, 10.2.1.6

Time Tracking:
Issue & Sub-Tasks
Issue Only
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works derby-375.diff 2005-10-15 08:48 AM Deepa Remesh 11 kB
File Licensed for inclusion in ASF works derby-375.status 2005-10-15 08:48 AM Deepa Remesh 0.6 kB
Text File Licensed for inclusion in ASF works derbyall_report.txt 2005-10-15 08:48 AM Deepa Remesh 13 kB
Environment: Running Derby Network Server and using command line API to start the server.

Resolution Date: 21/Oct/05 09:02 AM

Sub-Tasks  All   Open   
No sub-tasks match this view.

 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Andrew McIntyre made changes - 30/Jun/05 05:50 AM
Field Original Value New Value
Fix Version/s 10.1.1.0 [ 10993 ]
Fix Version/s 10.2.0.0 [ 11187 ]
Affects Version/s 10.2.0.0 [ 11187 ]
Deepa Remesh made changes - 12/Oct/05 07:15 AM
Assignee Deepa Remesh [ deepa ]
Deepa Remesh made changes - 15/Oct/05 08:48 AM
Attachment derby-375.diff [ 12314891 ]
Attachment derbyall_report.txt [ 12314893 ]
Attachment derby-375.status [ 12314892 ]
A B made changes - 20/Oct/05 04:12 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
A B made changes - 20/Oct/05 04:13 AM
Status Resolved [ 5 ] Closed [ 6 ]
Deepa Remesh made changes - 21/Oct/05 06:48 AM
Status Closed [ 6 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
Deepa Remesh made changes - 21/Oct/05 06:52 AM
Fix Version/s 10.1.2.0 [ 12310270 ]
Deepa Remesh made changes - 21/Oct/05 09:02 AM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Deepa Remesh made changes - 21/Oct/05 09:03 AM
Status Resolved [ 5 ] Closed [ 6 ]