db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Byford" <p_byf...@hotmail.com>
Subject networkserver security manager issue
Date Sun, 06 Nov 2005 20:55:00 GMT
hi,
I would appreciate if anyone can help with the following issue. I am 
attempting to run the derby network server with a security manager policy. 
when i run without a policy everything works fine. it starts, i can connect 
to databases, retrieve data etc. However when i attempt to start with a 
ploicy i obtain an exception.

The steps I take are;

1. run the setnetworkservercp.bat and get output;
F:\Documents and Settings\paul byford>set 
CLASSPATH=f:\derby10\lib\derby.jar;f:\
derby10\lib\derbytools.jar;f:\derby10\lib\derbynet.jar;

which looks ok.

2. run my server startup command (i use windows xp);

java -Djava.security.manager -Djava.security.policy=f:/nwsvr.policy 
org.apache.derby.drda.NetworkServerControl start

3. the i get the following exception output;

java -Djava.security.manager -Djava.security.policy=f:/nwsvr.policy 
org.apache.derby.drda.NetworkServerControl start
Startup failed due to missing functionality for 
org.apache.derby.iapi.services.s
tream.InfoStreams. Please ensure your classpath includes the correct Derby 
software.
ERROR XBM02: Startup failed due to missing functionality for 
org.apache.derby.iapi.services.stream.InfoStreams. Please ensure your 
classpath includes the correc
t Derby software.
        at 
org.apache.derby.iapi.error.StandardException.newException(Unknown So
urce)
        at 
org.apache.derby.iapi.services.monitor.Monitor.missingImplementation(
Unknown Source)
        at 
org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow
n Source)
        at 
org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Unkn
own Source)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unkno
wn Source)
        at org.apache.derby.impl.services.monitor.FileMonitor.<init>(Unknown 
Sou
rce)
        at 
org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown S
ource)
        at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source)
        at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source)
        at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.startNetworkServe
r(Unknown Source)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(Unk
nown Source)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(Unkno
wn Source)
        at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)

Unexpected exception while loading Derby JDBC Driver:
No suitable driver

4. my policy file is saved at f:/nwsvr.policy and is as follows;

grant codeBase "file:f:/derby10/lib/-" {
permission java.io.FilePermission "${derby.system.home}${/}-","read, write, 
delete";
permission java.io.FilePermission "${user.dir}${/}-", "read, write,delete";
permission java.util.PropertyPermission "derby.*", "read";
permission java.util.PropertyPermission "user.dir", "read";
permission java.lang.RuntimePermission "createClassLoader";
};

grant codeBase "file:f:/derby10/lib/-" {
permission java.net.SocketPermission "localhost", "accept, connect,resolve";
permission java.net.SocketPermission "127.0.0.1", "accept, connect,resolve";
permission java.net.SocketPermission "localhost:*", "accept, 
connect,resolve";
};

5. thats it
all the above are based upon the examples provided in the documentation. i 
thought it could be down to the way my environment is configured, or the 
policy file. at the moment i only wish to get this up and running on a local 
machine, but will deploy to a remote machine at a later date.

i found a similar post 
http://mail-archives.apache.org/mod_mbox/db-derby-user/200508.mbox/%3c2c4e58b1050809134552841122@mail.gmail.com%3e

which was solved by a change to the classpath. but as I understand my 
classpath is ok.

I ran java org.apache.derby.tools.sysinfo -cp se
rver

and got ;

FOUND IN CLASS PATH:

   Derby embedded engine library (derby.jar)


   Derby Network Server library (derbynet.jar)


SUCCESS: All Derby related classes found in class path.


thanks
Paul.



Mime
View raw message