[ 
https://issues.apache.org/jira/browse/SLING-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970611#action_12970611
 ] 

Michael Dürig commented on SLING-1895:
--------------------------------------

I'm seeing this right away every time. However whether this results to 'a few 
calls' internally or not I cannot say at this stage. Furthermore the issue you 
mention should have been fixed with framework-3.0.2 (FELIX-2421). 

I'll check whether adding only sun.reflect is sufficient and let you know. 

I see 3 ways to handle this:

1. add the required packages to boot delegation
2. close as wont fix and open an issue for the Scala scripting engine adding 
the boot delegation solution as a work around instructions
3. further investigate the source of the issue and fix it (probably in Felix)

> sun.reflect.MethodAccessorImpl not correctly boot delegated
> -----------------------------------------------------------
>
>                 Key: SLING-1895
>                 URL: https://issues.apache.org/jira/browse/SLING-1895
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions:  Launchpad Base 2.2.0
>            Reporter: Michael Dürig
>
> When running the forum sample application (Scala) I'm getting
> java.lang.NoClassDefFoundError: sun/reflect/MethodAccessorImpl
>       at sun.misc.Unsafe.defineClass(Native Method)
>       at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
>       at 
> sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
>       at 
> sun.reflect.MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.java:59)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:28)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> By manually editing the sling.properties file in my sling folder:
> org.osgi.framework.bootdelegation=com.yourkit.*,sun.*,sun.com.*
> the error goes away. 
> Can we add the sun packages to boot delegation by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to