Andre Juffer wrote:

Hello,

I have a problem with sendMailTransformer:

INFO (2006-01-17) 23:09.39:807 [sitemap.transformer.email] (/tribc/fects/mail.jx) http-8080-Processor25/SendMailTransformer: M
ail Subject: Registration received
Body: Confirmed
ERROR (2006-01-17) 23:09.39:963 [sitemap.transformer.email] (/tribc/fects/mail.jx) http-8080-Processor25/SendMailTransformer: E
xception sending mail
java.lang.ClassCastException: java.lang.String
at javax.mail.internet.InternetHeaders.writeTo(InternetHeaders.java:357)
        at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:496)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:537)
....

With cocoon-2.1.8 deployed in tomcat-jakarta-tomcat-5.5.7 with java 1.5.0_06-b05 on a AMD64, this simple test case caused the exception:

    <email:sendmail>
      <email:to>[EMAIL PROTECTED]</email:to>
      <email:subject>Registration received</email:subject>
      <email:body>Confirmed</email:body>
    </email:sendmail>

It apparently crashes on the body content. Note that this worked quite fine with cocoon-2.1.7. Interestingly, the exception message refers to a javax.mail.internet.InternetHeaders.writeTo(InternetHeaders.java:357) method, one that I could not find in the source code of javamail (javamail1.3.2).

I have found some messages concerning geronimo that may be causing some problems. There are a number of geronimo jar files in the WEB-INF/lib directory:

geronimo-spec-activation-1.0.2-rc4.jar  geronimo-spec-jms-1.1-rc3.jar
geronimo-spec-javamail-1.3.1-rc5.jar    geronimo-spec-jta-1.0.1B-rc3.jar

The activation and the javamail jars contain implementations that in name are the same as those of the sun javamail. In addition, I am also using hibernate which requires a jta. The geronimo-spec-jta-1.0.1B-rc3.jar contains implementations that seem identical to the jta.jar that comes with hibernate3.

As anyone of you seen a similar exception and what did you do to get rid of it? I have experimented with removing one or more geronimo-* jar files, but this did not fix the problem. I suspect that SendMailTransformer currently uses an javax.* implemented in some jar file other than from javamail, the question is in which one.

Remove geronimo-spec-activation-1.0.2-rc4.jar and geronimo-spec-javamail-1.3.1-rc5.jar from the WEB-INF/lib

Best Regads,

Antonio Gallardo.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]