Friday, 18 May 2012

Packaging Adobe CQ 5.5 applications that contain an OSGi bundle

You can package an Adobe CQ 5.5 application that contains an OSGi bundle into a package by using Package Manager. Once an application (including the OSGi bundle) is placed into a package, you can deploy the package to another instance of Adobe CQ. If your CQ package does not include the OSGi bundle, then the application will not successfully work when deployed to a new CQ instance.

For example, assume that you created the weather application that uses an OSGi bundle by following the development article here: http://scottsdigitalcommunity.blogspot.ca/2012/05/creating-adobe-cq-bundles-that-consume.html.

To successfully package the weather application, you have to also include the cdynewebservice_1.0.0.jar (which represents the OSGi bundle) into the package.

Note: This article describes how to package the weather application (that depends upon an OSGi bundle) as an example. You can build the weather application by following the instructions located in the previous link. For more information about Adobe CQ packages, see http://dev.day.com/docs/en/cq/current/administering/package_manager.html.

To read this entire article, click this link:

https://helpx.adobe.com/experience-manager/using/packaging-cq-applications-contain-osgi.html

Adobe Digital Marketing Community


Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.





3 comments:

  1. I am trying to create CQ OSGi bundle that consumes a third-party web service. I'm getting the below exception while accessing the pages.

    org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:



    An error occurred at line: 5 in the jsp file: /apps/stoxx/components/content/weather/weather.jsp

    com.cdyne.ws.weatherws.Weather cannot be resolved to a type

    5: com.cdyne.ws.weatherws.Weather ww = new com.cdyne.ws.weatherws.Weather();
    . . . .

    I also restarted the “ Apache Sling Scripting JSP support” and “Apache Sling Dynamic Class Loader Support” bundles. No luck J

    Could you please tell me what could be the problem?

    Thanks,
    Anderson

    ReplyDelete
  2. Did you follow this note:

    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.

    ReplyDelete
  3. i was facing the same issue to resolve it i just update the below line in MANIFEST.MF
    Export-Package: net.webservicex with Export-Package: com.cdyne.ws.weatherws

    ReplyDelete