Когда я пытаюсь запустить мой OSGi расслоения он не за ошибки ...CamelContext (wsBlueprintContext) за счет Уже назначения на
14:06:46,086 | ERROR | l Console Thread | BlueprintCamelContext | 234 - org.apache.camel.camel-blueprint - 2.17.0.redhat-630187 | Error occurred during starting Camel: CamelContext(wsBlueprintContext) due Already a destination on http://hostDomainName:80/cxf/sentence java.lang.RuntimeException: Already a destination on http://hostDomainName:80/cxf/sentence
at org.apache.cxf.transport.http.DestinationRegistryImpl.addDestination(DestinationRegistryImpl.java:50)
Вот фрагмент кода из файла XML план ...
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:cxf="http://cxf.apache.org/blueprint/core"
xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
http://camel.apache.org/schema/blueprint/cxf http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd
http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd">
<camelcxf:cxfEndpoint id="sentenceEndpoint"
loggingFeatureEnabled="true" address="{{sentenceHttpAddress}}"
serviceClass="gov.mcjn.it.sentence.ws._interface._1_0.SentenceInterface">
<camelcxf:features>
<wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing" />
</camelcxf:features>
</camelcxf:cxfEndpoint>
<camelcxf:cxfEndpoint id="sentenceResponseEndpoint"
loggingFeatureEnabled="true" address="{{sentenceResponseHttpAddress}}"
serviceClass="gov.ojp.it.commonresponse._1_0.ws.receivingagency.ResponseInterface">
<camelcxf:features>
<wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing" />
</camelcxf:features>
</camelcxf:cxfEndpoint>
<camelContext trace="true" id="wsBlueprintContext"
xmlns="http://camel.apache.org/schema/blueprint">
<route id="cxfSentenceService">
<from uri="cxf:bean:sentenceEndpoint" />
<removeHeaders pattern="Expect" />
<inOnly uri="activemq:incomingSentence?jmsMessageType=Object" />
<bean ref="sentenceResponseProcessor" />
</route>
<route id="cxfSentenceResponseService">
<from uri="cxf:bean:sentenceResponseEndpoint" />
<removeHeaders pattern="Expect" />
<inOnly
uri="activemq:incomingSentenceResponse?jmsMessageType=Object" />
<process ref="sentenceAsyncResponseProcessor" />
</route>
Этот фрагмент кода от файла мои свойства ...
sentenceResponseHttpAddress=http://hostDomainName/cxf/sentence/response
sentenceHttpAddress=http://hostDomainName/cxf/sentence
CXF, кажется, думает, что я использую тот же в два раза, но я не согласен. Эти конечные точки отлично работают в Fusesource ESB v1. Я пытаюсь перенести их в JBoss Fuse 6.3 сейчас. Чтобы упростить тестирование и развертывание, я сначала развертываюсь в автономном контейнере karaf, поэтому Fabric (fabric8) еще не был применен.
Обновление: я попытался изменить <camelcxf:cxfEndpoint> to <jaxws:client>
, но это вызвало другую ошибку. В этой новой ошибке верблюд ожидает тип CxfEndpoint, но вместо этого получает объект Proxy. Я действительно не хочу менять конечные точки, чтобы исправить эту проблему. Я уверен, что еще не нашел два места, где используется одна и та же конечная точка. Все еще искал это.
Обновление: я подтвердил, что адрес URI не используется дважды. Теперь кажется, что мой весь <camelContext>
загружается более одного раза, хотя я только настроил одну функцию osgi в репозитории для использования пакета osgi.