
| Key: |
DERBY-375
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Deepa Remesh
|
| Reporter: |
A B
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
Time Tracking:
Issue & Sub-Tasks
Issue Only
Issue & Sub-Tasks
Issue Only
|
|
|
|
File Attachments:
|
|
|
Environment:
|
Running Derby Network Server and using command line API to start the server.
|
|
| Resolution Date: |
21/Oct/05 09:02 AM
|
|
No sub-tasks match this view.
|
|
|
|
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.
|
|
Description
|
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. |
Show » |
| Repository |
Revision |
Date |
User |
Message |
| ASF |
#326289 |
Tue Oct 18 22:58:08 UTC 2005 |
djd |
DERBY-375 DERBY-613
Fix test failure for derbynet/getCurrentProperties.java
1. Removes the following permission from derbynet.jar and classes
directory. This is not required after the patch for DERBY-375.
permission java.io.FilePermission "${user.dir}${/}*", "write";
2. Grants the following permission to derbynet.jar. This is required
since tracing file location now defaults to ${derby.system.home}. The
test derbynet/getCurrentProperties.java uses this.
// tracing files default to derby.system.home,
derbynet/getCurrentProperties.java
permission java.io.FilePermission "${derby.system.home}${/}*", "write";
3. Grants the following permission to derbynet.jar and classes
directory. This is required by the test jdbcapi/secureUsers1.sql when
run using sane builds.
// sane=true, jdbcapi/secureUsers1.sql
permission java.io.FilePermission "${user.dir}${/}CloudLDAP.out", "write";
Contributed by Deepa Remesh dremesh@gmail.com
|
| Files Changed |
MODIFY
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
|
|