Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

org.osgi.framework.BundleException: Unresolved constraint

Avatar

Level 3

Hi,

i'm doing the below exercise i'm able to succesfully through maven but when i upload the bundle in felix console error is displayed

http://helpx.adobe.com/adobe-cq/using/custom-sling-servlets.html

PFA image for felix console.

And the below is the message displayed in stderror.log

org.osgi.framework.BundleException: Unresolved constraint in bundle com.adobe.cq.sling.claim-bundle [313]: Unable to resolve 313.0: missing requirement [313.0] osgi.wiring.package; (osgi.wiring.package=org.json.simple)
16.10.2013 19:17:19.410 *ERROR* [FelixStartLevel]     at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3962)
16.10.2013 19:17:19.410 *ERROR* [FelixStartLevel]     at org.apache.felix.framework.Felix.startBundle(Felix.java:2025)
16.10.2013 19:17:19.410 *ERROR* [FelixStartLevel]     at org.apache.felix.framework.Felix.setBundleStartLevel(Felix.java:1471)
16.10.2013 19:17:19.410 *ERROR* [FelixStartLevel]     at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:334)
16.10.2013 19:17:19.410 *ERROR* [FelixStartLevel]     at java.lang.Thread.run(Unknown Source)

Please suggest Thanks!! 

1 Accepted Solution

Avatar

Correct answer by
Level 6

Have you performed the below steps correctly?

1. Start Eclipse (Indigo). The steps below have been tested on Eclipse Java EE IDE for Web Developers version Indigo Service Release 1.

2. Select File, New, Other.

3. Under the Plug-in Development folder, choose Plug-in from Existing JAR Archives. Name your project jsonBundle.

4. In the JAR selection dialog, click the Add external button, and browse to the json-simple JAR file that you downloaded.

5. Click Next.

6. In the Plug-in Project properties dialog, ensure that you check the checkbox for Analyze library contents and add dependencies.

7. Make sure that the Target Platform is the standard OSGi framework.

8. Ensure the checkboxes for Unzip the JAR archives into the project and Update references to the JAR files are both checked.

9. Click Next, and then Finish.

10. Click the Runtime tab.

11. Make sure that the Exported Packages list is populated.

12. Make sure these packages have been added under the Export-Package header in MANIFEST.MF. Remove the version information in the MANIFEST.MF file. Version numbers can cause conflicts when you upload the OSGi bundle to Adobe CQ.

13. Also make sure that the Import-Package header in MANIFEST.MF is also populated, as shown here (notice that Export-Package is org.json.simple).

View solution in original post

4 Replies

Avatar

Level 6

I think the screenshot that you mentioned is for creation of archetype project. You need to perform those steps.

Avatar

Correct answer by
Level 6

Have you performed the below steps correctly?

1. Start Eclipse (Indigo). The steps below have been tested on Eclipse Java EE IDE for Web Developers version Indigo Service Release 1.

2. Select File, New, Other.

3. Under the Plug-in Development folder, choose Plug-in from Existing JAR Archives. Name your project jsonBundle.

4. In the JAR selection dialog, click the Add external button, and browse to the json-simple JAR file that you downloaded.

5. Click Next.

6. In the Plug-in Project properties dialog, ensure that you check the checkbox for Analyze library contents and add dependencies.

7. Make sure that the Target Platform is the standard OSGi framework.

8. Ensure the checkboxes for Unzip the JAR archives into the project and Update references to the JAR files are both checked.

9. Click Next, and then Finish.

10. Click the Runtime tab.

11. Make sure that the Exported Packages list is populated.

12. Make sure these packages have been added under the Export-Package header in MANIFEST.MF. Remove the version information in the MANIFEST.MF file. Version numbers can cause conflicts when you upload the OSGi bundle to Adobe CQ.

13. Also make sure that the Import-Package header in MANIFEST.MF is also populated, as shown here (notice that Export-Package is org.json.simple).

Avatar

Level 3

Sorry i've missed the above steps i need to follow it.Thanks :)

Avatar

Level 6

If it helps then mark it as resolved.