My issue is HA Javamail does not seem to be throwing all the
exceptions thrown by the current JavaMail package. Consequently (If I
am saying this right), even if I catch Throwable when I invoke
Transport.sendMessage() I still get an exception in the logs:
com.sun.mail.smtp.SMTPSendFailedException
and my operation appears to have succeeded.
As I see it my options are a) rollback JavaMail to an earlier version
that doesn't throw things that HAJavamail doesn't catch, or b) hack
into HAJavamail and try and throw the exceptions so I can catch them
in my routine. I guess rebuilding someone else's package is a skill I
should have, but I am anticipating all manner of issues, considering
the age of the software.
suggestions?
-- clh
I hate this crap. I spend more than 50% of my time not coding because
of this kind of frustration. Is it a classpath issue now? my class
can compile but not run because I missed a dot?
Sigh.
Exception in thread "main" java.lang.ClassFormatError: Unknown
constant tag 0 in class file javax/mail/internet/InternetAddress
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:
260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
319)
at spgame.MailCron.<init>(MailCron.java:81)
at spgame.MailCron.main(MailCron.java:99)
So, this looks like an incompatibility between versions to me --
between the JavaMail and activation.jar versions, or JavaMail 1.3 and
the JVM 1.5 classloader, or who knows?
Did I mention I hate this crap?
-- clh
>As I see it my options are a) rollback JavaMail to an earlier version
>that doesn't throw things that HAJavamail doesn't catch, or b) hack
>into HAJavamail and try and throw the exceptions so I can catch them
>in my routine. I guess rebuilding someone else's package is a skill I
>should have, but I am anticipating all manner of issues, considering
>the age of the software.
>
>suggestions?
First try an email to the authors. IT might prod them to take an
interest in improving the product. Personally, I put any sort of bug
at the top of the TODO queue.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Thanx roedy -- good to see you're still around!
The last development activity was several years ago, and the project
was left in Beta.
Hey -- I hammered out all the BS issues and managed to rebuild their
package without using ant (package was too old!). I put in a couple
System.out()'s and can see the basic flow.
The ultimate issue is they are catching the exceptions in various
threads and explicitly dumping them to System.out(). hehe that's
exactly what I do with Beta code! I have read several articles about
throwing exceptions from threads, so it looks like I will have to
massage their code. Doesn't look too tough, just not how I wanted to
spend my day.
Otherwise this package rocks.
Cheers! (and thanks for listening to me vent!)
-- clh