Hi What version of SMX and/or Camel are you using?
Its a bit strange as HL7MLLPCodec is implementing the ProtocolCodecFactory interface. Could you try with a route builder not define using <package> as there was an issue with Spring not being able to IoC and do all its stuff in Camel 1.6.0 or older. So you can use a <routeBuilderRef> to refer to a spring bean that is your route builder class, instead of using <package>. On Mon, Aug 3, 2009 at 6:12 PM, vincentytran<[email protected]> wrote: > > Hello. I need some help with using camel-hl7. I'm new to servicemix and I've > been doing my best following all the tutorials and samples. > > The error I am getting is: > > Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: > Bean named 'hl7codec' must be of type > [org.apache.mina.filter.codec.ProtocolCodecFactory], but was actually of > type [org.apache.camel.component.hl7.HL7MLLPCodec] > > My camel-context.xml file contains... > <camelContext id="camel" > xmlns="http://activemq.apache.org/camel/schema/spring"> > <package>ca.blah</package> > </camelContext> > <bean id="hl7codec" class="org.apache.camel.component.hl7.HL7MLLPCodec"> > <property name="charset" value="iso-8859-1"/> > </bean> > > > And I have a class that extends RouteBuilder in the ca.blah package... > > from("mina:tcp://localhost:8888?sync=true&codec=hl7codec") > .process(new Processor() { > public void process(Exchange exchange) throws Exception { > // use plain String as message format > String body = exchange.getIn().getBody(String.class); > // return the response as plain string > exchange.getOut().setBody("Bye World"); > } > }) > .to("mock:result"); > -- > View this message in context: > http://www.nabble.com/must-be-of-type-org.apache.mina.filter.codec.ProtocolCodecFactory-error-tp24793496p24793496.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
