camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sura Monday <sura.mon...@yahoo.com>
Subject what jars are needed to use a smtp endpoint in a route
Date Thu, 20 Sep 2012 07:16:22 GMT
Hi All,
I have been trying to use a smtp endpoint in a route.
I have camel-mail.jar in my class path. However, I get this exception:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Authenticator
    at org.apache.camel.component.mail.MailComponent.<init>(MailComponent.java:35)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at org.apache.camel.util.ObjectHelper.newInstance(ObjectHelper.java:1119)
    at org.apache.camel.util.ReflectionInjector.newInstance(ReflectionInjector.java:32)
    at org.apache.camel.impl.DefaultComponentResolver.resolveComponent(DefaultComponentResolver.java:88)
    at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:296)
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:433)
    at org.apache.camel.impl.DefaultProducerTemplate.resolveMandatoryEndpoint(DefaultProducerTemplate.java:424)
    at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:216)
    at main.java.bdi.BdiCamel.main(BdiCamel.java:42)
Caused by: java.lang.ClassNotFoundException: javax.mail.Authenticator
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 15 more


I added mailapi.jar to my class path. But now I am getting  the exception

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/mail/javamail/JavaMailSender
    at org.apache.camel.component.mail.MailComponent.createEndpoint(MailComponent.java:73)
    at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:438)
    at org.apache.camel.impl.DefaultProducerTemplate.resolveMandatoryEndpoint(DefaultProducerTemplate.java:424)
    at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:216)
    at main.java.bdi.BdiCamel.main(BdiCamel.java:42)
Caused by: java.lang.ClassNotFoundException: org.springframework.mail.javamail.JavaMailSender
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 6 more


Seems like it is referring to a jar related to the spring framework. So I removed all the
spring related jars from my classpath. But still this exception keeps coming.

Can somebody please tell me what jars i should or should not have? I am NOT using Maven.

Many thanks,
Sura
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message