Camel 2.10 uses mina 1.x for hl7.
You need Camel 2.11 or newer for mina 2.x using hl7

Check out the release notes
http://camel.apache.org/camel-2110-release.html

On Mon, Aug 26, 2013 at 8:08 AM, Bharath <bharath4...@gmail.com> wrote:
> Hi,
>
>   I have a route defined in my routebuilder class as
>
>     from("mina2:tcp://127.0.0.1:8888?sync=true&codec=#hl7codec").process(new
> Processor() {....
>
> and my camel-context.xml  as
>
> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>
>                 <routeBuilder ref="myBuilder" />
> </camelContext>
>
> <bean id="myBuilder" class="org.test.poc.HL7MinaRouteBuilder" />
> <bean id="hl7codec" class="org.apache.camel.component.hl7.HL7MLLPCodec">
>                 <property name="charset" value="iso-8859-1" />
> </bean>
>
> and i added the following dependencies in my pom.xml
>
>                 <dependency>
>                         <groupId>org.apache.camel</groupId>
>                         <artifactId>camel-hl7</artifactId>
>                         <version>2.10.0</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.apache.camel</groupId>
>                         <artifactId>camel-core</artifactId>
>                         <version>2.10.0</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.apache.camel</groupId>
>                         <artifactId>camel-jms</artifactId>
>                         <version>2.10.0</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.apache.camel</groupId>
>                         <artifactId>camel-mina2</artifactId>
>                         <version>2.10.0</version>
>                 </dependency>
>                         <dependency>
>                         <groupId>ca.uhn.hapi</groupId>
>                         <artifactId>hapi-structures-v23</artifactId>
>                         <version>1.2</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>ca.uhn.hapi</groupId>
>                         <artifactId>hapi-structures-v23</artifactId>
>                         <version>1.2</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>ca.uhn.hapi</groupId>
>                         <artifactId>hapi-osgi-base</artifactId>
>                         <version>1.2</version>
>                 </dependency>
>
> I tried to deploy this bundle in Fuse 7.1.0 and am getting the following
> exception
>
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> resolve endpoint: mina2://tcp://127.0.0.1:8888?codec=%23hl7codec&sync=true
> due to: Could not find a suitable setter for property: codec as there isn't
> a setter method with same type: org.apache.camel.component.hl7.HL7MLLPCodec
> nor type conversion possible: No type converter available to convert from
> type: org.apache.camel.component.hl7.HL7MLLPCodec to the required type:
> org.apache.mina.filter.codec.ProtocolCodecFactory with value
> org.apache.camel.component.hl7.HL7MLLPCodec@6f434f5f
>         at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:480)
>         at
> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:50)
>         at
> org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:187)
>         at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)
>         at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114)
>         at
> org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
>         at
> org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:857)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:172)
>         ... 19 more
>
> any suggestions???
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Failed-to-create-route-when-using-Mina2-tp5737923.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to