solution:
karaf@root> install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oro/2.0.8_5
Bundle ID: 193
resolved:
karaf@root> install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json-lib/2.4_1
Bundle ID: 182
2013年10月7日 星期一
Unable 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)))
2013年8月1日 星期四
[ERROR] /Users/ming/src/osgi-camel/demo.service-bundle/src/main/java/demo/service/impl/TransformServiceImpl.java:[8,45] cannot find symbol
When you run tutorial of Camel OSGi in http://camel.apache.org/tutorial-osgi-camel-part1.html
You may got error after add the TransformService.
SOLUTION IS
To add the following line to TransformServiceImpl.java
The Error message as follows;
$ mvn clean install org.ops4j:maven-pax-plugin:eclipse [17:10:21]
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for demo.service:demo.service-bundle:bundle:0.1
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo.service-bundle [demo.service] 0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ demo.service-bundle ---
[INFO] Deleting /Users/ming/src/osgi-camel/demo.service-bundle/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo.service-bundle ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-pax-plugin:1.5:compile (default-compile) @ demo.service-bundle ---
[INFO] Compiling 5 source files to /Users/ming/src/osgi-camel/demo.service-bundle/target/classes
[INFO] [recovering meta-data]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.795s
[INFO] Finished at: Thu Aug 01 17:10:25 CST 2013
[INFO] Final Memory: 10M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.ops4j:maven-pax-plugin:1.5:compile (default-compile) on project demo.service-bundle: Compilation failure
[ERROR] /Users/ming/src/osgi-camel/demo.service-bundle/src/main/java/demo/service/impl/TransformServiceImpl.java:[8,45] cannot find symbol
[ERROR] symbol: class TransformService
[ERROR] public class TransformServiceImpl implements TransformService {
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Result:
$ mvn clean install org.ops4j:maven-pax-plugin:eclipse [18:00:40]
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.katdc.mediawalker2.demo.service:demo.service-bundle:bundle:0.1
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo.service-bundle [demo.service] 0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ demo.service-bundle ---
[INFO] Deleting /Users/ming/src/osgi-camel/demo.service-bundle/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo.service-bundle ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-pax-plugin:1.5:compile (default-compile) @ demo.service-bundle ---
[INFO] Compiling 5 source files to /Users/ming/src/osgi-camel/demo.service-bundle/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ demo.service-bundle ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/ming/src/osgi-camel/demo.service-bundle/src/test/resources
[INFO]
[INFO] --- maven-pax-plugin:1.5:testCompile (default-testCompile) @ demo.service-bundle ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @ demo.service-bundle ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-bundle-plugin:1.4.3:bundle (default-bundle) @ demo.service-bundle ---
[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)
[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
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ demo.service-bundle ---
[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
[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
[INFO]
[INFO] --- maven-bundle-plugin:1.4.3:install (default-install) @ demo.service-bundle ---
[INFO] Parsing file:/Users/ming/.m2/repository/repository.xml
[INFO] Installing com/katdc/mediawalker2/demo/service/demo.service-bundle/0.1/demo.service-bundle-0.1.jar
[INFO] Writing OBR metadata
[INFO]
[INFO] --- maven-pax-plugin:1.5:eclipse (default-cli) @ demo.service-bundle ---
[INFO] Using as WTP server : null
[INFO] Adding default classpath contaigner: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Using source status cache: /Users/ming/src/osgi-camel/demo.service-bundle/target/mvn-eclipse-cache.properties
[INFO] Not writing settings - defaults suffice
[INFO] File /Users/ming/src/osgi-camel/demo.service-bundle/.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO]
Sources for some artifacts are not available.
Please run the same goal with the -DdownloadSources=true parameter in order to check remote repositories for sources.
List of artifacts without a source archive:
o commons-logging:commons-logging-api:1.1
o org.osgi:osgi_R4_compendium:1.0
o org.osgi:osgi_R4_core:1.0
Javadoc for some artifacts is not available.
Please run the same goal with the -DdownloadJavadocs=true parameter in order to check remote repositories for javadoc.
List of artifacts without a javadoc archive:
o commons-logging:commons-logging-api:1.1
o org.osgi:osgi_R4_compendium:1.0
o org.osgi:osgi_R4_core:1.0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.310s
[INFO] Finished at: Thu Aug 01 18:00:54 CST 2013
[INFO] Final Memory: 12M/81M
[INFO] ------------------------------------------------------------------------
You may got error after add the TransformService.
SOLUTION IS
To add the following line to TransformServiceImpl.java
import demo.service.TransformService;
The Error message as follows;
$ mvn clean install org.ops4j:maven-pax-plugin:eclipse [17:10:21]
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for demo.service:demo.service-bundle:bundle:0.1
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo.service-bundle [demo.service] 0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ demo.service-bundle ---
[INFO] Deleting /Users/ming/src/osgi-camel/demo.service-bundle/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo.service-bundle ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-pax-plugin:1.5:compile (default-compile) @ demo.service-bundle ---
[INFO] Compiling 5 source files to /Users/ming/src/osgi-camel/demo.service-bundle/target/classes
[INFO] [recovering meta-data]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.795s
[INFO] Finished at: Thu Aug 01 17:10:25 CST 2013
[INFO] Final Memory: 10M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.ops4j:maven-pax-plugin:1.5:compile (default-compile) on project demo.service-bundle: Compilation failure
[ERROR] /Users/ming/src/osgi-camel/demo.service-bundle/src/main/java/demo/service/impl/TransformServiceImpl.java:[8,45] cannot find symbol
[ERROR] symbol: class TransformService
[ERROR] public class TransformServiceImpl implements TransformService {
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Result:
$ mvn clean install org.ops4j:maven-pax-plugin:eclipse [18:00:40]
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.katdc.mediawalker2.demo.service:demo.service-bundle:bundle:0.1
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo.service-bundle [demo.service] 0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ demo.service-bundle ---
[INFO] Deleting /Users/ming/src/osgi-camel/demo.service-bundle/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo.service-bundle ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-pax-plugin:1.5:compile (default-compile) @ demo.service-bundle ---
[INFO] Compiling 5 source files to /Users/ming/src/osgi-camel/demo.service-bundle/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ demo.service-bundle ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/ming/src/osgi-camel/demo.service-bundle/src/test/resources
[INFO]
[INFO] --- maven-pax-plugin:1.5:testCompile (default-testCompile) @ demo.service-bundle ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @ demo.service-bundle ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-bundle-plugin:1.4.3:bundle (default-bundle) @ demo.service-bundle ---
[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)
[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
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ demo.service-bundle ---
[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
[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
[INFO]
[INFO] --- maven-bundle-plugin:1.4.3:install (default-install) @ demo.service-bundle ---
[INFO] Parsing file:/Users/ming/.m2/repository/repository.xml
[INFO] Installing com/katdc/mediawalker2/demo/service/demo.service-bundle/0.1/demo.service-bundle-0.1.jar
[INFO] Writing OBR metadata
[INFO]
[INFO] --- maven-pax-plugin:1.5:eclipse (default-cli) @ demo.service-bundle ---
[INFO] Using as WTP server : null
[INFO] Adding default classpath contaigner: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Using source status cache: /Users/ming/src/osgi-camel/demo.service-bundle/target/mvn-eclipse-cache.properties
[INFO] Not writing settings - defaults suffice
[INFO] File /Users/ming/src/osgi-camel/demo.service-bundle/.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO]
Sources for some artifacts are not available.
Please run the same goal with the -DdownloadSources=true parameter in order to check remote repositories for sources.
List of artifacts without a source archive:
o commons-logging:commons-logging-api:1.1
o org.osgi:osgi_R4_compendium:1.0
o org.osgi:osgi_R4_core:1.0
Javadoc for some artifacts is not available.
Please run the same goal with the -DdownloadJavadocs=true parameter in order to check remote repositories for javadoc.
List of artifacts without a javadoc archive:
o commons-logging:commons-logging-api:1.1
o org.osgi:osgi_R4_compendium:1.0
o org.osgi:osgi_R4_core:1.0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.310s
[INFO] Finished at: Thu Aug 01 18:00:54 CST 2013
[INFO] Final Memory: 12M/81M
[INFO] ------------------------------------------------------------------------
2011年3月20日 星期日
2011年3月16日 星期三
how to update your bundle with maven 2.
mvn -P autoInstallBundle clean install -Dsling.url=http://175.41.252.xxx/system/console
why JCR properties not changed when a bundle re-install which expect to change the contents
update and re-install a bundle with a different content/helloworld.json may not change JCR data (properties).
You have to use http://175.41.252.xxx/.explorer.html# to change the data in stead.
You have to use http://175.41.252.xxx/.explorer.html# to change the data in stead.
2011年3月15日 星期二
I use sling for web app management.
1. get your sling runnning and you can see your current bundle by web console management.
http://sling.apache.org/site/installing-and-upgrading-bundles.html
2. a list of bundles is here
http://sling.apache.org/obr/sling.xml
http://sling.apache.org/site/installing-and-upgrading-bundles.html
2. a list of bundles is here
http://sling.apache.org/obr/sling.xml
訂閱:
文章 (Atom)