1 2 Previous Next 15 Replies Latest reply on Apr 26, 2012 6:45 AM by glennboschmans Go to original post
      • 15. Re: Mina Route: Error executing command: java.lang.NullPointerException
        glennboschmans

        I think it has nothing to do with the route itself, but rather with the bundle. My set-up is a bit different. I have a bundle for the codec. My route is an xml file with Spring DSL which resides directly in the deploy folder. I do this because multiple routes will use the same codec.

         

        When I build my codec bundle with <Require-Bundle>org.apache.servicemix.bundles.mina</Require-Bundle> in pom.xml then the NPE is thrown while starting the bundle in Servicemix. If I remove the require-bundle element, the bundle starts but I get another exception when deploying the route.

         

        Exception in thread "SpringOsgiExtenderThread-44" org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route28: Route[[From[mina:tcp://localhost:4040?sync=false&disconnect=... because of Failed to resolve endpoint: mina://tcp://localhost:4040?codec=%23IntrionCodec&disconnect=true&minaLogger=true&sync=false due to: Could not find a

        suitable setter for property: codec as there isn't a setter method with same type: com.realdolmen.intrion.poc.IntrionCodec nor type conversion possible: No type converter available to convert from type: com.realdolmen.intrion.poc.IntrionCodec to the required type: org.apache.mina.filter.codec.ProtocolCodecFactory with value com.realdolmen.intrion.poc.IntrionCodec@342409f8

        1 2 Previous Next