<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Exposing the boot classpath in OSGi</title>
	<atom:link href="http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/</link>
	<description>The voice of SpringSource</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:31:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Nikita</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-203747</link>
		<dc:creator>Nikita</dc:creator>
		<pubDate>Thu, 29 Sep 2011 16:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-203747</guid>
		<description>Thanks for a great article. But I have some problems putting this to work.

We develop some java agent, which uses Java Instrumentation API to instrument loaded classes, which then, in some point in the future, should call back some classes from our agent. Agent adds itself to bootclassloader using instrumentation.appendToBootstrapClassLoaderSearch .

When putting this agent to fresh new Eclipse Virgo installation and trying to start it, we get 
org.osgi.framework.BundleException: Bundle org.eclipse.equinox.region 1.0.0.v20110503 failed to start.
....

Caused by: java.lang.ClassNotFoundException: XXX_OurClassHere_XXX
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

I have tried to provide
-Dorg.osgi.framework.bootdelegation=sun.*,com.sun.*,our.package.*
to JAVA_OPTS before starting Virgo, but to no avail. -Dorg.osgi.framework.system.packages.extra did not help either.

Can you point me to some way to make our agent&#039;s classes visible to OSGI container and applications inside it?

Hope to hear from you soon,
Nikita</description>
		<content:encoded><![CDATA[<p>Thanks for a great article. But I have some problems putting this to work.</p>
<p>We develop some java agent, which uses Java Instrumentation API to instrument loaded classes, which then, in some point in the future, should call back some classes from our agent. Agent adds itself to bootclassloader using instrumentation.appendToBootstrapClassLoaderSearch .</p>
<p>When putting this agent to fresh new Eclipse Virgo installation and trying to start it, we get<br />
org.osgi.framework.BundleException: Bundle org.eclipse.equinox.region 1.0.0.v20110503 failed to start.<br />
&#8230;.</p>
<p>Caused by: java.lang.ClassNotFoundException: XXX_OurClassHere_XXX<br />
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)<br />
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)<br />
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)<br />
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)<br />
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)</p>
<p>I have tried to provide<br />
-Dorg.osgi.framework.bootdelegation=sun.*,com.sun.*,our.package.*<br />
to JAVA_OPTS before starting Virgo, but to no avail. -Dorg.osgi.framework.system.packages.extra did not help either.</p>
<p>Can you point me to some way to make our agent&#039;s classes visible to OSGI container and applications inside it?</p>
<p>Hope to hear from you soon,<br />
Nikita</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gergely Nagy</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-184289</link>
		<dc:creator>Gergely Nagy</dc:creator>
		<pubDate>Thu, 10 Feb 2011 12:47:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-184289</guid>
		<description>Thanks Costin. 

&gt; it&#039;s not that easy since it would have to be aware not just of the OSGi environment 
&gt; but also about the &#039;outside OSGi&#039; world.  Here there are no bundles to interogate 
&gt; so it&#039;s hard to know whether the package is/will be available or not.

Right, but in case of Eclipse PDE, it seems to capture everything via Target Platform and Execution Environment(JRE and all that), so it should have a fairly precise idea of what comes from where; both at run- and compile-time. At least I thought so.

Anyhow, I tried to implement A&#039; using PDE, but it&#039;s complaining about that JRE pkgs are not available for Export-Package in the (empty) framework extension fragment. Could you show me the manifest for that?

Another minor thing: would you be able to clean up the examples from those noisy &#160;-s? (or am I the only one seeing those?)

&gt; it&#039;s best to raise the issue with them
Sure I will. Just your examples seem to use Equinox, so I thought you might have run into this. (  you seem to be more responsive than Eclipse newsgroups ;)

