{"id":3622,"date":"2014-03-29T07:04:25","date_gmt":"2014-03-29T07:04:25","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/29\/problem-about-bnd-collection-of-common-programming-errors\/"},"modified":"2014-03-29T07:04:25","modified_gmt":"2014-03-29T07:04:25","slug":"problem-about-bnd-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/29\/problem-about-bnd-collection-of-common-programming-errors\/","title":{"rendered":"problem about bnd-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a7398f451777145809df07e4fa483418?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npalacsint<br \/>\njava osgi classloader apache-felix bnd<br \/>\nIn my OSGi environment I am trying to preload a database driver for further usage. Normally, this can be done like that:Class.forName(&#8220;com.mysql.jdbc.Driver&#8221;);After that, a connection can be created. However, if I use that in OSGi under Felix, he says that the class cannot be found (ClassNotFoundException) and the connection cannot be created. But when I do something like that (try-catch is omitted):com.mysql.jdbc.Driver d = new com.mysql.jdbcDriver Class.forName(&#8220;com.mysql.jdbc.Driver&#8221;);Then ev<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9804f7cd98d673633d566f1abc289608?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBoomah<br \/>\njava osgi apache-felix bnd<br \/>\nIn my osgi application I have three bundles, travel.api, table.api and utils. travel.api depends on table.api which depends on utils. Note that travel.api doesn&#8217;t directly depend on utils. I use aQute Bnd to generate the manifests and I believe it is working fine. The manifests are displayed below.There is a class called PageData that has a field of type TableData, which in turn has a field of type TestObject. PageData is located in travel.api, TableData is located in table.api and TestObject is<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/39a6c3183c1754d37200d2598193de71?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSaket<br \/>\nant osgi apache-felix bnd<br \/>\nI have an OSGi bundle that is built using ANT and the classic BND tool. My bundle uses a library (JAR) internally, which is not available as a bundle within my OSGi container (Apache Felix). So, I am trying to embed it within my bundle, for access at runtime. How can I embed such a library\/JAR using ANT+BND? (Note : I cannot use MAVEN, using which this could have been a lot easier)<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2a3a4c70097a8eb8ec54e2b83a84bb70?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1202394<br \/>\njava import osgi bundle bnd<br \/>\nI inherited a .bnd file that has the import !javax., and my program produces runtime errors if I take out that statement. I currently need to add JavaHelp to my application, which is under javax.help.. When I have both of those imports in my .bnd and I use a class from JavaHelp, it produces a ClassNotFoundException for the specific class, like javax.help.JHelp. Is there a way to handle this situation, I feel stuck.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/44c4d730dae5d59f0b64878ea5a22902?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkiki<br \/>\nbnd maven-bundle-plugin<br \/>\nIn a POM parent I&#8217;m defining all common rules to build a bundle. In the Embed-Dependency instruction I would like to write :&lt;Embed-Dependency&gt;*;scope=compile|runtime;artifactId=!my-api;type=!bundle&lt;\/Embed-Dependency&gt;&#8221;Embed all dependencies having scope compile or runtime except my-api artifact and bundle typed dependencies.&#8221;It works for scope and artifactId constraints but type!=bundle doesn&#8217;t seem to work.All this to avoid having to specify the provided scope to bundle dependencies<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/468dc54ad00ff37cb7e9681e95cb671e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nEmil Lundberg<br \/>\nosgi gradle bnd<br \/>\nI&#8217;m building an OSGi jar using Gradle, and I&#8217;m having a bit of trouble with the manifest. Here&#8217;s an excerpt from my build script:apply plugin: &#8216;java&#8217; apply plugin: &#8216;osgi&#8217;jar {baseName = &#8216;awesome&#8217;manifest {name = &#8216;An Awesome Application&#8217;symbolicName = &#8216;com.example.awesome&#8217; \/\/ instruction &#8216;Import-Package&#8217;, &#8216;org.springframework.orm&#8217;} }Using the above, Gradle detects my dependencies and adds an Import-Package with all my compile-time dependencies. But say my application has a runtime dependen<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>palacsint java osgi classloader apache-felix bnd In my OSGi environment I am trying to preload a database driver for further usage. Normally, this can be done like that:Class.forName(&#8220;com.mysql.jdbc.Driver&#8221;);After that, a connection can be created. However, if I use that in OSGi under Felix, he says that the class cannot be found (ClassNotFoundException) and the connection [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3622","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3622"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3622\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}