1
votes

I am working on AM upgrade 6.1 to 6.4. In the system/console/bundles, I am seeing the following issue for my code bundle,

sun.awt -- Cannot be resolved but is not required and overwritten by Boot Delegation
sun.io -- Cannot be resolved but is not required and overwritten by Boot Delegation
sun.java2d.pipe -- Cannot be resolved but is not required and overwritten by Boot Delegation

Not sure how to resolve this? what jar I have to add to resolve this. can anyone help me out?

2
By any chance was the project in 5.6 before 6.1? I remember editing conf/sling.properties to solve a rare bug that prevented our custom Web services to start correctly.ronnyfm
@ronnyfm Yes the project was in 5.6 before 6.1. If you know what you have updated in conf/sling.properties let me know. That will be helpful.Sudha
In order for JAX-WS client code to be able to consume SOAP web services in AEM (due to class loading issues in OSGi) the followings steps must be performed in each author/publish instance. * Edit the sling.properties file located in the following path crx-quickstart/conf/sling.properties * Add the following line of code to this file sling.bootdelegation.com.sun=com.sun.*ronnyfm
@ronnyfm, I have added that line in crx-quickstart/conf/sling.properties. Still that is not helping to resolve the issue. I can still see the issue :(Sudha
Search if there is a sun.java2d.pipe in the sling.properties file and remove it. The same with sun.awt and sun.io. In our case, the fix was to add that line, but it seems that in your case, the best is to remove completely.ronnyfm

2 Answers

0
votes

Ideally, we shouldn't be using these internal API's.

You can surely look at this article, https://forums.adobe.com/thread/2335157

Can you try importing the missing packing in org.apache.felix configuration plugin?

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
        <instructions>
            <!-- pseudo code -->
            <Import-Package>sun.awt.*;resolution:=optional,sun.io.*;resolution:=optional,sun.java2d.pipe.*;resolution:=optional</Import-Package>
        </instructions>
    </configuration>
</plugin>

This might resolve the issue.

0
votes

Actually the dependencies I have added in the pom file causing the sun.* issue for me. I have removed the following dependency and that resolved my issue.

    <dependency>
        <groupId>org.codehaus.groovy.modules.http-builder</groupId>
        <artifactId>http-builder</artifactId>
        <version>0.6</version>
    </dependency>
    <dependency>
        <groupId>xom</groupId>
        <artifactId>xom</artifactId>
        <version>1.2.5</version>
    </dependency>

Thank you everyone for your help!!!