Expand my Community achievements bar.

SOLVED

Facing issues in bundle resolution

Avatar

Level 5

Hi All,

I am trying to integrate OrientDB with a simple AEM application. after the build, I am getting the error in osgi console as:

Imported Packagescom.sun.jdi -- Cannot be resolved and overwritten by Boot Delegation
com.sun.jdi.connect -- Cannot be resolved and overwritten by Boot Delegation
com.sun.jdi.event -- Cannot be resolved and overwritten by Boot Delegation
com.sun.jdi.request -- Cannot be resolved and overwritten by Boot Delegation

In sling.properties file, as we used to add the below line

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

I am using AEM 6.2, so this particular line is already present in sling.properties file. I am not able to get the pointer as what needs to be done to fix the issue.

Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 5

Thanks a lot, everyone!!!

I have fixed the issue. I had referred the below URLs for resolving corresponding bundle issues:

  1. jdk.nashorn.api.scripting -- Cannot be resolved

https://github.com/mszu/nashorn-scripting-api-fragment

  1. javax.persistence -- Cannot be resolved
    javax.persistence.criteria -- Cannot be resolved
    javax.persistence.metamodel -- Cannot be resolved
    javax.persistence.spi -- Cannot be resolved

http://www.java2s.com/Code/Jar/j/Downloadjavaxpersistence203jar.htm

  1. javax.annotation.meta -- Cannot be resolved

http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22jsr305%22

View solution in original post

11 Replies

Avatar

Level 7

Hi

Have you tried adding the below dependency in your pom file.

<dependency>

    <groupId>com.sun</groupId>

    <artifactId>tools</artifactId>

    <version>1.5.0</version>

    <scope>system</scope>

</dependency>

Thanks.

Avatar

Level 5

Thanks for the reply. I tried the above, but the JAR is not OSGI compliant. I tried to convert the downloaded jar to OSGI using bnd tool, but still the issue is not resolved.

Avatar

Level 7

It would be great if you can create a github project with what you have. Someone can pick it up from there. It will save a lot of time..

Avatar

Level 5

Hi Vivek,

Please get the code from ritendras / testOrientJava — Bitbucket  and do a maven install on AEM.

You will notice that the bundle is in installed state.

1246584_pastedImage_1.png

I need to fix this bundle issue.

Please let me know if you get any solution.

Avatar

Level 5

I am trying to use JAVA APIs of OrientDB in an AEM project.

Avatar

Level 10

Have you tried wrapping the JAR using an Eclipse plug-in project. Then deploy the bundle to AEM. See how we wrap the SImple JSON JAR in this article --

Adobe Experience Manager Help | Submitting Adobe Experience Manager form data to Java Sling Servlets

Avatar

Level 7

I made some changes to bundle POM.. It is active now but I do not have any code to check if that works...

vivek-sachdeva / orientdb-test / commit / 83b61ecfdd04 — Bitbucket

Take a look..

Avatar

Correct answer by
Level 5

Thanks a lot, everyone!!!

I have fixed the issue. I had referred the below URLs for resolving corresponding bundle issues:

  1. jdk.nashorn.api.scripting -- Cannot be resolved

https://github.com/mszu/nashorn-scripting-api-fragment

  1. javax.persistence -- Cannot be resolved
    javax.persistence.criteria -- Cannot be resolved
    javax.persistence.metamodel -- Cannot be resolved
    javax.persistence.spi -- Cannot be resolved

http://www.java2s.com/Code/Jar/j/Downloadjavaxpersistence203jar.htm

  1. javax.annotation.meta -- Cannot be resolved

http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22jsr305%22

Avatar

Level 7

the last link appears broken..

Could you add some more detail around how you fixed it.. Would be helpful for others.

Avatar

Level 5

Hi,

I have installed the jar file for orient-db-object and orient-db-core manually via OSGI console.

After installation, I faced the issues mentioned in my answer. To resolve the bundles, I followed the links provided in my post:

  1. javax.annotation.meta -- Cannot be resolved

The Central Repository Search Engine

Hope, this helps!

Avatar

Level 2

Hi,

Currently we are facing an issue with com.sun.medialib.mlib cannot be resolved and overwritten by boot delegation.

I had downloaded the jar and updated it as osgi bundle by adding certain properties in the Manifest file. I had installed the bundle and it is active.

Whenever I was installing my project bundle it is showing as Installed State. I am getting an error called com.sun.medialib.mlib cannot be resolved and overwritten by boot delegation.

Need help.

Thanks,

Pradeep Kumar.