I'm using Lift-2.3. Since I upgraded from Jetty 5 to Jetty 6, I cannot
send mails anymore:
ERROR - Couldn't send mail
java.lang.ClassCastException: gnu.mail.handler.TextPlain cannot be cast
to javax.activation.DataContentHandler
at
javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:596)
at
javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:550)
at
javax.activation.DataHandler.getDataContentHandler(DataHandler.java:611)
at javax.activation.DataHandler.writeTo(DataHandler.java:315)
at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:261)
at
javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1321)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2074)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2042)
at javax.mail.Transport.send(Transport.java:117)
at
net.liftweb.util.MailerImpl$$anon$4$$anonfun$$init$$4.apply(Mailer.scala:191)
at
net.liftweb.util.MailerImpl$$anon$4$$anonfun$$init$$4.apply(Mailer.scala:191)
at
net.liftweb.util.MailerImpl$class.performTransportSend(Mailer.scala:170)
at net.liftweb.util.Mailer$.performTransportSend(Mailer.scala:31)
at net.liftweb.util.MailerImpl$class.msgSendImpl(Mailer.scala:267)
at net.liftweb.util.Mailer$.msgSendImpl(Mailer.scala:31)
at
net.liftweb.util.MailerImpl$MsgSender$$anonfun$messageHandler$1.apply(Mailer.scala:154)
at
net.liftweb.util.MailerImpl$MsgSender$$anonfun$messageHandler$1.apply(Mailer.scala:151)
at
net.liftweb.actor.SpecializedLiftActor$class.execTranslate(LiftActor.scala:321)
at
net.liftweb.util.MailerImpl$MsgSender.execTranslate(Mailer.scala:150)
at
net.liftweb.actor.SpecializedLiftActor$class.net$liftweb$actor$SpecializedLiftActor$$proc2(LiftActor.scala:289)
at
net.liftweb.actor.SpecializedLiftActor$$anonfun$net$liftweb$actor$SpecializedLiftActor$$processMailbox$1.apply(LiftActor.scala:210)
at
net.liftweb.actor.SpecializedLiftActor$$anonfun$net$liftweb$actor$SpecializedLiftActor$$processMailbox$1.apply(LiftActor.scala:210)
at
net.liftweb.actor.SpecializedLiftActor$class.around(LiftActor.scala:224)
at net.liftweb.util.MailerImpl$MsgSender.around(Mailer.scala:150)
at
net.liftweb.actor.SpecializedLiftActor$class.net$liftweb$actor$SpecializedLiftActor$$processMailbox(LiftActor.scala:209)
at
net.liftweb.actor.SpecializedLiftActor$$anonfun$2$$anonfun$apply$mcV$sp$1.apply$mcV$sp(LiftActor.scala:173)
at
net.liftweb.actor.LAScheduler$$anonfun$9$$anon$2$$anon$3.run(LiftActor.scala:64)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
The only thing I could find out is described in the following thread:
http://stackoverflow.com/questions/6101599/lift-mailer-error-gnu-mail-handler-textplain-cannot-be-cast-to-javax-activation
It says the problem only occurs with Jetty version < 6.1.25.
I really hope there's another solution besides upgrading to Jetty 7!
thanks.
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
I can't recall if we had the exact same issue, but we did have some
class-cast issues sending mail. It was solved by installing both
libgnujaf-java and libgnumail-java
/Jeppe
The packages you mentioned before were already installed.
I just downloaded and started Jetty 7 and now it seems to work....
Still, I would prefer another solution. Is this error a bug of Jetty <
6.1.25 ?
thanks.
To view this discussion on the web visit https://groups.google.com/d/msg/liftweb/-/jwO33otKX5AJ.
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>>
Hi,
I don't have any of the jar files you listed on my server. My activation jar is in the WEB-INF/lib folder of my webapp. I believe Lift brings in activation-1.1.jar for me. It looks like you installed package libjetty-extra [1] which installs the activation jars for you.
I did not install this, so that's the difference in our configs.
There could be a conflict there. Do you also have the activation-1.1.jar in your WEB-INF/lib folder?
To view this discussion on the web visit https://groups.google.com/d/msg/liftweb/-/X8_VbXHfGwQJ.
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>>
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To view this discussion on the web visit https://groups.google.com/d/msg/liftweb/-/jwO33otKX5AJ.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftwe...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
--
You received this message because you are subscribed to the Google Groups "Lift" group.