2012-03-14 3 views
0

나는 퓨즈 esb에서 낙타와 함께 apache mina를 사용하려고합니다. 나는 배치 문제에 직면 해있다. 여기fuse esb mina 번들 배포 오류

Exception in thread "SpringOsgiExtenderThread-18" org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route8: Route[[From[mina:tcp://localhost:3100?sync=false&codec=#myCo... because of Failed to resolve endpoint: mina://tcp://localhost:3100?codec=%23myCodec&sync=false due to: Could not find a suitable setter for property: codec as there isn't a setter method with same type: test.net.mina.codec.MyMinaCodec nor type conversion possible: No type converter available to convert from type: test.net.mina.codec.MyMinaCodec to the required type: org.apache.mina.filter.codec.ProtocolCodecFactory with value [email protected] 
    at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1149) 
    at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:110) 
    at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:240) 
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97) 
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303) 
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911) 
    at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235) 
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358) 
    at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) 
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320) 
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132) 
    at java.lang.Thread.run(Thread.java:662) 
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route8: Route[[From[mina:tcp://localhost:3100?sync=false&codec=#myCo... because of Failed to resolve endpoint: mina://tcp://localhost:3100?codec=%23myCodec&sync=false due to: Could not find a suitable setter for property: codec as there isn't a setter method with same type: test.net.mina.codec.MyMinaCodec nor type conversion possible: No type converter available to convert from type: test.net.mina.codec.MyMinaCodec to the required type: org.apache.mina.filter.codec.ProtocolCodecFactory with value [email protected] 
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:170) 
    at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:698) 
    at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1679) 
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1464) 
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1356) 
    at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:169) 
    at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67) 
    at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54) 
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1324) 
    at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:213) 
    at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:108) 
    ... 10 more 
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: mina://tcp://localhost:3100?codec=%23myCodec&sync=false due to: Could not find a suitable setter for property: codec as there isn't a setter method with same type: test.net.mina.codec.MyMinaCodec nor type conversion possible: No type converter available to convert from type: test.net.mina.codec.MyMinaCodec to the required type: org.apache.mina.filter.codec.ProtocolCodecFactory with value [email protected] 
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:444) 
    at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:48) 
    at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:180) 
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:110) 
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116) 
    at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72) 
    at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:88) 
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:798) 
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:165) 
    ... 20 more 
Caused by: java.lang.IllegalArgumentException: Could not find a suitable setter for property: codec as there isn't a setter method with same type: test.net.mina.codec.MyMinaCodec nor type conversion possible: No type converter available to convert from type: test.net.mina.codec.MyMinaCodec to the required type: org.apache.mina.filter.codec.ProtocolCodecFactory with value [email protected] 
    at org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:341) 
    at org.apache.camel.util.EndpointHelper.setReferenceProperties(EndpointHelper.java:250) 
    at org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:199) 
    at org.apache.camel.component.mina.MinaComponent.createEndpoint(MinaComponent.java:92) 
    at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:75) 
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:426) 
    ... 28 more 

그리고 내 코덱 공장 :의

public class MyMinaCodec implements ProtocolCodecFactory { 

    public ProtocolDecoder getDecoder(IoSession session) throws Exception { 
     return new MyMinaDecoder(); 
    } 

    public ProtocolEncoder getEncoder(IoSession session) throws Exception { 
     return new MyMinaEncoder(); 
    } 
} 

어떤 생각

<beans xmlns... 
    <bean id="myCodec" class="test.net.mina.codec.MyMinaCodec" /> 
    <camelContext xmlns="http://camel.apache.org/schema/spring"> 
     <route> 
      <from uri="mina:tcp://localhost:3100?sync=false&amp;codec=#myCodec" /> 
      <to uri="activemq://Test.IncomingMsg" /> 
     </route> 
    </camelContext> 
</beans> 

우는 소리가 스택 트레이스는 ServiceMix를 콘솔에서 가져온 것입니다 : 여기

내 경로입니다 내가 여기서 뭐하고 있는거야? 귀하의 도움에 감사드립니다

답변

0

좋아, 그게 좋았어! maven 용 pom.xml에 필요한 번들을 지정하는 것을 잊었습니다 :

+0

답변으로 표시 할 수 있습니까? –