{"id":1227,"date":"2012-05-22T22:00:00","date_gmt":"2012-05-22T22:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/learn-by-errors-java-osgi.html"},"modified":"2012-10-22T05:06:13","modified_gmt":"2012-10-22T05:06:13","slug":"learn-by-errors-java-osgi","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html","title":{"rendered":"Learn by Errors : Java + OSGi"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">Recently I worked on getting<a href=\"http:\/\/hive.apache.org\/\" target=\"_blank\" title=\"Apache Hive\"> Apache Hive<\/a> work inside an OSGi environment. While not proving to be a proverbial piece of cake (software right?.. Why am I not&nbsp;surprised? <img decoding=\"async\" alt=\":)\" src=\"http:\/\/s0.wp.com\/wp-includes\/images\/smilies\/icon_smile.gif?m=1129645325g\" \/> ), it led me through an assortment of Java and OSGi errors. Here I&nbsp;am listing some of them that bit me bit hard (no pun intended) so that I&nbsp;thought of making a blog out them just for my own satisfaction.<\/p>\n<p><strong>java.lang.VerifyError<\/strong><\/p>\n<p>I got this nastiness during initialization of one of OSGi service components.&nbsp;The culprit was not immediately identifiable since the offending bundle was in&nbsp;ACTIVE state. On the surface everything looked fine except for the fact the&nbsp;Hive server which was supposed to start during the initialization of the&nbsp;service component present in the bundle was not up and running. A quick \u2018ls\u2019 in&nbsp;the OSGi console revealed the service component is in \u2018unsatisfied\u2019 state.&nbsp;Finally a \u2018comp\u2019 revealed the root cause, the VerifyError.<\/p>\n<p>The VerifyError can occur if the runtime dependency of a class is different to that&nbsp;of the dependency that was used at compilation time. For example if the method&nbsp;signatures have changed between the dependencies then this error would result.&nbsp;This is nicely explained at [1] in the accepted answer. As it turned out&nbsp;slightly different versions of a package had been exposed in two bundles causing&nbsp;the Hive bundle to pick up a different version over the version that was in the&nbsp;compilation environment. Proper OSGi versioning turned out to be the solution.<\/p>\n<p><strong>java.lang.IncompatibleClassChangeError<\/strong><\/p>\n<p>This error also cropped up under a similar circumstance where two packages were&nbsp;present in the system. As [2] clearly explains, the reason for this in my case&nbsp;was an interface being changed to an abstract class between the conflicting&nbsp;package versions. Again the versioning helped to save the day.<\/p>\n<p><strong>java.lang.LinkageError : loader constraint violation in xxxx \u2013 blah \u2026<\/strong><\/p>\n<p>Now this seems to be a famous error specially in OSGi enviornments. Main root&nbsp;cause seems to be two classes loaded by different ClassLoaders coming in to&nbsp;contact in a certain way. For example say Class A object accept a Class B object&nbsp;as a method parameter. Class B is loaded by ClassLoader-A which also loads Class&nbsp;A. But at the method invocation time how ever an object of Class B which has&nbsp;been loaded by ClassLoader-B is passed as an argument to an object of Class A&nbsp;which has been loaded by ClassLoader-A. Now the result would be a big fat&nbsp;LinkageError with a very verbose error message.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>The graph based class loadingstructure in OSGi makes it specially conducive to these kind of errors. In my case the culprit was a package which had been duplicated in two different&nbsp;bundles and a particular class in that package loaded by the separate&nbsp;ClassLoaders of each of the bundles coming in to contact via a third bundle&nbsp;present in the system during a method call. So this was a case of not following&nbsp;\u201cimport what you export\u201d best practice [3] in OSGi. Doing so would help to&nbsp;reduce the exposure of duplicated packages across bundles and help to maintain a&nbsp;consistent class space for a given package. And so this turned out to be the&nbsp;resolution for that in this case.<\/p>\n<p><strong>Package uses conflict: Import-Package: yyy; version=\u201dx.x.x\u201d<\/strong><\/p>\n<p>I had my fair share of this inconvenience thrown at my face every so often&nbsp;during the exercise. There are two excellent posts [4],[5] exactly on this issue&nbsp;at SpringSource which helped a lot. However let me summarize my learning on this&nbsp;issue. Simply if a bundle is being exposed to two versions of the same package&nbsp;through a direct import and via a uses constraint this error would come up. The&nbsp;diagram best illustrates this situation.<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/2.bp.blogspot.com\/-TGfnMi9dS28\/T7uyvSt0NsI\/AAAAAAAAAP0\/-vKv0qfvca4\/s1600\/osgi-uses1.jpg\"><img decoding=\"async\" border=\"0\" height=\"282\" src=\"http:\/\/2.bp.blogspot.com\/-TGfnMi9dS28\/T7uyvSt0NsI\/AAAAAAAAAP0\/-vKv0qfvca4\/s400\/osgi-uses1.jpg\" width=\"400\" \/><\/a><\/div>\n<p>The bundle A imports org.foo version 1.0.0 directly. However it also imports&nbsp;bundle org.bar from bundle B. However as it turns out package org.bar also uses&nbsp;org.foo package albeit it\u2019s a different version (2.0.0) than that of the version&nbsp;imported by bundle A. Now bundle A is directly wired to version 1.0.0 of org.foo&nbsp;and also being exposed to the version 2.0.0 of org.foo due to the&nbsp;import of org.bar which is using version 2.0.0 of org.foo. Now since a bundle&nbsp;cannot be wired to different versions of the same package, a uses conflict would&nbsp;come up with offending import org.bar as the root cause. (e.g: Package uses&nbsp;conflict: Import-Package: org.bar; version=\u201d0.0.0?). The solution would be to&nbsp;change package import versions of org.bar in either bundle A or bundle B so that&nbsp;both would be pointing to the same package version. Another excellent blog by&nbsp;Neil Bartlett on this can be found at [6].<\/p>\n<p><strong>java.lang.UnsatisfiedLinkError<\/strong><\/p>\n<p>One of my friends at work came across this while trying to incorporate another&nbsp;third party library in to our OSGi enviornment. JavaDocs goes on to say that&nbsp;this gets \u201cThrown if the Java Virtual Machine cannot find an appropriate&nbsp;native-language definition of a method declared native\u201d. The offending library&nbsp;was a linux .so (dynamically linked library) file which was not visible to&nbsp;bundle ClassLoader at runtime. We were able to get it working by directly&nbsp;including the library resource to the bundle ClassLoader. An earlier attempt on&nbsp;setting this resource on TCCL (Thread Context ClassLoader) failed and this let&nbsp;us to the realization that the TCCL is typically not the bundle class loader. A&nbsp;good reading on TCCL under Equinox OSGi enviornment can be found at [7].<\/p>\n<p>[1] <a href=\"http:\/\/stackoverflow.com\/questions\/100107\/reasons-of-getting-a-java-lang-verifyerror\" title=\"http:\/\/stackoverflow.com\/questions\/100107\/reasons-of-getting-a-java-lang-verifyerror\">http:\/\/stackoverflow.com\/questions\/100107\/reasons-of-getting-a-java-lang-verifyerror<\/a><br \/>\n[2] <a href=\"http:\/\/stackoverflow.com\/questions\/1980452\/what-causes-java-lang-incompatibleclasschangeerror\" title=\"http:\/\/stackoverflow.com\/questions\/1980452\/what-causes-java-lang-incompatibleclasschangeerror\">http:\/\/stackoverflow.com\/questions\/1980452\/what-causes-java-lang-incompatibleclasschangeerror<\/a><br \/>\n[3] <a href=\"http:\/\/blog.osgi.org\/2007\/04\/importance-of-exporting-nd-importing.html\" title=\"http:\/\/blog.osgi.org\/2007\/04\/importance-of-exporting-nd-importing.html\">http:\/\/blog.osgi.org\/2007\/04\/importance-of-exporting-nd-importing.html<\/a><br \/>\n[4] <a href=\"http:\/\/blog.springsource.org\/2008\/10\/20\/understanding-the-osgi-uses-directive\/\" title=\"http:\/\/blog.springsource.org\/2008\/10\/20\/understanding-the-osgi-uses-directive\/\">http:\/\/blog.springsource.org\/2008\/10\/20\/understanding-the-osgi-uses-directive\/<\/a><br \/>\n[5] <a href=\"http:\/\/blog.springsource.org\/2008\/11\/22\/diagnosing-osgi-uses-conflicts\/\" title=\"http:\/\/blog.springsource.org\/2008\/11\/22\/diagnosing-osgi-uses-conflicts\/\">http:\/\/blog.springsource.org\/2008\/11\/22\/diagnosing-osgi-uses-conflicts\/<\/a><br \/>\n[6] <a href=\"http:\/\/njbartlett.name\/2011\/02\/09\/uses-constraints.html\" title=\"http:\/\/njbartlett.name\/2011\/02\/09\/uses-constraints.html\">http:\/\/njbartlett.name\/2011\/02\/09\/uses-constraints.html<\/a><br \/>\n[7] <a href=\"http:\/\/wiki.eclipse.org\/ContextClassLoader_Enhancements\" title=\"http:\/\/wiki.eclipse.org\/ContextClassLoader_Enhancements\">http:\/\/wiki.eclipse.org\/Context<em>Class<\/em>Loader_Enhancements<\/a><\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/chamibuddhika.wordpress.com\/2012\/05\/15\/learn-by-errors-java-osgi\/\">Learn by Errors : Java + OSGi<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Buddhika Chamith at the <a href=\"http:\/\/chamibuddhika.wordpress.com\/\">Source Open<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Recently I worked on getting Apache Hive work inside an OSGi environment. While not proving to be a proverbial piece of cake (software right?.. Why am I not&nbsp;surprised? ), it led me through an assortment of Java and OSGi errors. Here I&nbsp;am listing some of them that bit me bit hard (no pun intended) so &hellip;<\/p>\n","protected":false},"author":184,"featured_media":211,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[190],"class_list":["post-1227","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-osgi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn by Errors : Java + OSGi - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Recently I worked on getting Apache Hive work inside an OSGi environment. While not proving to be a proverbial piece of cake (software right?.. Why am I\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn by Errors : Java + OSGi - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Recently I worked on getting Apache Hive work inside an OSGi environment. While not proving to be a proverbial piece of cake (software right?.. Why am I\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-22T22:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-22T05:06:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/osgi-alliance-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Buddhika Chamith\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Buddhika Chamith\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html\"},\"author\":{\"name\":\"Buddhika Chamith\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/7af2cea55ca73fc3e60af1916f30f854\"},\"headline\":\"Learn by Errors : Java + OSGi\",\"datePublished\":\"2012-05-22T22:00:00+00:00\",\"dateModified\":\"2012-10-22T05:06:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html\"},\"wordCount\":1032,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/osgi-alliance-logo.jpg\",\"keywords\":[\"OSGi\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html\",\"name\":\"Learn by Errors : Java + OSGi - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/osgi-alliance-logo.jpg\",\"datePublished\":\"2012-05-22T22:00:00+00:00\",\"dateModified\":\"2012-10-22T05:06:13+00:00\",\"description\":\"Recently I worked on getting Apache Hive work inside an OSGi environment. While not proving to be a proverbial piece of cake (software right?.. Why am I\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/osgi-alliance-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/osgi-alliance-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/05\\\/learn-by-errors-java-osgi.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Learn by Errors : Java + OSGi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/7af2cea55ca73fc3e60af1916f30f854\",\"name\":\"Buddhika Chamith\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79e0891b29887f100b22a526408e01007cbb10ae2cf302541d1884315933d3d8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79e0891b29887f100b22a526408e01007cbb10ae2cf302541d1884315933d3d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79e0891b29887f100b22a526408e01007cbb10ae2cf302541d1884315933d3d8?s=96&d=mm&r=g\",\"caption\":\"Buddhika Chamith\"},\"sameAs\":[\"http:\\\/\\\/chamibuddhika.wordpress.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Buddhika-Chamith\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn by Errors : Java + OSGi - Java Code Geeks","description":"Recently I worked on getting Apache Hive work inside an OSGi environment. While not proving to be a proverbial piece of cake (software right?.. Why am I","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html","og_locale":"en_US","og_type":"article","og_title":"Learn by Errors : Java + OSGi - Java Code Geeks","og_description":"Recently I worked on getting Apache Hive work inside an OSGi environment. While not proving to be a proverbial piece of cake (software right?.. Why am I","og_url":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-05-22T22:00:00+00:00","article_modified_time":"2012-10-22T05:06:13+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/osgi-alliance-logo.jpg","type":"image\/jpeg"}],"author":"Buddhika Chamith","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Buddhika Chamith","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html"},"author":{"name":"Buddhika Chamith","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/7af2cea55ca73fc3e60af1916f30f854"},"headline":"Learn by Errors : Java + OSGi","datePublished":"2012-05-22T22:00:00+00:00","dateModified":"2012-10-22T05:06:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html"},"wordCount":1032,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/osgi-alliance-logo.jpg","keywords":["OSGi"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html","url":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html","name":"Learn by Errors : Java + OSGi - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/osgi-alliance-logo.jpg","datePublished":"2012-05-22T22:00:00+00:00","dateModified":"2012-10-22T05:06:13+00:00","description":"Recently I worked on getting Apache Hive work inside an OSGi environment. While not proving to be a proverbial piece of cake (software right?.. Why am I","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/osgi-alliance-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/osgi-alliance-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/05\/learn-by-errors-java-osgi.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Learn by Errors : Java + OSGi"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/7af2cea55ca73fc3e60af1916f30f854","name":"Buddhika Chamith","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/79e0891b29887f100b22a526408e01007cbb10ae2cf302541d1884315933d3d8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/79e0891b29887f100b22a526408e01007cbb10ae2cf302541d1884315933d3d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/79e0891b29887f100b22a526408e01007cbb10ae2cf302541d1884315933d3d8?s=96&d=mm&r=g","caption":"Buddhika Chamith"},"sameAs":["http:\/\/chamibuddhika.wordpress.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Buddhika-Chamith"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/184"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1227"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1227\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/211"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}