2 Replies Latest reply on Jun 15, 2012 7:26 AM by simplex-software

    org.apache.camel.ValidationException: ClassNotFoundException

    simplex-software

      Greetings,

       

      I have the following route:

       

           

      Deploying it raises:

       

      Caused by: java.lang.ClassNotFoundException: org.apache.CamelException

              at org.apache.camel.impl.DefaultClassResolver.resolveMandatoryClass(DefaultClassResolver.java:52)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

              at org.apache.camel.model.CatchDefinition.createExceptionClasses(CatchDefinition.java:254)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

              at org.apache.camel.model.CatchDefinition.createProcessor(CatchDefinition.java:91)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

              at org.apache.camel.model.TryDefinition.createProcessor(TryDefinition.java:90)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

              at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:430)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

              at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:183)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

              at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:817)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

       

      I tried with CamelException but it raises the same exception. If I replace it with java.lang.Throwable there is no any more exception.

       

      However, the mentioned classes are in the camel-core package which is installed on the server.

       

      What could be the problem here ?

       

      Many thanks in advance.

       

      Nicolas

        • 1. Re: org.apache.camel.ValidationException: ClassNotFoundException
          ffang

          Hi,

           

          It should be

          org.apache.camel.CamelException

          but not

          org.apache.CamelException

           

          there's no org.apache.CamelException at all, could you double check?

           

          Btw, if you use

          org.apache.camel.ValidationException

          Ensure your customer bundle already import-package org.apache.camel

           

          Freeman

           

          Edited by: ffang on Jun 15, 2012 12:35 AM

          • 2. Re: org.apache.camel.ValidationException: ClassNotFoundException
            simplex-software

            Hi Freeman,

             

            org.apache.CamelException was, of course, just a typo, I ment org.apache.camel.CamelException.

             

            And the problem was, as you mentioned, the fact of not importing org.apache.camel. I was so sure it was imported since I'm using lots of routes, but only org.apache.camel.osgi was imported.

             

            Many thanks for saving my life again.

             

            Kind regards,

             

            Nicolas