tag:blogger.com,1999:blog-59711725682527363702024-02-08T11:37:47.821-08:00OSGi Everywhere!mingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-5971172568252736370.post-37086943573100100962013-10-07T21:06:00.001-07:002013-10-07T21:06:17.130-07:00Unable to start bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json-lib/2.4_1: Unresolved constraint in bundle org.apache.servicemix.bundles.json-lib [182]: Unable to resolve 182.0: missing requirement [182.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.oro.text.regex)(version>=2.0.8)(!(version>=3.0.0)))solution:<br />
<br />
karaf@root> install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oro/2.0.8_5<br />
Bundle ID: 193<br />
<br />
resolved:<br />
<br />
karaf@root> install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json-lib/2.4_1<br />
Bundle ID: 182<br />
<br />
<br />mingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0tag:blogger.com,1999:blog-5971172568252736370.post-83164705570565738792013-08-01T03:06:00.003-07:002013-08-01T21:45:00.782-07:00[ERROR] /Users/ming/src/osgi-camel/demo.service-bundle/src/main/java/demo/service/impl/TransformServiceImpl.java:[8,45] cannot find symbolWhen you run tutorial of Camel OSGi in http://camel.apache.org/tutorial-osgi-camel-part1.html<br />
<br />
You may got error after add the TransformService.<br />
<br />
SOLUTION IS<br />
<h3>
To add the following line to TransformServiceImpl.java<br />import demo.service.TransformService;</h3>
<div class="p1">
<span class="s2"><br /></span>
<span class="s2"><br /></span>
<span class="s2">The Error message as follows;</span></div>
<br />
$ mvn clean install org.ops4j:maven-pax-plugin:eclipse [17:10:21]<br />
[INFO] Scanning for projects...<br />
[WARNING]<br />
[WARNING] Some problems were encountered while building the effective model for demo.service:demo.service-bundle:bundle:0.1<br />
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.<br />
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.<br />
[WARNING]<br />
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.<br />
[WARNING]<br />
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.<br />
[WARNING]<br />
[INFO] <br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] Building demo.service-bundle [demo.service] 0.1<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO]<br />
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ demo.service-bundle ---<br />
[INFO] Deleting /Users/ming/src/osgi-camel/demo.service-bundle/target<br />
[INFO]<br />
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo.service-bundle ---<br />
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!<br />
[INFO] Copying 3 resources<br />
[INFO] Copying 0 resource<br />
[INFO]<br />
[INFO] --- maven-pax-plugin:1.5:compile (default-compile) @ demo.service-bundle ---<br />
[INFO] Compiling 5 source files to /Users/ming/src/osgi-camel/demo.service-bundle/target/classes<br />
[INFO] [recovering meta-data]<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] BUILD FAILURE<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] Total time: 2.795s<br />
[INFO] Finished at: Thu Aug 01 17:10:25 CST 2013<br />
[INFO] Final Memory: 10M/81M<br />
[INFO] ------------------------------------------------------------------------<br />
[ERROR] Failed to execute goal org.ops4j:maven-pax-plugin:1.5:compile (default-compile) on project demo.service-bundle: Compilation failure<br />
[ERROR] /Users/ming/src/osgi-camel/demo.service-bundle/src/main/java/demo/service/impl/TransformServiceImpl.java:[8,45] cannot find symbol<br />
[ERROR] symbol: class TransformService<br />
[ERROR] public class TransformServiceImpl implements TransformService {<br />
[ERROR] -> [Help 1]<br />
[ERROR]<br />
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.<br />
[ERROR] Re-run Maven using the -X switch to enable full debug logging.<br />
[ERROR]<br />
[ERROR] For more information about the errors and possible solutions, please read the following articles:<br />
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException<br />
<br />
<br />
Result:<br />
<br />
$ mvn clean install org.ops4j:maven-pax-plugin:eclipse [18:00:40]<br />
[INFO] Scanning for projects...<br />
[WARNING]<br />
[WARNING] Some problems were encountered while building the effective model for com.katdc.mediawalker2.demo.service:demo.service-bundle:bundle:0.1<br />
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.<br />
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.<br />
[WARNING]<br />
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.<br />
[WARNING]<br />
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.<br />
[WARNING]<br />
[INFO] <br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] Building demo.service-bundle [demo.service] 0.1<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO]<br />
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ demo.service-bundle ---<br />
[INFO] Deleting /Users/ming/src/osgi-camel/demo.service-bundle/target<br />
[INFO]<br />
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo.service-bundle ---<br />
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!<br />
[INFO] Copying 3 resources<br />
[INFO] Copying 0 resource<br />
[INFO]<br />
[INFO] --- maven-pax-plugin:1.5:compile (default-compile) @ demo.service-bundle ---<br />
[INFO] Compiling 5 source files to /Users/ming/src/osgi-camel/demo.service-bundle/target/classes<br />
[INFO]<br />
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ demo.service-bundle ---<br />
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!<br />
[INFO] skip non existing resourceDirectory /Users/ming/src/osgi-camel/demo.service-bundle/src/test/resources<br />
[INFO]<br />
[INFO] --- maven-pax-plugin:1.5:testCompile (default-testCompile) @ demo.service-bundle ---<br />
[INFO] No sources to compile<br />
[INFO]<br />
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @ demo.service-bundle ---<br />
[INFO] No tests to run.<br />
[INFO]<br />
[INFO] --- maven-bundle-plugin:1.4.3:bundle (default-bundle) @ demo.service-bundle ---<br />
[WARNING] Include-Resource: overriding META-INF/spring/demo-service-bundle-contxt-osgi.xml=src/main/resources/META-INF/spring/demo-service-bundle-contxt-osgi.xml,META-INF/spring/demo-service-bundle-contxt.xml=src/main/resources/META-INF/spring/demo-service-bundle-contxt.xml,readme.txt=src/main/resources/readme.txt with src/main/resources (add {maven-resources} if you want to include the maven resources)<br />
[WARNING] Warning building bundle com.katdc.mediawalker2.demo.service:demo.service-bundle:bundle:0.1 : Instructions for Private-Package that are never used: demo\.service\.impl\..*|demo\.service\.impl<br />
[INFO]<br />
[INFO] --- maven-install-plugin:2.4:install (default-install) @ demo.service-bundle ---<br />
[INFO] Installing /Users/ming/src/osgi-camel/demo.service-bundle/target/demo.service-bundle-0.1.jar to /Users/ming/.m2/repository/com/katdc/mediawalker2/demo/service/demo.service-bundle/0.1/demo.service-bundle-0.1.jar<br />
[INFO] Installing /Users/ming/src/osgi-camel/demo.service-bundle/pom.xml to /Users/ming/.m2/repository/com/katdc/mediawalker2/demo/service/demo.service-bundle/0.1/demo.service-bundle-0.1.pom<br />
[INFO]<br />
[INFO] --- maven-bundle-plugin:1.4.3:install (default-install) @ demo.service-bundle ---<br />
[INFO] Parsing file:/Users/ming/.m2/repository/repository.xml<br />
[INFO] Installing com/katdc/mediawalker2/demo/service/demo.service-bundle/0.1/demo.service-bundle-0.1.jar<br />
[INFO] Writing OBR metadata<br />
[INFO]<br />
[INFO] --- maven-pax-plugin:1.5:eclipse (default-cli) @ demo.service-bundle ---<br />
[INFO] Using as WTP server : null<br />
[INFO] Adding default classpath contaigner: org.eclipse.jdt.launching.JRE_CONTAINER<br />
[INFO] Using source status cache: /Users/ming/src/osgi-camel/demo.service-bundle/target/mvn-eclipse-cache.properties<br />
[INFO] Not writing settings - defaults suffice<br />
[INFO] File /Users/ming/src/osgi-camel/demo.service-bundle/.project already exists.<br />
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.<br />
[INFO]<br />
Sources for some artifacts are not available.<br />
Please run the same goal with the -DdownloadSources=true parameter in order to check remote repositories for sources.<br />
List of artifacts without a source archive:<br />
o commons-logging:commons-logging-api:1.1<br />
o org.osgi:osgi_R4_compendium:1.0<br />
o org.osgi:osgi_R4_core:1.0<br />
<br />
Javadoc for some artifacts is not available.<br />
Please run the same goal with the -DdownloadJavadocs=true parameter in order to check remote repositories for javadoc.<br />
List of artifacts without a javadoc archive:<br />
o commons-logging:commons-logging-api:1.1<br />
o org.osgi:osgi_R4_compendium:1.0<br />
o org.osgi:osgi_R4_core:1.0<br />
<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] BUILD SUCCESS<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] Total time: 4.310s<br />
[INFO] Finished at: Thu Aug 01 18:00:54 CST 2013<br />
[INFO] Final Memory: 12M/81M<br />
[INFO] ------------------------------------------------------------------------mingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0tag:blogger.com,1999:blog-5971172568252736370.post-36312495490680444702011-03-20T06:48:00.001-07:002011-03-20T06:48:24.177-07:00where you can download bnd.jarhttp://www.aqute.biz/Bnd/Downloadmingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0tag:blogger.com,1999:blog-5971172568252736370.post-69633182630063021882011-03-20T06:46:00.000-07:002011-03-20T06:47:20.367-07:00open of search engines for OSGi bundle.http://ebr.springsource.com/repository/app/mingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0tag:blogger.com,1999:blog-5971172568252736370.post-5918742852064321122011-03-16T01:11:00.000-07:002011-03-16T01:12:03.342-07:00how to update your bundle with maven 2.mvn -P autoInstallBundle clean install -Dsling.url=http://175.41.252.xxx/system/consolemingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0tag:blogger.com,1999:blog-5971172568252736370.post-80867526514978582802011-03-16T01:02:00.000-07:002011-03-16T01:04:58.265-07:00why JCR properties not changed when a bundle re-install which expect to change the contentsupdate and re-install a bundle with a different content/helloworld.json may not change JCR data (properties).<br /><br />You have to use http://175.41.252.xxx/.explorer.html# to change the data in stead.mingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0tag:blogger.com,1999:blog-5971172568252736370.post-57797780650290149272011-03-15T23:21:00.002-07:002011-03-15T23:24:02.015-07:00I use sling for web app management.1. get your sling runnning and you can see your current bundle by web console management.<br /><a href="http://sling.apache.org/site/installing-and-upgrading-bundles.html">http://sling.apache.org/site/installing-and-upgrading-bundles.html</a><br />2. a list of bundles is here <br /><a href="http://sling.apache.org/obr/sling.xml">http://sling.apache.org/obr/sling.xml</a>mingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0tag:blogger.com,1999:blog-5971172568252736370.post-9524167896283116122011-03-15T23:21:00.001-07:002011-03-15T23:21:35.862-07:00good start to learn OSGi and how to create a bundle.<a href="http://underlap.blogspot.com/2007/01/creating-osgi-bundle.html">http://underlap.blogspot.com/2007/01/creating-osgi-bundle.html</a>mingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0tag:blogger.com,1999:blog-5971172568252736370.post-58847853833445677842009-04-19T21:09:00.000-07:002009-04-19T21:10:09.555-07:00Available Repositories:<ul class="alternate" type="square"><li><a href="http://www.osgi.org/Repository/HomePage" rel="nofollow">OSGi Bundle Repository</a>: <div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>http://www.osgi.org/obr/browse?cmd=repository&_xml=1<br /></pre> </div></div> </li><li><a href="http://www.springsource.com/repository/app/" rel="nofollow">Spring Enterprise Bundle Repository</a>: <div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"> <pre>http://sigil.codecauldron.org/spring-external.obr<br />http://sigil.codecauldron.org/spring-release.obr<br /></pre> </div></div> </li></ul>mingderwanghttp://www.blogger.com/profile/06360664550731229109noreply@blogger.com0