|
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
|
|
From: Kumar S. <ku...@ho...> - 2003-12-05 03:20:40
|
I had also got a similar error a couple of days ago. But I noticed that when
I moved the main method to another class containing just the main method, it
worked fine. Try it out and let us know if this workaround works for you or
was it just something specific to my setup.
Thanks,
Kumar
----- Original Message -----
From: "Jos Martin" <jos...@ho...>
To: <wra...@li...>
Sent: Thursday, December 04, 2003 11:58 AM
Subject: [Wrapper-user] Security errors with the wrapper and Jini
> 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
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
|
|
From: Leif M. <le...@ta...> - 2003-12-10 14:49:54
|
Jos, This looks like a problem with your policy file. I cover this very briefly on the following page: http://wrapper.tanukisoftware.org/doc/english/faq.html Try specifying the wrapper's jar file explicitly as follows: // Give Wrapper classes full permissions grant codeBase "file:../lib/wrapper.jar" { permission java.security.AllPermission; }; That has worked for me in the past with RMI. As I said in that thread you mentioned. Placing the wrapper.jar into the Java ext directory ill work because the jar will be views as one of the JVM's own privileged jars. But doing that is not advised. For a number of reasons, it is best to do everything possible to avoid changing the contents of the JVM's directory. It will lead to all kind of problems when other programs are run using that JVM, and it makes installing the app on other machines that much more complicated. Post back with results. Cheers, Leif Jos Martin wrote: > 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 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |