Unsafe?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unsafe?

steve harris-7
I tried to use unsafe from beanshell and got the
following:

Caused by: Sourced file: inline evaluation of: ``
methods = sun.misc.Unsafe.getUnsafe();'' : Method
Invocation sun.misc.Unsafe.getUnsafe : at Line: 3 : in
file: inline evaluation of: ``  methods =
sun.misc.Unsafe.getUnsafe();'' : sun .misc .Unsafe
.getUnsafe ( )

Target exception: java.lang.SecurityException: Unsafe

        at bsh.BSHMethodInvocation.eval(Unknown
Source)
        at bsh.BSHPrimaryExpression.eval(Unknown
Source)
        at bsh.BSHPrimaryExpression.eval(Unknown
Source)
        at bsh.BSHAssignment.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at bsh.Reflect.invokeMethod(Unknown Source)
        at bsh.Reflect.invokeObjectMethod(Unknown
Source)
        at bsh.Name.invokeMethod(Unknown Source)
        at bsh.BSHMethodInvocation.eval(Unknown
Source)
        at bsh.BSHPrimaryExpression.eval(Unknown
Source)
        at bsh.BSHPrimaryExpression.eval(Unknown
Source)
        at bsh.BSHIfStatement.eval(Unknown Source)
        at bsh.BSHIfStatement.eval(Unknown Source)
        at bsh.BSHIfStatement.eval(Unknown Source)
        at bsh.BSHIfStatement.eval(Unknown Source)
        at bsh.BSHIfStatement.eval(Unknown Source)
        at bsh.BSHBlock.evalBlock(Unknown Source)
        at bsh.BSHBlock.eval(Unknown Source)
        at bsh.BshMethod.invokeImpl(Unknown Source)
        at bsh.BshMethod.invoke(Unknown Source)
        at bsh.BshMethod.invoke(Unknown Source)
        at bsh.This.invokeMethod(Unknown Source)
        at bsh.This.invokeMethod(Unknown Source)
        at bsh.XThis$Handler.invokeImpl(Unknown
Source)
        at bsh.XThis$Handler.invoke(Unknown Source)
        ... 27 more


I may just be doing something silly but does anyone
have a take on how to experiment with Unsafe
interactively in beanshell?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unsafe?

Daniel Wunsch
On Thursday 06 April 2006 01:59, steve harris wrote:
> I tried to use unsafe from beanshell and got the
> following:

> Target exception: java.lang.SecurityException: Unsafe

try setAccessibility(true);

daniel


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users