No it can't be done from your bundle, cause the resolver does take care of such things. The resolver is part of the framework. And usually this has been done with intention. Most likely it sounds like the cxf bundle could need a refresh to, so in that case a bundle:refresh without ID is best, cause it refreshes all bundles that need it.
regards, Achim 2014-09-23 15:38 GMT+02:00 Laci Gaspar <[email protected]>: > This is really tricky... > > What happens is the following: > I uninstall and reinstall a new version of a bundle which contains a camel > route. > Then I do a refresh camel-core, following your advice. > Then I call the WebService which I reinstalled and get the following > exception: > java.lang.ClassCastException: > org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory cannot be cast > to javax.xml.crypto.dsig.XMLSignatureFactory > > (We are using cxf sts for authorization) > > The other question is. Is there a better way to refresh camel-core? Can it > be done from within my bundle? > > Thanks > Laci > > > > On 15.09.2014 09:01, Achim Nierbeck wrote: > > Basically yes, > as in OSGi bundle keep the reference to the old bundle until a rewiring > has taken place. > A bundle:refresh does the same for all bundles, though I prefer to use it > for the explicit bundle in question. > > Regards, Achim > > sent from mobile device > Am 15.09.2014 08:25 schrieb "Laci Gaspar" <[email protected]>: > >> Hi Achim >> That's an interesting point. Does that mean, if every time I install a >> new version of a bundle containing a camel route, I have to refresh >> camel-core? >> >> thanks! >> Laci >> >> >> >> On 11.09.2014 08:40, Achim Nierbeck wrote: >> >> If your bundle contains a camel route you have to refresh the camel core >> bundle, cause that bundle holds references to the bundles containing camel >> routes. Unless you refresh the camel-core bundle it will still hold a >> reference to the old "route" as it didn't realize it's been replaced. >> >> regards, Achim >> >> >> 2014-09-11 8:36 GMT+02:00 Laci Gaspar <[email protected]>: >> >>> Hi JB >>> you put your finger right into it... I had a dynamic import of >>> org.apache.cxf.bundle there... >>> >>> The strange thing is that when I removed it, uninstalled the bundle >>> reinstalled it, it still didn't work. >>> I had to restart karaf for it to take effect. >>> >>> Thanks anyway! >>> Regards, >>> Laci >>> >>> >>> On 10.09.2014 19:28, Jean-Baptiste Onofré wrote: >>> >>>> Hi Laci, >>>> >>>> do you use dynamic import for the bundle providing the Camel route ? >>>> >>>> Regards >>>> JB >>>> >>>> On 09/10/2014 05:02 PM, Laci Gaspar wrote: >>>> >>>>> Hi >>>>> >>>>> I have a problem in one of my camer routes which is calling a WS from a >>>>> bean class. >>>>> >>>>> I get the following error: >>>>> java.lang.IllegalStateException: BeanFactory not initialized or already >>>>> closed - call 'refresh' before accessing beans via the >>>>> ApplicationContext >>>>> at >>>>> org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171) >>>>> >>>>> >>>>> at >>>>> org.springframework.context.support.AbstractApplicationContext.containsBean(AbstractApplicationContext.java:1133) >>>>> >>>>> >>>>> at >>>>> org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:158) >>>>> >>>>> >>>>> at >>>>> org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:128) >>>>> >>>>> >>>>> at >>>>> org.apache.cxf.frontend.ClientProxyFactoryBean.configureObject(ClientProxyFactoryBean.java:105) >>>>> >>>>> >>>>> at >>>>> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:133) >>>>> >>>>> >>>>> at >>>>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142) >>>>> >>>>> >>>>> at >>>>> org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:476) >>>>> at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:343) >>>>> at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:334) >>>>> at javax.xml.ws.Service.getPort(Service.java:46)[:2.2.0] >>>>> at >>>>> ch.curabill.msp.etg.messageResponseReceiver.MessageResponseSender.receiveMessageResponses(MessageResponseSender.java:89)[923:MessageResponseReceiver:1.2.0.SNAPSHOT] >>>>> >>>>> >>>>> >>>>> The WS is called using stubs created by cxf. >>>>> I suspect that it is a problem of "wrong wiring" but I don't know how >>>>> to >>>>> solve it. >>>>> >>>>> Any ideas would be most welcome. >>>>> >>>>> Thanks >>>>> Laci >>>>> >>>>> >>>> >>> >> >> >> -- >> >> Apache Member >> Apache Karaf <http://karaf.apache.org/> Committer & PMC >> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer >> & Project Lead >> blog <http://notizblog.nierbeck.de/> >> >> Software Architect / Project Manager / Scrum Master >> >> >> > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Software Architect / Project Manager / Scrum Master
