db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering" <da...@vancouvering.com>
Subject Confusion about system properties
Date Tue, 25 Sep 2007 18:38:00 GMT
Hi, all.  I was trying to add information about where database
directories are stored for a given Network Server run by adding more
information to sysinfo.

As a first step, in NetworkServerImpl, I added the following:

  retval.put(Property.SYSTEM_HOME_PROPERTY,
  PropertyUtil.getSystemProperty(Property.SYSTEM_HOME_PROPERTY, ""));

The problem is, this *always* prints out the location where I started
the network server, even when I start the server with
-Dderby.system.home=/tmp.

I looked at the code, and if I understand it,
PropertyUtil.getSystemProperty() does the following:

- Try to get the system property from the VM
- If there is a security exception, return null
- Try to get the property from derby.properties

I have *no* derby.properties file, and I am pretty sure that getting
it from the system causes a security exception, so I'm a little
confused about what is happening here.

On another note, if you start up the network server in 10.3, it starts
with a basic security manager, and this causes all sorts of failures
when you run sysinfo (see below).  Is this really what we want to
happen?  What's the right way of fixing this?

Thanks,

David

exceptions from derby -jar derbyrun.jar server sysinfo:

------------------ Java Information ------------------
Java Version:    1.5.0_07
Java Vendor:     Apple Computer, Inc.
Java home:       Security Exception:
java.security.AccessControlException: access denied
(java.util.PropertyPermission java.home read)
Java classpath:  Security Exception:
java.security.AccessControlException: access denied
(java.util.PropertyPermission java.class.path read)
OS name:         Mac OS X
OS architecture: i386
OS version:      10.4.10
Java user name:  Security Exception:
java.security.AccessControlException: access denied
(java.util.PropertyPermission user.name read)
Java user home:  Security Exception:
java.security.AccessControlException: access denied
(java.util.PropertyPermission user.home read)
Java user dir:   Security Exception:
java.security.AccessControlException: access denied
(java.util.PropertyPermission user.dir read)
java.specification.name: Java Platform API Specification
java.specification.version: 1.5
--------- Derby Information --------
JRE - JDBC: J2SE 5.0 - JDBC 3.0
Unable to analyze class path: access denied
(java.util.PropertyPermission java.class.path read)

Mime
View raw message