You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2010/12/10 18:25:01 UTC

[jira] Created: (SLING-1895) sun.reflect.MethodAccessorImpl not correctly boot delegated

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: Scripting
            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.


[jira] Commented: (SLING-1895) sun.reflect.MethodAccessorImpl not correctly boot delegated

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970465#action_12970465 ] 

Felix Meschberger commented on SLING-1895:
------------------------------------------

I am not in favor of adding this. In fact, I am even contemplating removing the com.yourkit.* configuration ...

But then, this is something we cannot control and it may be the best solution to try to go this route.

Have you tried to only add sun.reflect to the bootdelegation:

    org.osgi.framework.bootdelegation=com.yourkit.*,sun.reflect

If we can limit the addition to this package, I would be ok.

Am I right that this issue only occurrs after a few calls ? For example as discussed in http://www.mail-archive.com/users@felix.apache.org/msg07724.html

> 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: Scripting
>            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.


[jira] Resolved: (SLING-1895) sun.reflect.MethodAccessorImpl not correctly boot delegated

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig resolved SLING-1895.
----------------------------------

    Resolution: Fixed
      Assignee: Michael Dürig

Fixed with SLING-1925

> 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
>            Assignee: 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.


[jira] Commented: (SLING-1895) sun.reflect.MethodAccessorImpl not correctly boot delegated

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (SLING-1895) sun.reflect.MethodAccessorImpl not correctly boot delegated

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-1895:
-------------------------------------

          Component/s:     (was: Scripting)
                       Launchpad
    Affects Version/s:  Launchpad Base 2.2.0

This would be an issue for the launchpad base bundle

> 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.


[jira] Commented: (SLING-1895) sun.reflect.MethodAccessorImpl not correctly boot delegated

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971230#action_12971230 ] 

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

Just checked: adding sun.reflect.* alone is not enough. This still results in NoClassDefFoundError. Adding both sun.* and sun.reflect.* makes the error disappear. 

> 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.