Re: Bundle lost after shutdown

2010-11-08 Thread Jorge Riquelme
Guillaume, I can reproduce the issue with karaf 2.1.0 and the attached
files: a test feature file, plus custom.properties and jre.properties
(stolen from smix :p).

First, load the features.xml file and install the contentcompass feature:

ka...@root features:addurl file:/home/totex/features.xml
ka...@root features:install contentcompass
ka...@root list
START LEVEL 100 , List Threshold: 50
   ID   State Blueprint  Level  Name
[  31] [Active ] [Created ] [   60] Apache Karaf :: Shell
ConfigAdmin Commands (2.1.0)
[  32] [Active ] [] [   60] Apache Aries Transaction
Manager (0.2.0.incubating)
[  33] [Active ] [] [   60] Apache ServiceMix :: Specs
:: Stax API 1.0 (1.6.0.SNAPSHOT)
...
[  70] [Active  ] [] [   60] Apache CXF Bundle Jar (2.2.11)
...
[  84] [Active ] [] [   60] Clerezza Ext - Jena OSGi
Bundle (0.6.0.incubating-SNAPSHOT)

All bundles are active. Then, shutdown (ctrl+d) and restart:

ka...@root ERROR: Error starting mvn:org.apache.cxf/cxf-bundle/2.2.11
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.cxf.bundle [70]: Unable to resolve 70.0: missing
requirement [70.0] package; (package=javax.transaction.xa))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.cxf.bundle [70]: Unable to resolve 70.0: missing
requirement [70.0] package; (package=javax.transaction.xa)
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1143)
at 
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:636)

ka...@root list
START LEVEL 100 , List Threshold: 50
   ID   State Blueprint  Level  Name
[  31] [Active ] [Created ] [   60] Apache Karaf :: Shell
ConfigAdmin Commands (2.1.0)
[  33] [Active ] [] [   60] Apache ServiceMix :: Specs
:: Stax API 1.0 (1.6.0.SNAPSHOT)
[  34] [Active ] [] [   60] Stax2 API (3.0.2)
...
[  70] [Installed  ] [] [   60] Apache CXF Bundle Jar (2.2.11)
...
[  84] [Active ] [] [   60] Clerezza Ext - Jena OSGi
Bundle (0.6.0.incubating-SNAPSHOT)

Bundle 32 is lost, and bundle 70 isn't running for the missing dependency. Then:

ka...@root install -s
mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/0.2-incubating
Bundle ID: 85
ka...@root restart 70

After manually reinstall the bundle, the problem doesn't happen
anymore (all loads fine after shutdown and restart).


saludos

