[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail4ME: Help! Problem with MailException class


Hello Scott,

I can't see what's wrong here. The code looks ok. Are you sure that the
MailException class has been compiled/preverified correctly? If you're
running the whole application from a JAR, is this class inside the JAR? And
where did you get the code from? CVS or the ZIPs available for download? I
hope I didn't forget something in the latest build, but since you can
compile your stuff I wouldn't expect that.

As for Forte removing the iDEN-specific line from the JAD, I don't know why
it does that. I always use the stand-alone Wireless Toolkit for MIDP
development, and it works fine there. Note that you don't need that line in
the JAD unless you want to deploy your application on an iDEN phone (and it
can't be the reason for the exception, but I think this is clear).

Maybe someone else from the list has more experience with Forte and has an
idea what might be going on?

Regards,

Jörg

----- Original Message -----
From: "Meyer Scott"
To: <Mail4ME@enhydra.org>
Sent: Wednesday, May 15, 2002 3:48 PM
Subject: Mail4ME: Help! Problem with MailException class


> I'm using Mail4ME (great class, guys) and I have a small block of code
that
> is designed to simply send a handshake (test) email to the server.
>
> It compiles and preverifies fine, but when the app is launched in the
> emulator I get this error:
> ALERT: Unable to load class de/trantor/mail/MailException
> Execution completed successfully
> 83891 bytecodes executed
> 8 thread switches
> 316 classes in the system (including system classes)
> 1374 dynamic objects allocated (88368 bytes)
> 15 garbage collections (73308 bytes collected)
> Total heap size 500000 bytes (currently 452172 bytes free)
>
> Here's my .JAD file:
> MIDlet-Jar-Size:15613
> MIDlet-1:PocketSDX,, PocketSDX.PocketSDX
> MIDlet-Jar-URL:PocketSDX.jar
> MicroEdition-Configuration:CLDC-1.0
> MIDlet-Version:0.0.1
> MIDlet-Vendor:MeyerS
> MIDlet-Name:PocketSDX
> MIDlet-Description:This midlet is ....
> MIDlet-Data-Size:0
> MicroEdition-Profile:MIDP-1.0
> iDEN-Install-Class-2: de.trantor.mail.j2me.ConnectionImpl
>
> Note: every time I rebuild the MIDlet (using Forte w/J2ME add-in from Sun)
> it removes the "iDEN" line from the JAD.  Is there a way to stop it from
> removing this line?
>
> Anyway, here's the code I'm using in my MIDlet:
>     private boolean sendHandshake() {
>         // send a handshake to the server
>         try {
>             smClient = new SmtpClient("localhost");
>             Message msg = new
>
Message("scott.meyer@sbt.siemens.com","scott.meyer@sbt.siemens.com","Handsha
> ke");
>             smClient.sendMessage(msg);
>             smClient.close();
>             return true;
>         }
>         catch (MailException me) {
>             System.out.println(me);
>             me.printStackTrace();
>         }
>         catch (java.io.IOException ioe) {
>             System.out.println(ioe);
>             ioe.printStackTrace();
>         }
>
>         return false;
>     }
>
> Any ideas?
>
> Scott Meyer
>
> Group Operations Supervisor
> Direct #410-645-1522, Emergency Service #410-281-1212
>
>
> _______________________________________________
> Mail4ME mailing list
> Mail4ME@enhydra.org
> http://support.enhydra.org/mailman/listinfo.cgi/mail4me
>