|
From: Jos M. <jos...@ho...> - 2003-12-04 19:58:47
|
I'm trying to use the java service wrapper to automatically start a number
of jini services on both NT and Linux. I've successfully managed to get the
java class server configured, but I've run into some problems with
jrmp-phoenix which is the replacement for RMID.
I'm using the WrapperSimpleApp starter and am receiving a
java.lang.IllegalAccessException error when the wrapper tries to invoke the
main method of phoenix.
This error appears very similar to one posted to this group on 2003-10-27
23:16 by Alan Parry thought the suggestion of incorrect jar placement in
that post doesn't apply here (I think).
To reduce the problem to use of WrapperSimpleApp I've executed the following
java ^
-cp lib\wrapper.jar;lib\start.jar;lib\phoenix.jar ^
-Djava.security.manager= ^
-Djava.security.policy=config\jsk-all.policy ^
org.tanukisoftware.wrapper.WrapperSimpleApp ^
com.sun.jini.start.ServiceStarter ^
config\start-jarserver.config
from a directory that contains lib and config. The jsk-all.policy file
contains
grant {
permission java.security.AllPermission;
};
And this sucessfully fires off the java class server
However
java ^
-cp lib\wrapper.jar;lib\start.jar;lib\phoenix.jar ^
-Djava.security.manager= ^
-Djava.security.policy=config\jsk-all.policy ^
-Dwrapper.debug="TRUE" ^
org.tanukisoftware.wrapper.WrapperSimpleApp ^
com.sun.jini.phoenix.Activation ^
config\jrmp-phoenix.config
which ought to do much the same with phoenix produces
Wrapper Manager: JVM #1
Wrapper Manager: Registering shutdown hook
Wrapper Manager: Not using wrapper. (key not specified)
Calling native initialization method.
Initializing WrapperManager native library.
Java Executable: F:\Adml\matlab\sys\java\jre\win32\jre1.4.2\bin\java.exe
Java Version : 1.4.2-b28 Java HotSpot(TM) Client VM
Java VM Vendor : Sun Microsystems Inc.
Wrapper (Version 3.0.5)
calling listener.start()
WrapperSimpleApp: start(args)
WrapperSimpleApp: invoking main method
WrapperSimpleApp: Encountered an error running main:
java.lang.IllegalAccessException: Class
org.tanukisoftware.wrapper.WrapperSimpleApp can not access a member of class
com.sun.jini.phoenix.Activatio
n with modifiers "public static"
java.lang.IllegalAccessException: Class
org.tanukisoftware.wrapper.WrapperSimpleApp can not access a member of class
com.sun.jini.phoenix.Activation with modifiers "public static"
at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:108)
at java.lang.Thread.run(Unknown Source)
WrapperSimpleApp: start(args) end. Main Completed=true, exitCode=1
Send a packet STOP : 1
Thread, main, handling the shutdown process.
Send a packet STOPPED : 0
calling System.exit(1)
I wonder if anyone has experience of what policy settings might have gone
wrong here?
Many Thanks
Jos
_________________________________________________________________
Tired of 56k? Get a FREE BT Broadband connection
http://www.msn.co.uk/specials/btbroadband
|