5 Replies Latest reply on Dec 19, 2012 8:25 PM by ffang

    Custom Camel Component -- Some Deployment Problems

    mhuisking_michael.c.huisking

      Hi,

      This is a "part two" to my question about packaging my custom component.  I now have the component complete and have written wrapper projects to generate OSGi bundles for the dependencies.  (I had tried to use install wrap:mvn:xxxxx first, but wasn't having success using those bundles)

       

      Here's what I've got:

      • My unit test for the component runs successfully, so I know my pom file and dependencies are all correct. (Runs great in routes in the IDE and command line)

       

      • I successfully install and start all of the dependent bundles -- no errors

       

      • I successfully install and start the component bundle -- no errors.

       

      I have two test projects -- one blueprint based and one spring based (trying to create examples for each) consisting of a quartz component setting the body of a message and passing it to my custom component -- the same that I have in my unit test case.   When I deploy and start the spring based route, it throws a null pointer exception while it's trying to resolve my custom endpoint.  When I deploy and start the blueprint based route, it goes into "GracePeriod" and I see the message:

       

      Bundle blueprint-test is waiting for dependencies (&(component=mycomp)(objectClass=org.apache.camel.spi.ComponentResolver))

       

      The component isn't being resolved and this bundle times out and errors (probably the same thing that happens in the spring based one)

       

      I have the auto-discovery metadata all defined for "mycomp" in META-INF/services/org/apache/camel/component/mycomponent and there doesn't seem to be any problem recognizing it in the routes running outside of the container.

       

      So, I guess my question is this -- How can I increase the information in the log so that I can see exactly which dependency is screwing this up? (I have a hunch that it is in a bundle other than the "mycomp" bundle, even though an exception is not being thrown)  Or, am I just missing a step when I deploy the component bundle and not explicitly registering the URI scheme with the container?  Any good component debugging tips? (inside the container since it is well behaved outside the container)

       

      Thanks in advance,

      Mick