karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Tran <dant...@gmail.com>
Subject JMException throws during bundle reloads due to properties file changes
Date Wed, 11 Jan 2012 22:03:58 GMT
Hi I have a bundle with a MBean with it. When I changes a properties
belong to my bundle viat etc/my.bundle.cfg, karaf throws the following
execption


2012-01-11 13:33:54,221 | ERROR | rint Extender: 3 |
tServiceReferenceRecipe$Listener | tServiceReferenceRecipe$Listener
451 | 9 - org.apache.aries.blueprint - 0.3.1 | Error calling listener
method public void
org.apache.karaf.management.MBeanRegistrer.registerMBeanServer(javax.management.MBeanServer)
throws javax.management.JMException
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)[:1.7.0_b147]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_b147]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_b147]
        at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_b147]
        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)[9:org.apache.aries.blueprint:0.3.1]
        at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$Listener.invokeMethods(AbstractServiceReferenceRecipe.java:448)[9:org.apache.aries.blueprint:0.3.1]
        at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$Listener.bind(AbstractServiceReferenceRecipe.java:430)[9:org.apache.aries.blueprint:0.3.1]
        at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.bind(AbstractServiceReferenceRecipe.java:327)[9:org.apache.aries.blueprint:0.3.1]
        ........
Caused by: javax.management.InstanceAlreadyExistsException:
com.mycomp.mc.root:type=target,name=assets


So it seems karaf does not un-register my MBean first.


Note, and can use karaf shell to restart my bundle ( restart xyz), no
exception here.


 Is it a bug?

No so, after restart, the bundle 'seems' to operate, but I dont really
know the ramifications are.


One of work around, I am thinking, is to move the MBEANs another
bundle so that it never get reload. If it is a bug, should I go for
the workaround?


Thanks

-Dan

Mime
View raw message