Not sure if I’m doing things 100% right.
I tried to extend a java class java.lang.SecurityManager and then
install it for the JVM (System.setSecurityManager) - I’ve expected for
this to work
class JRubySecurityManager < java.lang.SecurityManager
def checkPermission( perm )
java.lang.System.setSecurityManager( JRubySecurityManager.new )
This file has been truncated.
# from 1.6.0.RC3 (it's about the same on 1.5.6)
JavaClass.java:835:in `installClassFields': java.lang.NullPointerException
from JavaClass.java:702:in `setupProxy'
from Java.java:524:in `createProxyClass'
from Java.java:453:in `getProxyClass'
from Java.java:362:in `getInstance'
from JavaUtil.java:160:in `convertJavaToUsableRubyObject'
from JavaProxyConstructor.java:220:in `invoke'
from null:-1:in `checkPermission'
from SecurityManager.java:871:in `checkRead'
but it didn’t - same result for 1.5.6 as well as 1.6.0.RC3 !
Is this a JRuby bug or is the java support not that mature or is it just
me doing something wrong ?
Not really an answer, but I notice that it isn’t even managing to invoke
What line of that script is it failing on - Is it the definition of that
JRubySecurityManager class, or when you invoke .new?
On Wed, 2011-03-09 at 12:03 +0100, Karol B. wrote:
me doing something wrong
Developer @ Media Service Provider
+44 207 729 4797
right maybe it’s not clear at first :
JRubySecurityManager.new is OK
what fails is the
java.lang.System.setSecurityManager with the new
if I understand correctly JRuby attempts to create a proxy for the first
checkPermission call (triggered by
while doing so another security manager check is triggered (
and it fails …