2010/11/8 Guillaume Nodet gno...@gmail.com:
 Can you reproduce the problem easily ? If so, could you please give
 the exact steps you use to reproduce the problem ?

 On Mon, Nov 8, 2010 at 04:21, Jorge Riquelme to...@totex.cl wrote:
 Hi list, i'm having a problem with karaf 2.1.1-SNAPSHOT with a
 particular bundle
 (mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/0.2-incubating).
 I start from a fresh install of karaf and deploy my feature; all
 fine:

 ka...@root list
 START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Spring    Level  Name
 ...
 [  43] [Active     ] [            ] [       ] [   60]
 spring-osgi-extender (1.2.0)
 [  44] [Active     ] [            ] [       ] [   60]
 spring-osgi-annotation (1.2.0)
 [  45] [Active     ] [            ] [       ] [   60] Apache Aries
 Transaction Manager (0.2.0.incubating)
 [  46] [Active     ] [            ] [       ] [   60] Apache
 ServiceMix :: Specs :: Stax API 1.0 (1.6.0.SNAPSHOT)
 [  47] [Active     ] [            ] [       ] [   60] Stax2 API (3.0.2)
 ...

 After, when I restart karaf, the bundle 45 is lost and I get several
 exceptions from the other dependent bundles (of aries tx):

 ka...@root ERROR: Error starting mvn:org.apache.cxf/cxf-bundle/2.2.11
 (org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.cxf.bundle [83]: Unable to resolve 83.0: missing
 requirement [83.0] package; (package=javax.transaction.xa))
 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.cxf.bundle [83]: Unable to resolve 83.0: missing
 requirement [83.0] package; (package=javax.transaction.xa)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
        at 
 org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1143)
        at 
 org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:636)
 ERROR: Error starting
 wrap:mvn:com.openlinksw/virt_jena/2.6.2,mvn:cl.toeska/contentcompass-features/1.0.0-SNAPSHOT/bnd/virt_jena-2.6.2
 (org.osgi.framework.BundleException: Unresolved constraint in bundle
 

Re: Bundle dependency visualization

2010-11-08 Thread Mike Van



There are a few karaf-command-line options which should help you: 



Mikes-Awesome-Karaf-Build  exports bundleId 

Mikes-Awesome-Karaf-Build  imports bundleId 

Mikes-Awesome-Karaf-Build  exports | grep the package you want to see 

Mikes-Awesome-Karaf-Build  imports | grep the package you want to look for 

Mikes-Awesome-Karaf-Build  dev:show-tree 



I'd like to say that you can also look for imports and exports in the Eclipse 
debugger, but that would be a lie.  So, the above stuff is what I normally use. 



v/r, 



Mike Van 


- Original Message - 
From: Andreas Gies [via Karaf] 
ml-node+1864727-692683097-228...@n3.nabble.com 
To: Mike Van mvangeert...@comcast.net 
Sent: Monday, November 8, 2010 2:29:49 PM 
Subject: Re: Bundle dependency visualization 

Hi Mike, 

thanks for this. I am aware of the Eclipse tool. However, I was wondering if 
something similar was there working on OSGi bundles and their manifests rather 
than working on pom files. 

For example, with the Dependency graph I wouldn't see dependencies that I have 
sucked into my OSGi container using the wrap: url support. Also, if I have 3rd 
party bundles that have not been built with maven, I would be blind to them I 
believe ? 

I was thinking along the lines of a tool that kind of relates the import/export 
packages of the bundles ? 

Thanks 
Andreas 
  





View message @ 
http://karaf.922171.n3.nabble.com/Bundle-dependency-visualization-tp1864059p1864727.html
 
To start a new topic under Karaf - User, email 
ml-node+930749-917263437-228...@n3.nabble.com 
To unsubscribe from Karaf - User, click here . 

-- 
View this message in context: 
http://karaf.922171.n3.nabble.com/Bundle-dependency-visualization-tp1864059p1864795.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Bundle lost after shutdown

2010-11-08 Thread Guillaume Nodet
The problem happens because the features service does not remove the
blank characters before and after the bundles urls and it looks like
the felix framework will not reload bundles with such invalid urls.
I've just raised KARAF-268 which I'll try to fix later today.

On Mon, Nov 8, 2010 at 20:23, Jorge Riquelme to...@totex.cl wrote:
 Guillaume, I can reproduce the issue with karaf 2.1.0 and the attached
 files: a test feature file, plus custom.properties and jre.properties
 (stolen from smix :p).

 First, load the features.xml file and install the contentcompass feature:

 ka...@root features:addurl file:/home/totex/features.xml
 ka...@root features:install contentcompass
 ka...@root list
 START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Level  Name
 [  31] [Active     ] [Created     ] [   60] Apache Karaf :: Shell
 ConfigAdmin Commands (2.1.0)
 [  32] [Active     ] [            ] [   60] Apache Aries Transaction
 Manager (0.2.0.incubating)
 [  33] [Active     ] [            ] [   60] Apache ServiceMix :: Specs
 :: Stax API 1.0 (1.6.0.SNAPSHOT)
 ...
 [  70] [Active  ] [            ] [   60] Apache CXF Bundle Jar (2.2.11)
 ...
 [  84] [Active     ] [            ] [   60] Clerezza Ext - Jena OSGi
 Bundle (0.6.0.incubating-SNAPSHOT)

 All bundles are active. Then, shutdown (ctrl+d) and restart:

 ka...@root ERROR: Error starting mvn:org.apache.cxf/cxf-bundle/2.2.11
 (org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.cxf.bundle [70]: Unable to resolve 70.0: missing
 requirement [70.0] package; (package=javax.transaction.xa))
 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.cxf.bundle [70]: Unable to resolve 70.0: missing
 requirement [70.0] package; (package=javax.transaction.xa)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
        at 
 org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1143)
        at 
 org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:636)

 ka...@root list
 START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Level  Name
 [  31] [Active     ] [Created     ] [   60] Apache Karaf :: Shell
 ConfigAdmin Commands (2.1.0)
 [  33] [Active     ] [            ] [   60] Apache ServiceMix :: Specs
 :: Stax API 1.0 (1.6.0.SNAPSHOT)
 [  34] [Active     ] [            ] [   60] Stax2 API (3.0.2)
 ...
 [  70] [Installed  ] [            ] [   60] Apache CXF Bundle Jar (2.2.11)
 ...
 [  84] [Active     ] [            ] [   60] Clerezza Ext - Jena OSGi
 Bundle (0.6.0.incubating-SNAPSHOT)

 Bundle 32 is lost, and bundle 70 isn't running for the missing dependency. 
 Then:

 ka...@root install -s
 mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/0.2-incubating
 Bundle ID: 85
 ka...@root restart 70

 After manually reinstall the bundle, the problem doesn't happen
 anymore (all loads fine after shutdown and restart).


 saludos

 2010/11/8 Guillaume Nodet gno...@gmail.com:
 Can you reproduce the problem easily ? If so, could you please give
 the exact steps you use to reproduce the problem ?

 On Mon, Nov 8, 2010 at 04:21, Jorge Riquelme to...@totex.cl wrote:
 Hi list, i'm having a problem with karaf 2.1.1-SNAPSHOT with a
 particular bundle
 (mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/0.2-incubating).
 I start from a fresh install of karaf and deploy my feature; all
 fine:

 ka...@root list
 START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Spring    Level  Name
 ...
 [  43] [Active     ] [            ] [       ] [   60]
 spring-osgi-extender (1.2.0)
 [  44] [Active     ] [            ] [       ] [   60]
 spring-osgi-annotation (1.2.0)
 [  45] [Active     ] [            ] [       ] [   60] Apache Aries
 Transaction Manager (0.2.0.incubating)
 [  46] [Active     ] [            ] [       ] [   60] Apache
 ServiceMix :: Specs :: Stax API 1.0 (1.6.0.SNAPSHOT)
 [  47] [Active     ] [            ] [       ] [   60] Stax2 API (3.0.2)
 ...

 After, when I restart karaf, the bundle 45 is lost and I get several
 exceptions from the other dependent bundles (of aries tx):

 ka...@root ERROR: Error starting mvn:org.apache.cxf/cxf-bundle/2.2.11
 (org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.cxf.bundle [83]: Unable to resolve 83.0: missing
 requirement [83.0] package; (package=javax.transaction.xa))
 org.osgi.framework.BundleException: Unresolved constraint in bundle
 org.apache.cxf.bundle [83]: Unable to resolve 83.0: missing
 requirement [83.0] package; (package=javax.transaction.xa)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
        at 
 org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1143)
        at 
 

