Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Overwritten by Boot Delegation

Avatar

Former Community Member

When using AEM v5.6.1 we created a number of OSGi bundles that 'wrap' 3rd party libraries. These installed successfully with no problems. Here's what one example looks like in the bundles console :-

Exported Packages    com.google.code.facebookapi,version=3.0.4 com.google.code.facebookapi.apt,version=3.0.4 com.google.code.facebookapi.schema,version=3.0.4 com.sun.xml.fastinfoset,version=1.2.13 com.sun.xml.fastinfoset.algorithm,version=1.2.13 com.sun.xml.fastinfoset.alphabet,version=1.2.13 com.sun.xml.fastinfoset.dom,version=1.2.13 com.sun.xml.fastinfoset.org.apache.xerces.util,version=1.2.13 com.sun.xml.fastinfoset.resources,version=1.2.13 com.sun.xml.fastinfoset.sax,version=1.2.13 com.sun.xml.fastinfoset.stax,version=1.2.13 com.sun.xml.fastinfoset.stax.events,version=1.2.13 com.sun.xml.fastinfoset.stax.factory,version=1.2.13 com.sun.xml.fastinfoset.stax.util,version=1.2.13 com.sun.xml.fastinfoset.tools,version=1.2.13 com.sun.xml.fastinfoset.util,version=1.2.13 com.sun.xml.fastinfoset.vocab,version=1.2.13 ...

We have recently upgraded to AEM v6 and now when I import these bundles, for any packages from 'com.sun.*' I get an 'Overwritten by Boot Delegation' message :-

Exported Packages    com.google.code.facebookapi,version=3.0.4 com.google.code.facebookapi.apt,version=3.0.4 com.google.code.facebookapi.schema,version=3.0.4 !! com.sun.xml.fastinfoset,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.algorithm,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.alphabet,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.dom,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.org.apache.xerces.util,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.resources,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.sax,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.stax,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.stax.events,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.stax.factory,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.stax.util,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.tools,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.util,version=1.2.13 -- Overwritten by Boot Delegation !! com.sun.xml.fastinfoset.vocab,version=1.2.13 -- Overwritten by Boot Delegation

I see the same thing for another bundle which wraps the jersey client api :-

!! com.sun.jersey.api.client,version=1.18.1 -- Overwritten by Boot Delegation !! com.sun.jersey.api.client.async,version=1.18.1 -- Overwritten by Boot Delegation !! com.sun.jersey.api.client.config,version=1.18.1 -- Overwritten by Boot Delegation !! com.sun.jersey.api.client.filter,version=1.18.1 -- Overwritten by Boot Delegation !! com.sun.jersey.client.impl,version=1.18.1 -- Overwritten by Boot Delegation !! com.sun.jersey.client.impl.async,version=1.18.1 -- Overwritten by Boot Delegation !! com.sun.jersey.client.proxy,version=1.18.1 -- Overwritten by Boot Delegation !! com.sun.jersey.client.urlconnection,version=1.18.1 -- Overwritten by Boot Delegation

I'm certainly no expert but I suspect this has something to do with which classes are loaded when felix starts up. I can see from the sling.properties files for v5.6.1 and v6 that they differ. In v5.6.1 we see the line :-

sling.bootdelegation.sun.reflect=sun.reflect

whereas in v6 :-

sling.bootdelegation.sun=sun.*,com.sun.*

The v6 property explains (I think) why I see the 'Overwritten by Boot Delegation' message, but .... what can I do about it ??

Kind Regards

Fraser.

1 Accepted Solution

Avatar

Correct answer by
Level 10

[1] should give more details. Is there  any specific issue you are facing?

[1]   https://issues.apache.org/jira/browse/SLING-2891

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

[1] should give more details. Is there  any specific issue you are facing?

[1]   https://issues.apache.org/jira/browse/SLING-2891

Avatar

Level 4

The link provided by you is broken can you please update it. I'm facing the same issue.