I currently try to port a Swing GUI to Eclipse RCP. In the old GUI we already use a CXF service over the camel jms transport. In Swing the service call works without any problems.
In the new Eclipse RCP GUI we use the same applicationContext that worked in the Swing case. We use the cxf and camel libraries as ordinary jars not as plugins. I am getting the exception attached below that complains about the connectionFactory not being set in JmsConfiguration. I have debugged the problem. When spring starts a JmsConfiguration object is initialized and the connectionFactory is set correctly. Then when the call happens a new JmsConfiguration is initialized without a connectionFactory set. So for me it seems Camel thinks it has not yet initialized the JmsConfiguration and tries to pull it up while sending. I guess it could have to do with the classloader in Eclipse. Are there any special considerations on Eclipse or in general on OSGI? Greetings Christian Christian Schneider Team Handel und Risikomanagement Informationsverarbeitung Business Solutions Trading EnBW Systeme Infrastruktur Support GmbH Informationsverarbeitung Business Solutions Handel und Dispatching Durlacher Allee 93 76131 Karlsruhe Tel : +49-(0)721-63-15482 Mail: [email protected] Sitz der Gesellschaft: Karlsruhe Handelsregister: Amtsgericht Mannheim HRB 108550 Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck Geschäftsführer: Jochen Adenau, Dr. Peter Krampf ----- 15:23:23 WARN RorcDAOImpl : Runtime-Exception caught: Failed to create Producer for endpoint: Endpoint[jms://queue.net.enbw.services.etg.risikocontrolling.produktgeschaef tsfreigabe.DealServiceV1]. Reason: java.lang.IllegalArgumentException: connectionFactory must be specified javax.xml.ws.soap.SOAPFaultException: Failed to create Producer for endpoint: Endpoint[jms://queue.net.enbw.services.etg.risikocontrolling.produktgeschaef tsfreigabe.DealServiceV1]. Reason: java.lang.IllegalArgumentException: connectionFactory must be specified at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146) at $Proxy61.createOrUpdateDeal(Unknown Source) at net.enbw.endur.interfaces.dealimport.RemotePwrPhysImportStrategy.importDeal( RemotePwrPhysImportStrategy.java:41) at net.enbw.endur.interfaces.dealimport.DealImportServiceImpl.importDeal(DealIm portServiceImpl.java:33) at net.enbw.endur.interfaces.rorc.daoimpl.RorcDAOImpl.importDeal(RorcDAOImpl.ja va:208) at net.enbw.endur.tradeImportGui.action.ImportToEndurAction.processDeals(Import ToEndurAction.java:75) at net.enbw.endur.tradeImportGui.action.ImportToEndurAction.access$0(ImportToEn durAction.java:66) at net.enbw.endur.tradeImportGui.action.ImportToEndurAction$1.run(ImportToEndur Action.java:53) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext .java:121) Caused by: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[jms://queue.net.enbw.services.etg.risikocontrolling.produktgeschaef tsfreigabe.DealServiceV1]. Reason: java.lang.IllegalArgumentException: connectionFactory must be specified at org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.j ava:116) at org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:175 ) at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:147) at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:170) at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:1) at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:141) at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:155) at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:111) at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.j ava:101) at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.j ava:88) at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.comm itOutputMessage(CamelConduit.java:170) at org.apache.camel.component.cxf.transport.CamelConduit$CamelOutputStream.doCl ose(CamelConduit.java:153) at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:185) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInter ceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain .java:236) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:478) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:308) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:260) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) ... 8 more Caused by: java.lang.IllegalArgumentException: connectionFactory must be specified at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:242) at org.apache.camel.component.jms.JmsConfiguration.createConnectionFactory(JmsC onfiguration.java:1156) at org.apache.camel.component.jms.JmsConfiguration.getConnectionFactory(JmsConf iguration.java:516) at org.apache.camel.component.jms.requestor.Requestor.createListenerContainer(R equestor.java:245) at org.apache.camel.component.jms.requestor.Requestor.getListenerContainer(Requ estor.java:173) at org.apache.camel.component.jms.requestor.Requestor.doStart(Requestor.java:20 4) at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52) at org.apache.camel.component.jms.JmsProducer.testAndSetRequestor(JmsProducer.j ava:108) ... 28 more
