6 Replies Latest reply on Feb 23, 2009 6:48 AM by jucaro

    Proxy configuration when running a camel context

    nick_nick.gray

      I've drawn a simple diagram with two file end points (all it does is move a file from one location to another).

       

      When I attempt to run the diagram (or a generated camel context) from the Eclipse tooling, I get the following stack trace:

       

      org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://activemq.apache.org/camel/schema/spring/camel-spring.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

       

      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)

       

      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96)

       

      ...... stack trace continues

       

      If I download the camel-spring.xsd, modify the generated camel-context.xml file to reference a local copy of the xsd, and then run via Eclipse, the process runs successfully. I suspect this is a proxy configuration issue but I've configured the proxy via Eclipse, and I've configured a proxy for maven via my local maven settings file.

       

      Any ideas how I can get this working?

       

        • 1. Re: Proxy configuration when running a camel context
          oisin

          Well, I was thinking that Camel shouldn't be going remotely to load this schema - it should be loaded from the local Camel install. It could be that the schema is not being found on the classpath at runtime, so it's falling back to the default behaviour.

           

          Just a question - when you say

           

          When I attempt to run the diagram (or a generated camel context) from the Eclipse tooling

           

          do you mean that you are running the context from within the Eclipse tools, or you

          are running the context in Camel outside of the tooling?

          • 2. Re: Proxy configuration when running a camel context
            vineet_vineet

            Oisin, It seems that there are two bugs here - both of which should ideally be fixed:

            1. The schema is not being loaded from the local Camel install

            2. The FUSE Launcher is not forwarding Eclipse's proxy settings to the launched runtime.

             

            • 3. Re: Proxy configuration when running a camel context
              nick_nick.gray

              do you mean that you are running the context from within the Eclipse tools, or you

              are running the context in Camel outside of the tooling?

               

              I am running them from within the Eclipse tools, as if I wanted to debug them.

               

              Steps to reproduce for me are:

              1. Create a FUSE Project

              2. Create a EIP diagram

              3. Place two file endpoints and specify and input and output directory

              4. Place a connector between the two

              5. Attempt to run via Run Configuration Dialog - using a FUSE Integration Designer EIP configuration

              6. Fails as its running with the above stack

               

              I tried exporting the camel context to XML and running that using a Camel Context Run Configuration (via Run dialog) and I get the same problem.

               

              I am not sure why it isn't loading from the local install as you suggest but when I download the schema and modify the exported camel context xml file to reference a local copy it works (however this is really annoying for development)

              • 4. Re: Proxy configuration when running a camel context
                oisin

                Here's something I tried and it worked - created the FUSE Project, added an EIP (File-to-File). Generated the Camel Spring XML from the diagram, then put it into a src/main/resources/META-INF/spring directory in the project.

                 

                Then I ran the project as a Camel Context run configuration, and had success - files moved from the source directory to the target directory as expected, no exceptions.

                • 5. Re: Proxy configuration when running a camel context
                  oisin

                  Back to this one - I've seen it come up again, most especially doing a demo at a conference recently

                   

                  I've put in a JIRA - ETOOLS-31

                   

                  Edited by: oisin on Oct 24, 2008 4:28 PM

                  • 6. Re: Proxy configuration when running a camel context
                    jucaro

                    Hi,

                     

                    I had the same problem. You need to add the camel-spring-1.4.0.jar to the Run configuration classpath.

                     

                    Regards,

                    Juan