Walid "jo" Gedeon wrote:
Not if you started libraries, but if you were starting fragments, then
there is an ordering issue. > Again, no reason to start fragments.
Yep, sorry, I just noticed that:[4.3.5] "Fragment bundles can not be started
and must cause a Bundle Exceptionwhen there is an attempt to start them."
I guess I will add this to my "to do" list to make sure they throw
exceptions. :-)
I will create a JIRA issue for that...
-> richard
On Mon, Nov 17, 2008 at 10:23 PM, Richard S. Hall <[EMAIL PROTECTED]>wrote:
Walid "jo" Gedeon wrote:
Sorry, it does work... I'm not sure what I was on about :-)
I think my issue was a little more complex than I had thought of at first.
I
removed all modules and re-installed them, and started only the
activatable
bundles. I'm not sure what made it break the previous time. Could it be
because I was starting the libraries?
Not if you started libraries, but if you were starting fragments, then
there is an ordering issue. Again, no reason to start fragments.
-> richard
On Mon, Nov 17, 2008 at 8:50 PM, Walid jo Gedeon <[EMAIL PROTECTED]>
wrote:
Ok, I'll dig some more. brb :-)
On Mon, Nov 17, 2008 at 8:41 PM, Richard S. Hall <[EMAIL PROTECTED]
wrote:
I am not sure what your scenario is, but here I load a host and
fragment,
start the host to attach the fragment, then stop the framework and
restart
and the fragment reattaches:
[heavyweight main]$ java -jar bin/felix.jar
Welcome to Felix.
=================
DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
-> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
cd file:/Users/rickhall/Projects/testbundles/fragment/
-> install host.jar
Bundle ID: 4
-> install fragment.jar
Bundle ID: 5
-> ps
START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (1.5.0.SNAPSHOT)
[ 1] [Active ] [ 1] Apache Felix Shell Service (1.1.0.SNAPSHOT)
[ 2] [Active ] [ 1] Apache Felix Shell TUI (1.1.0.SNAPSHOT)
[ 3] [Active ] [ 1] Apache Felix Bundle Repository
(1.3.0.SNAPSHOT)
[ 4] [Installed ] [ 1] Fragment Host (1.0.0)
[ 5] [Installed ] [ 1] Fragment (1.0.0)
-> start 4
DEBUG: WIRE: 4.0 -> org.osgi.framework -> 0
DEBUG: (FRAGMENT) WIRE: 4.0 -> org.ungoverned.bundle.fragment -> 5.0
Fragment locale test:
The default resource:
1:Starting the system...
2:Loading user's settings...
The French resource:
1:Commencer le syst̬me...
2:Les arrangements de l'utilisateur de chargement...
-> stop 0
-> [heavyweight main]$ java -jar bin/felix.jar
Welcome to Felix.
=================
DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
-> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 4.0 -> org.osgi.framework -> 0
DEBUG: (FRAGMENT) WIRE: 4.0 -> org.ungoverned.bundle.fragment -> 5.0
Fragment locale test:
The default resource:
1:Starting the system...
2:Loading user's settings...
The French resource:
1:Commencer le syst̬me...
2:Les arrangements de l'utilisateur de chargement...
-> ps
START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (1.5.0.SNAPSHOT)
[ 1] [Active ] [ 1] Apache Felix Shell Service (1.1.0.SNAPSHOT)
[ 2] [Active ] [ 1] Apache Felix Shell TUI (1.1.0.SNAPSHOT)
[ 3] [Active ] [ 1] Apache Felix Bundle Repository
(1.3.0.SNAPSHOT)
[ 4] [Active ] [ 1] Fragment Host (1.0.0)
[ 5] [Resolved ] [ 1] Fragment (1.0.0)
->
-> richard
Walid "jo" Gedeon wrote:
I'm good with that, thanks.
It works (just tried it), however it fails on next restart :-(
ERROR: Error starting file:///.../log4jconfi
g-fragment-0.0.1.jar (org.osgi.framework.BundleException: Unresolved
constraint in bundle 26: host; (bundle-symbolic-name=org.apache.log4j))
org.osgi.framework.BundleException: Unresolved constraint in bundle 26:
host; (bundle-symbolic-name=org.apache.log4j)
(stack trace)
I've tried a few other scenarios of not starting libraries, etc. And
they
all lead to a log4j service that's Active, and a fragment that's
installed;
and with the fragment either failing to attach to the service (error
message
from framework), or not loaded (error message from log4j).
:-S looks like an already activated system does not reboot in the same
state
--w