Expand my Community achievements bar.

SOLVED

how to fix this problem with "Cannot be resolved but is not required"

Avatar

Former Community Member

Hi there,

I develop an OSGI bundle in AEM6,  i try to use this in CQ5 but never can deploy it in web console of CQ5, please see below:

[img]unresolve.png[/img]

And also i add config info into POM.xml as below, but find error as always:

<Import-Package> com.sun.msv.*;resolution:=optional, nu.xom;resolution:=optional, org.gjt.xpp;resolution:=optional, org.jdom.*;resolution:=optional, org.relaxng.datatype;resolution:=optional, org.xmlpull.v1;resolution:=optional, * </Import-Package>

Anyone kown how to fix that?

Thanks a lot in advance.

 

Best regards,

Brian

1 Accepted Solution

Avatar

Correct answer by
Level 10

Looks like you are trying to include an OSGi bundle that has a lot of dependencies. 

I know when we use Web Services and to get sun packages to work - we have to edit the sling prop file:

Solution:
To fix this issue and ensure that you can create a bundle that consumes web services as described in this article, modify the sling.properties file located in the crx-quickstart\conf folder. Add the following line of code to this file: sling.bootdelegation.com.sun=com.sun.*. Then restart the server. Once you perform this task, you can follow along with this article.

When you get that red in the OSGi felix console - it means that the Java libs are a dependency - but they are not part of the OSGi service container.

You need to get these JAR files and include them in aother OSGi bundle and deploy so  they are placed into an active state. Once you get all of these JAR files into AEM - these errors will go away. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Looks like you are trying to include an OSGi bundle that has a lot of dependencies. 

I know when we use Web Services and to get sun packages to work - we have to edit the sling prop file:

Solution:
To fix this issue and ensure that you can create a bundle that consumes web services as described in this article, modify the sling.properties file located in the crx-quickstart\conf folder. Add the following line of code to this file: sling.bootdelegation.com.sun=com.sun.*. Then restart the server. Once you perform this task, you can follow along with this article.

When you get that red in the OSGi felix console - it means that the Java libs are a dependency - but they are not part of the OSGi service container.

You need to get these JAR files and include them in aother OSGi bundle and deploy so  they are placed into an active state. Once you get all of these JAR files into AEM - these errors will go away.