Facing issues in bundle resolution | Community
Skip to main content
RitendraS11
Level 4
July 6, 2017
Solved

Facing issues in bundle resolution

  • July 6, 2017
  • 11 replies
  • 9197 views

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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by RitendraS11

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

11 replies

Techaspect_Solu
Level 7
July 6, 2017

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.

RitendraS11
Level 4
July 10, 2017

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.

viveksachdeva
Community Advisor
Community Advisor
July 10, 2017

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

RitendraS11
Level 4
July 10, 2017

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.

I need to fix this bundle issue.

Please let me know if you get any solution.

RitendraS11
Level 4
July 10, 2017

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

smacdonald2008
Level 10
July 10, 2017

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

viveksachdeva
Community Advisor
Community Advisor
July 11, 2017

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

RitendraS11
RitendraS11AuthorAccepted solution
Level 4
July 11, 2017

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

viveksachdeva
Community Advisor
Community Advisor
July 11, 2017

the last link appears broken..

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

RitendraS11
Level 4
July 11, 2017

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!