You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gustavo Comba <gc...@lciconsultants.es> on 2001/04/26 13:17:26 UTC

Problem with Javamail

Hello,

    I'm trying Apache-SOAP Version 2.1 over Tomcat 3.2.1.

    I've written a simple Servlet that send e-mails using the Sun's JavaMail
implementation without any problem, but I cant get the SOAP running (even
the sample servlets included with the implementation).

    I'm getting the following error:

java.lang.NoClassDefFoundError: javax/mail/MessagingException
 at pruebas.Correo.doPost(Correo.java:71)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:401)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

    I've checked the Apache SOAP documentation about the install using
Tomcat. I'm running Tomcat as NT Service, and I've modified the class path
in wrapper.properties as following.

wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\xerces.jar
wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\xml4j.jar
wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\soap.jar
wrapper.class_path=D:\Utils\JAVA\Sun\javamail-1.2\mail.jar
wrapper.class_path=D:\Utils\JAVA\Sun\jaf-1.0.1\activation.jar

    (the first three lines are useless, I think)

    Then, I've tried running Tomcat from the command line, using
"startup.bat". I've modified "tomcat.bat" as following:

set
CLASSPATH=C:\jdk1.3\jre\lib\ext\xerces.jar;D:\Utils\JAVA\Sun\javamail-1.2\ma
il.jar;D:\Utils\JAVA\Sun\jaf-1.0.1\activation.jar;%CP%

    in place of "set CLASSPATH=%CP%"....

    And nothing!!! What I'm doing wrong?

    If is some usefull information missing in my message, please let me
know.

    Thanks in advance, and please forgive my horrible English! ;-)

        Gustavo Comba



Re: Setting Contexts to work like vhosts

Posted by "Daniel A. Melo" <da...@codata.com.br>.

Brandon Cruz wrote:

> I am trying to figure out a way to set contexts so that they will work like
> virtual hosts (as far as the root directory and everything goes).  The
> reason I can't use vhosts is because it is a development machine.

so what?

>
> Basically, I want my links to work properly on the development machine, and
> when I switch them to production on an actual virtual host.  Is there a way
> to accomplish this?
> Thanks!
>

configure your machine like a name server ( if you don´t want to use bind, use
your host file).
and set vhost on you servlet container.

[]´s

Daniel A.


>
> Brandon


RE: Setting Contexts to work like vhosts

Posted by Brandon Cruz <bc...@norvax.com>.
Just in case anyone was wondering, I got the problem solved.  If anyone else
runs into a similar problem, I can help out.

Brandon

-----Original Message-----
From: Brandon Cruz [mailto:bcruz@norvax.com]
Sent: Thursday, April 26, 2001 9:30 AM
To: tomcat-user@jakarta.apache.org
Subject: Setting Contexts to work like vhosts


I am trying to figure out a way to set contexts so that they will work like
virtual hosts (as far as the root directory and everything goes).  The
reason I can't use vhosts is because it is a development machine.
Basically, I want my links to work properly on the development machine, and
when I switch them to production on an actual virtual host.  Is there a way
to accomplish this?
Thanks!


Brandon



Setting Contexts to work like vhosts

Posted by Brandon Cruz <bc...@norvax.com>.
I am trying to figure out a way to set contexts so that they will work like
virtual hosts (as far as the root directory and everything goes).  The
reason I can't use vhosts is because it is a development machine.
Basically, I want my links to work properly on the development machine, and
when I switch them to production on an actual virtual host.  Is there a way
to accomplish this?
Thanks!


Brandon


Re: Problem with Javamail

Posted by Sam Newman <sa...@stamplets.com>.
I would guess the relevent jar (the ajva mail jar file) isn;t in the
WEB-INF/lib directory of your webapp.

sam
----- Original Message -----
From: "Gustavo Comba" <gc...@lciconsultants.es>
To: <to...@jakarta.apache.org>
Sent: Thursday, April 26, 2001 12:17 PM
Subject: Problem with Javamail


> Hello,
>
>     I'm trying Apache-SOAP Version 2.1 over Tomcat 3.2.1.
>
>     I've written a simple Servlet that send e-mails using the Sun's
JavaMail
> implementation without any problem, but I cant get the SOAP running (even
> the sample servlets included with the implementation).
>
>     I'm getting the following error:
>
> java.lang.NoClassDefFoundError: javax/mail/MessagingException
>  at pruebas.Correo.doPost(Correo.java:71)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:401)
>  at org.apache.tomcat.core.Handler.service(Handler.java:286)
>  at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>  at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
>  at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>  at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:210)
>  at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>  at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>  at java.lang.Thread.run(Thread.java:484)
>
>     I've checked the Apache SOAP documentation about the install using
> Tomcat. I'm running Tomcat as NT Service, and I've modified the class path
> in wrapper.properties as following.
>
> wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\xerces.jar
> wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\xml4j.jar
> wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\soap.jar
> wrapper.class_path=D:\Utils\JAVA\Sun\javamail-1.2\mail.jar
> wrapper.class_path=D:\Utils\JAVA\Sun\jaf-1.0.1\activation.jar
>
>     (the first three lines are useless, I think)
>
>     Then, I've tried running Tomcat from the command line, using
> "startup.bat". I've modified "tomcat.bat" as following:
>
> set
>
CLASSPATH=C:\jdk1.3\jre\lib\ext\xerces.jar;D:\Utils\JAVA\Sun\javamail-1.2\ma
> il.jar;D:\Utils\JAVA\Sun\jaf-1.0.1\activation.jar;%CP%
>
>     in place of "set CLASSPATH=%CP%"....
>
>     And nothing!!! What I'm doing wrong?
>
>     If is some usefull information missing in my message, please let me
> know.
>
>     Thanks in advance, and please forgive my horrible English! ;-)
>
>         Gustavo Comba
>
>