Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with mail-api

0 views
Skip to first unread message

Johannes Gruber

unread,
Mar 25, 2002, 11:40:04 AM3/25/02
to
Hi,

I use the standard mail-api from sun. When I run the programm (some beans
and jsp-sites) in the jbuilder 5 (tomcat 3.2, jdk 1.3.1_02) it runs smootly,
when I start the same page in it's real environment (tomcat 4.0, jdk 1.2.2)
I get an exception:

java.lang.NoClassDefFoundError: javax/mail/Address
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:241)

When I use the jre 1.3.1_02 I get an exception:

java.lang.NoClassDefFoundError: sun/tools/javac/Main
at
org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)

Has anyone an idea??

Johannes

Jerome Moliere

unread,
Mar 25, 2002, 11:39:15 AM3/25/02
to

Johannes Gruber wrote:

> Hi,
>
> I use the standard mail-api from sun. When I run the programm (some beans
> and jsp-sites) in the jbuilder 5 (tomcat 3.2, jdk 1.3.1_02) it runs smootly,
> when I start the same page in it's real environment (tomcat 4.0, jdk 1.2.2)
> I get an exception:
>
> java.lang.NoClassDefFoundError: javax/mail/Address
> at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Class.java:241)
>

you don't have the java mail jar file in the lib/ext dir from catalina...


> When I use the jre 1.3.1_02 I get an exception:
>
> java.lang.NoClassDefFoundError: sun/tools/javac/Main
> at
> org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
>

the tools.jar from your JRE is missing...that's necessary for compiling
JSP into servlets...

Jerome

rc

unread,
Mar 25, 2002, 11:57:51 AM3/25/02
to
On Mon, 25 Mar 2002 16:40:04 GMT, "Johannes Gruber" <gru...@gmx.at>
wrote:

>Hi,
>
>I use the standard mail-api from sun. When I run the programm (some beans
>and jsp-sites) in the jbuilder 5 (tomcat 3.2, jdk 1.3.1_02) it runs smootly,
>when I start the same page in it's real environment (tomcat 4.0, jdk 1.2.2)
>I get an exception:
>
>java.lang.NoClassDefFoundError: javax/mail/Address
>at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Class.java:241)

This error would appear if you had not installed the mail jar in the
right place in tomcat. Are you sure it is there? It might be
installed correctly for JBuilder, but not for regular Tomcat.

>
>When I use the jre 1.3.1_02 I get an exception:
>
>java.lang.NoClassDefFoundError: sun/tools/javac/Main
> at
>org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)

I am not at all sure of this one, but are you trying to run a servlet
using javac? That won't work, because your servlet (probably) has no
"main(String[] arguments)" method.

These are fairly simple things, and please accept my apologies if
you've already checked them and the problem is something more
sophisticated. It is difficult to tell from your post (and, indeed,
it is difficult to get all the relevant details into a post).

rc

Johannes Gruber

unread,
Mar 25, 2002, 12:56:28 PM3/25/02
to

"rc" <rc...@nospam.com> schrieb im Newsbeitrag
news:oilu9uc0b32vg5a2a...@4ax.com...

> On Mon, 25 Mar 2002 16:40:04 GMT, "Johannes Gruber" <gru...@gmx.at>
> wrote:
>
> >Hi,
> >
> >I use the standard mail-api from sun. When I run the programm (some beans
> >and jsp-sites) in the jbuilder 5 (tomcat 3.2, jdk 1.3.1_02) it runs
smootly,
> >when I start the same page in it's real environment (tomcat 4.0, jdk
1.2.2)
> >I get an exception:
> >
> >java.lang.NoClassDefFoundError: javax/mail/Address
> >at java.lang.Class.newInstance0(Native Method)
> > at java.lang.Class.newInstance(Class.java:241)
>
> This error would appear if you had not installed the mail jar in the
> right place in tomcat. Are you sure it is there? It might be
> installed correctly for JBuilder, but not for regular Tomcat.

Thank you, that caused the exception. I didn't copy the mail.jar and
activation.jar in the lib-directory.
But why didn't I need to copy the database-driver into the lib-directory? I
copied it only in the class directory and it worked.

> These are fairly simple things,

It seems, that often the most simple things cause the most difficult
problems ;-)

0 new messages