6 Replies Latest reply on Feb 9, 2011 3:57 AM by davsclaus

    Failed to resolve endpoint:.....due to: Cannot auto create component: smtp

    jdpallon

      Hello!

       

      I am still new to Apache Camel.  Could anyone guide me to the right direction.  I am trying to create a mail (smtp) end point using Apache Camel 2.4.0 but as I hit the create button, I encountered the following error:

       

      HTTP ERROR 500

      Problem accessing /camel/endpoints. Reason:

          Failed to resolve endpoint: smtp://user1@mail:25?password=pwd1 due to: Cannot auto create component: smtp

      Caused by:

      org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: smtp://user1@mail:25?password=pwd1 due to: Cannot auto create component: smtp

       

      Thank you,

       

      jdpallon

        • 1. Re: Failed to resolve endpoint:.....due to: Cannot auto create component: smtp
          davsclaus

          You need to add camel-mail to the classpath of your application.

           

          If you use maven, then just add camel-mail as a dependency.

          • 2. Re: Failed to resolve endpoint:.....due to: Cannot auto create component: smtp
            jdpallon

            Thank you davsclaus for your reply.

             

            I did actually copied the camel-mail-2.4.0-fuse-01-00.jar file from Apache Camel "Lib" folder to my ActiveMQ "Lib" folder.  Will this be enough or do I still need to explicitly define it somewhere?  I am not familiar with maven and I only use Spring.

            • 3. Re: Failed to resolve endpoint:.....due to: Cannot auto create component: smtp
              davsclaus

              Yeah you need the Mail library as well. You need the JARs which has compiled as label here:

               

              [INFO] Building Camel :: Mail
              [INFO]    task-segment: [dependency:list]
              [INFO] ------------------------------------------------------------------------
              [INFO] [dependency:list {execution: default-cli}]
              [INFO] 
              [INFO] The following files have been resolved:
              [INFO]    aopalliance:aopalliance:jar:1.0:compile
              [INFO]    commons-logging:commons-logging:jar:1.1.1:test
              [INFO]    commons-logging:commons-logging-api:jar:1.1:compile
              [INFO]    javax.activation:activation:jar:1.1:compile
              [INFO]    javax.mail:mail:jar:1.4.3:compile
              [INFO]    junit:junit:jar:4.8.1:test
              [INFO]    log4j:log4j:jar:1.2.16:test
              [INFO]    org.apache.camel:camel-core:jar:2.4.0-fuse-SNAPSHOT:compile
              [INFO]    org.apache.camel:camel-spring:jar:2.4.0-fuse-SNAPSHOT:compile
              [INFO]    org.apache.camel:camel-test:jar:2.4.0-fuse-SNAPSHOT:test
              [INFO]    org.fusesource.commonman:commons-management:jar:1.0:compile
              [INFO]    org.jvnet.mock-javamail:mock-javamail:jar:1.7:test
              [INFO]    org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
              [INFO]    org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
              [INFO]    org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
              [INFO]    org.springframework:spring-context:jar:3.0.3.RELEASE:compile
              [INFO]    org.springframework:spring-context-support:jar:3.0.3.RELEASE:compile
              [INFO]    org.springframework:spring-core:jar:3.0.3.RELEASE:compile
              [INFO]    org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
              [INFO]    org.springframework:spring-tx:jar:3.0.3.RELEASE:compile
              

               

              • 4. Re: Failed to resolve endpoint:.....due to: Cannot auto create component: smtp
                davsclaus
                • 5. Re: Failed to resolve endpoint:.....due to: Cannot auto create component: smtp
                  jdpallon

                  Hello davsclaus,

                   

                  I downloaded all the jar dependencies that you indicated in the list and stored it in the ActiveMQ "lib" folder.  Though it did not return any errors anymore when I created the mail endpoint (smtp://user1@mail:25?password=pwd1), it still didn't successfully send an email when I tried to send a message through that mail endpoint.  I also notice that it adds additional same endpoints (smtp://user1@mail:25) everytime I send a message.

                   

                  Moreover, as I check the activity of the JVM, it logs an information like this:

                   

                  Received form! {uri=[smtp://user1@mail:25?password=pwd1]}

                  Created endpoint so redirecting to /endpoints/smtp:%2F%2Faurora2@mail:25?password=aurora2

                   

                  Any ideas?

                   

                  Thank you so much for your responses.

                   

                  Cheers,

                   

                  Jennese

                  • 6. Re: Failed to resolve endpoint:.....due to: Cannot auto create component: smtp
                    davsclaus

                    Can you post the actual log information you see?

                     

                    The "Created endpoint so redirecting to" seems a bit bogus to me, wonder what it is?