Thank you very much, again.</description>
		<content:encoded><![CDATA[<p>Thanks Costin. </p>
<p>&gt; it&#039;s not that easy since it would have to be aware not just of the OSGi environment<br />
&gt; but also about the &#039;outside OSGi&#039; world.  Here there are no bundles to interogate<br />
&gt; so it&#039;s hard to know whether the package is/will be available or not.</p>
<p>Right, but in case of Eclipse PDE, it seems to capture everything via Target Platform and Execution Environment(JRE and all that), so it should have a fairly precise idea of what comes from where; both at run- and compile-time. At least I thought so.</p>
<p>Anyhow, I tried to implement A&#039; using PDE, but it&#039;s complaining about that JRE pkgs are not available for Export-Package in the (empty) framework extension fragment. Could you show me the manifest for that?</p>
<p>Another minor thing: would you be able to clean up the examples from those noisy &nbsp;-s? (or am I the only one seeing those?)</p>
<p>&gt; it&#039;s best to raise the issue with them<br />
Sure I will. Just your examples seem to use Equinox, so I thought you might have run into this. (  you seem to be more responsive than Eclipse newsgroups <img src='http://blog.springsource.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Thank you very much, again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Saenger</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-183489</link>
		<dc:creator>Robert Saenger</dc:creator>
		<pubDate>Thu, 27 Jan 2011 08:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-183489</guid>
		<description>What is the best way to extend the eclipse project classpath, to provide classes that shall be provided as system classes, e.g. where did you specify the javax.transaction-1.1.0.jar to be taken into account.

The only way I achieved it, was to declare it as VM argument -Xbootclass/a:/javax.transaction-1.1.0.jar in the OSGi Framework Run Configuration, since it was not sufficient to declare it as required PDE project build path library.</description>
		<content:encoded><![CDATA[<p>What is the best way to extend the eclipse project classpath, to provide classes that shall be provided as system classes, e.g. where did you specify the javax.transaction-1.1.0.jar to be taken into account.</p>
<p>The only way I achieved it, was to declare it as VM argument -Xbootclass/a:/javax.transaction-1.1.0.jar in the OSGi Framework Run Configuration, since it was not sufficient to declare it as required PDE project build path library.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Costin Leau</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-183408</link>
		<dc:creator>Costin Leau</dc:creator>
		<pubDate>Tue, 25 Jan 2011 16:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-183408</guid>
		<description>@Gergely

That&#039;s up to the tool really but it&#039;s not that easy since it would have to be aware not just of the OSGi environment but also about the &#039;outside OSGi&#039; world. Here there are no bundles to interogate so it&#039;s hard to know whether the package is/will be available or not.

Note that I haven&#039;t used Eclipse PDE much but I believe it does not support yet boot classpath delegation but I might be wrong - it&#039;s best to raise the issue with them.</description>
		<content:encoded><![CDATA[<p>@Gergely</p>
<p>That&#039;s up to the tool really but it&#039;s not that easy since it would have to be aware not just of the OSGi environment but also about the &#039;outside OSGi&#039; world. Here there are no bundles to interogate so it&#039;s hard to know whether the package is/will be available or not.</p>
<p>Note that I haven&#039;t used Eclipse PDE much but I believe it does not support yet boot classpath delegation but I might be wrong &#8211; it&#039;s best to raise the issue with them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gergely Nagy</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-183338</link>
		<dc:creator>Gergely Nagy</dc:creator>
		<pubDate>Mon, 24 Jan 2011 17:33:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-183338</guid>
		<description>Very useful article, nice explanation - thank you very much.

What about compile time enforcement of these constraints? Given the above configuration is based on aruntime property, how can, say Eclipse PDE, pick up the visibility rules and complain when something isn&#039;t explicitly imported (rather than deferring to a runtime crash)?</description>
		<content:encoded><![CDATA[<p>Very useful article, nice explanation &#8211; thank you very much.</p>
<p>What about compile time enforcement of these constraints? Given the above configuration is based on aruntime property, how can, say Eclipse PDE, pick up the visibility rules and complain when something isn&#039;t explicitly imported (rather than deferring to a runtime crash)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mani</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-179612</link>
		<dc:creator>Mani</dc:creator>
		<pubDate>Tue, 30 Nov 2010 10:13:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-179612</guid>
		<description>Hi, While running the struts application with osgi in tomcat the following exception raised when particularly 
When starting the bundle “32	INSTALLED com.springsource.javax.servlet.jsp.jstl_1.2.0″
Missing Constraint: Import-Package: org.w3c.dom.traversal; version=”0.0.0″
 Thankful to you for any help....</description>
		<content:encoded><![CDATA[<p>Hi, While running the struts application with osgi in tomcat the following exception raised when particularly<br />
When starting the bundle “32	INSTALLED com.springsource.javax.servlet.jsp.jstl_1.2.0″<br />
Missing Constraint: Import-Package: org.w3c.dom.traversal; version=”0.0.0″<br />
 Thankful to you for any help&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Bartlett</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-168479</link>
		<dc:creator>Neil Bartlett</dc:creator>
		<pubDate>Wed, 16 Sep 2009 12:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-168479</guid>
		<description>I agree that approaches A/A&#039; are far better than B. For the bundle using these packages it keeps things simple: if you use ANY package (other than java.*) then simply import it! It is up to the deployer or administrator to ensure the packages are supplied from somewhere, in this case from the system bundle.

A good use-case for this technique is when an OSGi Framework is embedded in a larger Java application, e.g. a JEE application server. We can expose classes and interfaces such as the EJB APIs to the OSGi bundles. Again, the bundles simply import package javax.ejb and the deployer sorts out the details.</description>
		<content:encoded><![CDATA[<p>I agree that approaches A/A&#039; are far better than B. For the bundle using these packages it keeps things simple: if you use ANY package (other than java.*) then simply import it! It is up to the deployer or administrator to ensure the packages are supplied from somewhere, in this case from the system bundle.</p>
<p>A good use-case for this technique is when an OSGi Framework is embedded in a larger Java application, e.g. a JEE application server. We can expose classes and interfaces such as the EJB APIs to the OSGi bundles. Again, the bundles simply import package javax.ejb and the deployer sorts out the details.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Costin Leau</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-147390</link>
		<dc:creator>Costin Leau</dc:creator>
		<pubDate>Wed, 25 Feb 2009 06:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-147390</guid>
		<description>@Senthil, please use the dedicated forum (http://forum.springframework.org/forumdisplay.php?f=43)</description>
		<content:encoded><![CDATA[<p>@Senthil, please use the dedicated forum (<a href="http://forum.springframework.org/forumdisplay.php?f=43" rel="nofollow">http://forum.springframework.org/forumdisplay.php?f=43</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Senthil</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-147389</link>
		<dc:creator>Senthil</dc:creator>
		<pubDate>Wed, 25 Feb 2009 06:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-147389</guid>
		<description>I am looking at OSGi web extender release version. It is using the Spring core, context etc of alpha version. Could u guide me to correct osgi web bundles depending on released versions of Spring core, context etc?

Thanks,
Senthil</description>
		<content:encoded><![CDATA[<p>I am looking at OSGi web extender release version. It is using the Spring core, context etc of alpha version. Could u guide me to correct osgi web bundles depending on released versions of Spring core, context etc?</p>
<p>Thanks,<br />
Senthil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Costin Leau</title>
		<link>http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/comment-page-1/#comment-143510</link>
		<dc:creator>Costin Leau</dc:creator>
		<pubDate>Mon, 19 Jan 2009 23:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=918#comment-143510</guid>
		<description>@Oleg: Thanks for the explanation on Equinox usage inside Eclipse

@Simon: Thanks Simon - I&#039;ve updated the blog entry with an explanation on how extension bundles can be used (solution A&#039; above).

Cheers and thanks again for the comments!</description>
		<content:encoded><![CDATA[<p>@Oleg: Thanks for the explanation on Equinox usage inside Eclipse</p>
<p>@Simon: Thanks Simon &#8211; I&#039;ve updated the blog entry with an explanation on how extension bundles can be used (solution A&#039; above).</p>
<p>Cheers and thanks again for the comments!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