Re: Delay a Start-level?

2010-11-08 Thread Mike Van



There are no such things as stupid questions.  Just my opinion. 



v/r, 



Mike Van 


- Original Message - 
From: Kit Plummer [via Karaf] ml-node+1865644-84520632-228...@n3.nabble.com 
To: Mike Van mvangeert...@comcast.net 
Sent: Monday, November 8, 2010 5:07:36 PM 
Subject: Re: Delay a Start-level? 

Ok, sorry for the stupid questions.  How do I get a hold of the 
ConnectionFactory provided by localhost-broker.xml via a blueprint config? 

Kit 

On Nov 8, 2010, at 1:42 PM, Guillaume Nodet wrote: 


 Doesn't the localhost-broker.xml created by default already export a 
 JmsConnectionFactory in the OSGi registry ? 
 If not , you could add it there. 
 
 Else, I suppose what you do is ok. 
 
 
 On Mon, Nov 8, 2010 at 18:58, Kit Plummer  [hidden email]  wrote: 
 
 The broker is loaded by the ActiveMQ feature - I guess by the 
 localhost-broker.xml config...which is the last thing to load during startup 
 (after activemq:create-broker --type blueprint is run).  So I don't have a 
 good way to expose the ConnectionFactory.  I did create a local class that 
 extends ActiveMQConnectionFactory, and then gets exported in another bundle. 
 I put a simple loop in the start method that spins until a connection is 
 made.  But, the other bundle that actually is connecting, starts up even 
 with or without the connection being made.  So I guess the export is 
 resolved before the start method finishes. 
 
 I'm not sure this makes a lot of sense...sorry for that. 
 
 I don't suppose there is some magic blueprint require that can be put in 
 the bean definition? 
 
 Kit 
 -- 
 View this message in context: 
 http://karaf.922171.n3.nabble.com/Delay-a-Start-level-tp1850174p1864241.html 
 Sent from the Karaf - User mailing list archive at Nabble.com. 
 
 
 
 
 -- 
 Cheers, 
 Guillaume Nodet 
  
 Blog: http://gnodet.blogspot.com/ 
  
 Open Source SOA 
 http://fusesource.com 




View message @ 
http://karaf.922171.n3.nabble.com/Delay-a-Start-level-tp1850174p1865644.html 
To start a new topic under Karaf - User, email 
ml-node+930749-917263437-228...@n3.nabble.com 
To unsubscribe from Karaf - User, click here . 

-- 
View this message in context: 
http://karaf.922171.n3.nabble.com/Delay-a-Start-level-tp1850174p1865819.html
Sent from the Karaf - User mailing list archive at Nabble.com.