• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mail is not get send if i call web service, if i don't call web service mail is getting send

 
Harsha Patil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get following error,
Exception in thread "Thread-19" java.lang.ClassCastException: com.sun.xml.ws.encoding.StringDataContentHandler cannot be cast to javax.activation.DataContentHandler
at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:581)
at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:535)
at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:597)
at javax.activation.DataHandler.writeTo(DataHandler.java:301)
at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:264)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1299)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1008)
at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:414)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1285)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2071)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2039)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1739)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:737)
at com.webaccess.cibilonline.util.SendMail.postMail(SendMail.java:127)
at com.webaccess.cibilonline.util.HTMLUtil$ThreadImpl.run(HTMLUtil.java:762)


the jars used are activation.jar and mail-1.4.2.jar
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where does the web service come into the picture?

Is the web service call before the mail send attempt? If so, what is the result of the web service call?

You mention the library used for the mail call - but what is the toolkit you are using for the web service call?

Bill
 
Harsha Patil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William ,

the web service is called before sending mail. could you please tell me that what do you want to know about toolkit? as the services are made in dot net framework and we are using client to call those services.Its works when we are not adding any services. so can you help us to resolve this issue asap. thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic