• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Acetylsalicylic acid is aspirin. This could be handy too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic