Re: Jar signing support in Karaf
Hi All, Im using the following in my policy file: ALLOW { [ org.osgi.service.condpermadmin.BundleSignerCondition CN=\XYZ company\, OU=XXX, O=\XXX\, L=XXX, ST=XXX, C=XXX] ( java.security.AllPermission * *) } Signed by XYZ where the custom oraganisation certificate details are mentioned in the BundleSignerCondition. With this policy file, when I start my bundle, i get the following: In main loop, we have serious trouble: java.security.AccessControlException: access denied (org.osgi.framework.AdaptPermission org.osgi.framework.startlevel.FrameworkStartLevel adapt) java.security.AccessControlException: access denied (org.osgi.framework.AdaptPermission org.osgi.framework.startlevel.FrameworkStartLevel adapt) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366) at java.security.AccessController.checkPermission(AccessController.java:555) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at org.apache.felix.framework.BundleImpl.checkAdapt(BundleImpl.java:1026) at org.apache.felix.framework.Felix.adapt(Felix.java:475) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:301) If I give a generic policy like : ALLOW { ( java.security.AllPermission * * ) } 3 It works fine. Any ideas on getting around the exception? Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Jar-signing-support-in-Karaf-tp4040567p4040742.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Jar signing support in Karaf
Hi All, I want to deploy custom signed bundles (signed using organization specific jar signing authority) in Karaf 2.3.6 . Is this supported? I know I can configure the policy file giving AdminPermissions to the organisation specific jar signing authority, but I wanted to understand is how Karaf will pick up the right Certificate to validate the signed jars? I have the certifcate used udring jar signing. Where do I place this cert in Karaf configuration, that it is picked up during jar validation? Any help will be greatly appreciated. Thanks, SapnaB -- View this message in context: http://karaf.922171.n3.nabble.com/Jar-signing-support-in-Karaf-tp4040567.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
HTTPS support on Karaf 2.3.6
Hi All, I need to enable https support in Karaf 2.3.6 for all my REST Web services(internal testing). Have generated a self signed cert using openSSL(http://www.akadia.com/services/ssh_test_certificate.html) and imported the same in the karaf keystore(keytool -import -trustcacerts..) The following properties go in the org.ops4j.pax.web.cfg file: org.osgi.service.http.enabled=false org.osgi.service.http.port=8080 org.osgi.service.http.port.secure=8081 org.osgi.service.http.secure.enabled=true org.ops4j.pax.web.ssl.keystore=keystore.jks org.ops4j.pax.web.ssl.keystore.type=JKS org.ops4j.pax.web.ssl.password=password org.ops4j.pax.web.ssl.keypassword=password org.ops4j.pax.web.ssl.clientauthwanted=false org.ops4j.pax.web.ssl.clientauthneeded=false After restarting the server(so that properties take effect), I keep getting the following error from the browser when I try to access the REST URLS: CHROME: Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have. Error code: ERR_SSL_PROTOCOL_ERROR MOZILLA: An error occurred during a connection to vserv1418.us.oracle.com:8081. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long) Does anyone know the real issue? TIA, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/HTTPS-support-on-Karaf-2-3-6-tp4038662.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: List User installed bundles in Karaf from Java
Hi Timothy, Thanks for the tips. What I have done now is alter the bundle symbolic name to include Project Group and Artifact IDs, which are standard across all plugins developed by the team. Then filtering for specific plugins using symbolic names. But I guess Bundle-Vendor is another field I can use. -Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/List-User-installed-bundles-in-Karaf-from-Java-tp4034602p4035162.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Issue with feature Install
Hi, I'm using feature install in Karaf 2.3.6, where I deploy specific versions of dependent jars and bundles. Problem arises when I uninstall and then install the same version of a bundle individually(after feature install), mostly due to some bug fix. What I observe is that many times the changes are not reflected in Karaf. Only when I install a new version of the bundle, that I get the latest changes. Is it not recommended to deal with bundles individually after a feature install? I do not want to delete kar file and /data and start all over again. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Issue-with-feature-Install-tp4035163.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: List User installed bundles in Karaf from Java
Hi JB, I now have a requirement to print only installed application specific bundles, and not the dependent bundles. Ex: im using jersey jars in my bundle com.osgi.test/Test/0.0.1-SNAPSHOT, so Iv installed jersey jars on Karaf using the wrap command. Both jersey bundle and Test bundle have a start level=80. If I filter on startLevel=80, i get jersey as well. Whereas I want only Test bundle to be printed. One way is that I filter based on bundle name, but I don not want to use this approach, since I cannot force all bundle developers to follow some naming convention. Is there a way in pom/manifest, where I can specify the StartLevel which I want my bundle to have when it is installed in Karaf(ex: 100)? Im not using spring. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/List-User-installed-bundles-in-Karaf-from-Java-tp4034602p4034934.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: List User installed bundles in Karaf from Java
Hi JB StartLevel is deprecated in OSGi 4.3. Is there any equivalent service available which I can use? I tried BundleStartLevel, but that doesnt give me the desired results. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/List-User-installed-bundles-in-Karaf-from-Java-tp4034602p4034702.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: db commands not available in Karaf 2.3.2
Hi JB, I started my project with Karaf 2.3.2 and am using a number of dependent jars like jersey, jackson, commons-codec, javax etc. When I tried to upgrade to version 3.x, i got a lot of issues with such dependent jars with Karaf complaining of higher/lower versions. This dissuaded me from changing my version. Is there a better way of doing this? I do want to move to either 2.3.6 or 3.x versions of Karaf. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/db-commands-not-available-in-Karaf-2-3-2-tp4034053p4034688.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
List User installed bundles in Karaf from Java
Hi, When I execute the osgi:list command on Karaf 2.3.2, it lists down the bundles which I (user) have installed. I want a similar result through java code. But when I do context.getBundles() and filter ACTIVE bundles, I get the complete list installed in Karaf. Is there a way to get only user installed bundles through Java? Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/List-User-installed-bundles-in-Karaf-from-Java-tp4034602.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: List User installed bundles in Karaf from Java
Hi JB, Thanks.. this clarifies a lot. Is there any straight forward way to query the bundle level? I could not find any API available in the com.osgi.framework.Bundle class. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/List-User-installed-bundles-in-Karaf-from-Java-tp4034602p4034609.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Read password securely from Karaf CLI
Hi All, I have a requirement to read the clients' userid and password securely from the Karaf shell. Is there a way to do this? I have gone through the org.apache.karaf.shell.console.impl.jline.ConsoleImpl class, but cant understand the usage and constructor parameters. Can someone please point me to an example code? Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Read-password-securely-from-Karaf-CLI-tp4034419.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: db commands not available in Karaf 2.3.2
Hi Achim, Could we have a mention of the Karaf version being used in the tutorial series by Christian Schneider : http://www.liquid-reality.de/display/liquid/2011/02/15/Karaf+Tutorial+Part+1+-+Installation+and+First+application http://www.liquid-reality.de/display/liquid/2011/09/23/Karaf+Tutorial+Part+2+-+Using+the+Configuration+Admin+Service The tutorials are great, but do not specify the Karaf version. Are they applicable for both 2.3.x and 3.x series? Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/db-commands-not-available-in-Karaf-2-3-2-tp4034053p4034114.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
db commands not available in Karaf 2.3.2
Hi All, Im using Karaf 2.3.2 and need to interact with Derby DB through my bundles. I have installed the Derby driver 10.10.1.1 as directed in http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access I have also deployed the datasource-derby.xml blueprint file as directed in : https://github.com/cschneider/Karaf-Tutorial/blob/master/db/datasource/datasource-derby.xml both the bundles are now ACTIVE in Karaf: [ 242] [Active ] [] [ ] [ 80] Apache Derby 10.10 (10.10.101.1458268) [ 243] [Active ] [Created ] [ ] [ 80] datasource-derby.xml (0.0.0) But when I try to use any of the db: commands, I cant find them in the command list. Am I missing some step here? Kindly help. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/db-commands-not-available-in-Karaf-2-3-2-tp4034053.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: db commands not available in Karaf 2.3.2
Hi Achim, Does this mean that since my derby jars are now deployed in Karaf 2.3.2, I can use the derby datasource in my bundle to interact with the Derby DB? Just that I wont be able to view the DB data through Karaf since 2.3.2 does not support db commands. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/db-commands-not-available-in-Karaf-2-3-2-tp4034053p4034064.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: apache-karaf-3.0.1-src.tar.gz is just 9KB when downloaded
Thanks JB, I directly downloaded apache-karaf-3.0.1.tar.gz from the mirror location specified by you. http://mirrors.ircam.fr/pub/apache/karaf/3.0.1/ Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/apache-karaf-3-0-1-tar-gz-is-just-9KB-when-downloaded-tp4033967p4033972.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf does not startup on Windows 7
Hi JB, I didnt mention it in the forum, but exactly as you said, 3.0.1 gets stuck while starting. The background processes of loading the bundles goes on, because I could see the log file and instance.properties getting updated, but it just doesn't start up. I havent tried 2.3.5 yet. 2.3.2 still gives the same problem for me, even after installing the JDK 7 in a separate folder with no spaces. Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-does-not-startup-on-Windows-7-tp4033876p4033976.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf does not startup on Windows 7
Hi Christoph, Im using JDK 1.6. JAVA_HOME is set to : C:\Program Files\Java\jdk1.6.0_24 Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-does-not-startup-on-Windows-7-tp4033876p4033902.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf does not startup on Windows 7
Sorry, I should have mentioned that too. Yes its Sun/Oracle JDK. Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-does-not-startup-on-Windows-7-tp4033876p4033906.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf does not startup on Windows 7
Hi Christoph, I tried with Sun JDK 1.7 by setting the JAVA_HOME to C:\Program Files\Java\jdk1.7.0_60. I still get the same error: D:\OSGi\apache-karaf-2.3.2bin\karaf.bat karaf.bat: Ignoring predefined value for KARAF_HOME Unable to update instance pid: Child instance started but no root registered in D:\OSGi\apache-karaf-2.3.2\instances\instance.properties Karaf can't startup, make sure the log file can be accessed and written by the user starting Karaf : D:\OSGi\apache-karaf-2.3.2\mvn:org.apache.felix\org.apache. felix.framework\4.2.1 Do you want me to specifically try with another java 6 version? Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-does-not-startup-on-Windows-7-tp4033876p4033907.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf does not startup on Windows 7
Hi Achim, I tried running as an admin.. No luck, gives me the same error. Is Maven a prerequisite? I havent installed that in my system. What does the error highlighted below mean? Looks to me to be reference to maven repository. Karaf can't startup, make sure the log file can be accessed and written by the user starting Karaf : *D:\OSGi\apache-karaf-2.3.2\mvn:org.apache.felix\org.apache.felix.framework\4.2.1* Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-does-not-startup-on-Windows-7-tp4033876p4033909.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf does not startup on Windows 7
Hi JB, Achim, Iv installed Maven now and tried to start karaf 2.3.2. Same error. Here are snippets from the cmd: C:\Users\sapbhargmvn --version Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T19:21:4 2+05:30) Maven home: C:\Program Files\Apache\apache-maven-3.2.2 Java version: 1.6.0_24, vendor: Sun Microsystems Inc. Java home: C:\Program Files\Java\jdk1.6.0_24\jre Default locale: en_US, platform encoding: Cp1252 OS name: windows 7, version: 6.1, arch: amd64, family: windows D:\OSGi\apache-karaf-2.3.2bin\karaf.bat karaf.bat: Ignoring predefined value for KARAF_HOME Unable to update instance pid: Child instance started but no root registered in D:\OSGi\apache-karaf-2.3.2\instances\instance.properties Karaf can't startup, make sure the log file can be accessed and written by the user starting Karaf : D:\OSGi\apache-karaf-2.3.2\mvn:org.apache.felix\org.apache.felix.framework\4.2.1 D:\OSGi\apache-karaf-2.3.2echo %Path% ;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;*C:\Program Files\Java\jdk1.6.0_24\bin*;C:\Program Files\TortoiseSVN\bin;D:\Softwares\ANT\apache-ant-1.9.2\bin;C:\Program Files\Apache\apache-maven-3.2.2\bin D:\OSGi\apache-karaf-2.3.2echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_24 Wonder what Im doing wrong. Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-does-not-startup-on-Windows-7-tp4033876p4033914.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Karaf does not startup on Windows 7
Hi All, Im trying to start the Apache Karaf(both 2.3.2 and 3.0.1) from Windows 7, but keep getting the following error message: karaf.bat: Ignoring predefined value for KARAF_HOME Unable to update instance pid: Child instance started but no root registered in D:\Softwares\OSGi\apache-karaf-2.3.2\instances\instance.properties Karaf can't startup, make sure the log file can be accessed and written by the user starting Karaf : D:\Softwares\OSGi\apache-karaf-2.3.2\mvn:org.apache.felix\org.apache.felix.framework\4.2.1 Can someone explain what the error means and how can I resolve it? Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-does-not-startup-on-Windows-7-tp4033876.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf does not startup on Windows 7
Hi JB, Yes, thats how I start the Karaf instance. Both versions(2.3.2, 3.0.1) work fine in linux, but im unable to get them working in Windows 7. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-does-not-startup-on-Windows-7-tp4033876p4033880.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf unable to start in Eclipse Juno
Hi All, I see lot of similar issues of NPE, or inability to start karaf from eclipse in the link below: https://code.google.com/a/eclipselabs.org/p/eik/issues/list Is a resolution available to these problems in any new Karaf version? I have tried the following EIK versions, and none of them worked with Helios/Juno/Kepler eik-0.5.3, eik-juno-0.5-201210141349-snapshot, org.apache.karaf.eik.repository-0.9.0 Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-unable-to-start-in-Eclipse-Juno-tp4033834p4033881.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Missing Constraint: Import-Package: com.sun.jersey.api.client
Is there a way I can add jersey jars as bundles in Karaf libs. That way when I start Karaf, these bundles will be loaded at startup and all the classes will be available at runtime. From the error message, I understand that Karaf is unable to resolve this dependency: Reason: Missing Constraint: Import-Package: com.sun.jersey.api.client; version=[1.18.0,2.0.0) -Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Missing-Constraint-Import-Package-com-sun-jersey-api-client-tp4033550p4033562.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Missing Constraint: Import-Package: com.sun.jersey.api.client
Did that too.. Uninstalled all the jersey jars I had deployed earlier on Karaf, and re-deployed using the wrap command. Also re-installed my bundle.. but the problem still exists. I wish Karaf gave more explanatory error messages. I really cant find anything to resolve this exception :( Unable to start bundle 402: The bundle Test_0.0.1.SNAPSHOT [402] could not be resolved. Reason: Missing Constraint: Import-Package: com.sun.jersey.api.client; version=[1.18.0,2.0.0) -- View this message in context: http://karaf.922171.n3.nabble.com/Missing-Constraint-Import-Package-com-sun-jersey-api-client-tp4033550p4033565.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Missing Constraint: Import-Package: com.sun.jersey.api.client
Hi All, Thanks for the help. I was able to resolve the issue by installing jersey-client using the wrap command. Package *com.sun.jersey.api.client* is under jerser-client jar which was earlier not installed in Karaf. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Missing-Constraint-Import-Package-com-sun-jersey-api-client-tp4033550p4033590.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Missing Constraint: Import-Package: com.sun.jersey.api.client
Hi All, I have added some client code in my osgi bundle using jersey. I have added jersey-bundle dependency in my pom.xml as below: dependency groupIdcom.sun.jersey/groupId artifactIdjersey-bundle/artifactId version1.18.1/version /dependency The imported packages in my class are: com.sun.jersey.api.client.* and thats why the Import Package section of pom.xml looks like: Import-Package com.sun.jersey.api.client, org.apache.felix.service.command, org.apache.felix.gogo.commands, org.apache.karaf.shell.console, * /Import-Package problem is after installation, once I start the bundle, I get the following error: Reason: Missing Constraint: Import-Package: com.sun.jersey.api.client; version=[1.18.0,2.0.0) Im really not able to figure out what karaf is trying to say, since I can see the following imports in my manifest: Import-Package: com.sun.jersey.api.client;version=[1.18,2),com.sun.jer sey.api.client.config;version=[1.18,2),javax.ws.rs.core;version=[1.1 ,2),org.apache.felix.gogo.commands;version=[0.10,1),org.apache.felix .service.command;version=[0.10,1);status=provisional,org.apache.karaf .shell.console;version=[2.2,3),org.osgi.service.blueprint;version=[1 .0.0,2.0.0) Any help is greatly appreciated. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Missing-Constraint-Import-Package-com-sun-jersey-api-client-tp4033550.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Missing Constraint: Import-Package: com.sun.jersey.api.client
Hi Matt, I installed all the required jersey jars in karaf and started them too as below: install mvn:com.sun.jersey/jersey-core/1.18.1 install mvn:com.sun.jersey/jersey-server/1.18.1 install mvn:javax.ws.rs/jsr311-api/1.1.1 install mvn:com.sun.jersey/jersey-json/1.18.1 install mvn:org.codehaus.jackson/jackson-core-asl/1.9.2 install mvn:org.codehaus.jackson/jackson-jaxrs/1.9.2 install mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.2 install mvn:org.codehaus.jettison/jettison/1.1 start 362 363 364 365 366 367 368 369 But I still get the same error on starting my bundle: Unable to start bundle 370: The bundle Test_0.0.1.SNAPSHOT [370] could not be resolved. Reason: Missing Constraint: Import-Package: com.sun.jersey.api.client; version=[1.18.0,2.0.0) -Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Missing-Constraint-Import-Package-com-sun-jersey-api-client-tp4033550p4033554.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Missing Constraint: Import-Package: com.sun.jersey.api.client
Hi Matt, I get manifest headers as well as the import/export packages with dependencies, when I run osgi:headers on the above Bundle ids. The command run on my bundle gives: Apache Karaf :: Shell test/test-mcds Commands (370) --- Manifest-Version = 1.0 Bnd-LastModified = 1402976384349 Tool = Bnd-1.50.0 Built-By = sapbharg Build-Jdk = 1.6.0_24 Created-By = Apache Maven Bundle Plugin Bundle-Name = Apache Karaf :: Shell test/test-mcds Commands Bundle-Description = Provides the test custom command Bundle-SymbolicName = Test Bundle-Version = 0.0.1.SNAPSHOT Bundle-ManifestVersion = 2 Import-Package = com.sun.jersey.api.client;version=[1.18,2), com.sun.jersey.api.client.config;version=[1.18,2), javax.ws.rs.core;version=[1.1,2), org.apache.felix.gogo.commands;version=[0.10,1), org.apache.felix.service.command;status=provisional;version=[0.10,1), org.apache.karaf.shell.console;version=[2.2,3), org.osgi.service.blueprint;version=[1.0.0,2.0.0) Export-Package = test.command; uses:=org.apache.karaf.shell.console, com.sun.jersey.api.client.config, org.apache.felix.gogo.commands, com.sun.jersey.api.client, javax.ws.rs.core; version=0.0.1.SNAPSHOT Is there anything specific ur looking at? -Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Missing-Constraint-Import-Package-com-sun-jersey-api-client-tp4033550p4033556.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf blueprint Failure while extending console
Hi, I did use the maven-bundle-plugin to bundle the plugin and have the relevant manifest now. The build is successful, but when I try and start the bundle in karaf, I get the following exception: ERROR: Bundle org.apache.karaf.shell.samples.shell-sample-commands [98] Error starting mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT (org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.karaf.shell.samples.shell-sample-commands [98]: Unable to resolve 98.0: missing requirement [98.0] osgi.wiring.package; ((osgi.wiring.package=org.apache.felix.karaf.shell.console)(version=1.4.0)(!(version=2.0.0 org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.karaf.shell.samples.shell-sample-commands [98]: Unable to resolve 98.0: missing requirement [98.0] osgi.wiring.package; ((osgi.wiring.package=org.apache.felix.karaf.shell.console)(version=1.4.0)(!(version=2.0.0))) at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826) at org.apache.felix.framework.Felix.startBundle(Felix.java:1868) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295) at java.lang.Thread.run(Thread.java:722) Any pointers on how I can get rid of this exception and run the bundle successfully? Thanks in advance, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033375.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf blueprint Failure while extending console
Hi JB, I used maven 3.2.1 (mvn archetype:create) to create the command bundle. Im usign Karaf 2.3.2 and the manual Im referring to is : http://karaf.apache.org/manual/latest-2.2.x/developers-guide/extending-console.html The maven dependency to karaf shell console is as below: dependency groupIdorg.apache.karaf.shell/groupId artifactIdorg.apache.karaf.shell.console/artifactId version2.2.11/version /dependency I guess I need to find out where the dependency to org.apache.*felix*.karaf.shell.console is coming from. Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033377.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf blueprint Failure while extending console
Hi All, Thanks for all the suggestions. I could now execute the bundle. I uninstalled the existing erroneous bundle and installed again. That did away with the incorrect dependency on org.apache.*felix*.karaf.shell.console. Regards, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033379.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf blueprint Failure while extending console
Hi All, Im using Karaf 2.3.2 and face the same issue (test:hello Command not found) while executing the sample console extension project on the Karaf Manual: http://karaf.apache.org/manual/latest-2.2.x/developers-guide/extending-console.html Is there resolution for this problem? osgi:list shows: [ 94] [Active ] [Failure ] [ ] [ 80] mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT Log file shows the follwoing stackTrace: 2014-05-29 23:15:04,448 | ERROR | l Console Thread | BlueprintContainerImpl | container.BlueprintContainerImpl 393 | 7 - org.apache.aries.blueprint.core - 1.1.0 | Unable to start blueprint container for bundle null java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:604)[:1.7.0_11] at java.util.ArrayList.get(ArrayList.java:382)[:1.7.0_11] at org.apache.aries.blueprint.container.BlueprintContainerImpl.readDirectives(BlueprintContainerImpl.java:211)[7:org.apache.aries.blueprint.core:1.1.0] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:283)[7:org.apache.aries.blueprint.core:1.1.0] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:261)[7:org.apache.aries.blueprint.core:1.1.0] Does anyone has an idea to this problem? -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p409.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf blueprint Failure while extending console
Hi All, In continuation with the above post, in the log files, I see 2014-05-29 23:15:04,448 | ERROR | l Console Thread | BlueprintContainerImpl | container.BlueprintContainerImpl 393 | 7 - org.apache.aries.blueprint.core - 1.1.0 | *Unable to start blueprint container for bundle null* Why is the bundle name null? Is there some configuration required in the blueprint.xml file to provide an id to the bundle? Any help will be greatly appreciated. Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033340.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Karaf blueprint Failure while extending console
Hi Krzysztof, i created the bundle project using mvn archetype, and then generated an eclipse project from maven using mvn eclipse:eclipse. The project was bundled using mvn install. I the jar, I do see a manifest.mf with the following entries: Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: sapbharg Build-Jdk: 1.7.0_25 The version, artifact-id, groupId etc are configured in the pom.xml. Do i need to specifically create a manifest file with all this data? Thanks, Sapna -- View this message in context: http://karaf.922171.n3.nabble.com/Karaf-blueprint-Failure-while-extending-console-tp4029372p4033342.html Sent from the Karaf - Dev mailing list archive at Nabble.com.