Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8601141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:46:30+00:00 2026-06-12T01:46:30+00:00

Before, I have deployed 1 application on Tomcat 6.0.24 and it was working fine.

  • 0

Before, I have deployed 1 application on Tomcat 6.0.24 and it was working fine. Now, I have deployed an AXIS webservice and the first applcaition is giving the error while sending the mail. I am using Java6 and for mailing with mail-1.4.2.jar.

 Error message:
     javax.mail.MessagingException: IOException while sending message;
       nested exception is:
   javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; 
         boundary="----=_Part_8_85998487.1343293259308"
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:779)
             at javax.mail.Transport.send0(Transport.java:191)
         at javax.mail.Transport.send(Transport.java:120)

Also, if I remove the web service from the deploy and try to run the application, it works without any problem. Also, I’m able to receive the mail. Further, I would like to add is if I deploy the webservie on different tomcat then the applciation rums fine. The issue is only when both are on the same server at the same time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:46:31+00:00Added an answer on June 12, 2026 at 1:46 am

    Sorry for the late reply. I am able to trace the reason behind the issue.
    In the web service, i am using jaxws-rt-2.1.3.jar in which there is a class called com.sun.xml.ws.encoding.MimeCodec. In MimeCodec, there is a static block.

    static { 
         // DataHandler.writeTo() may search for DCH. So adding some default ones.
         try {
             CommandMap map = CommandMap.getDefaultCommandMap();
             if (map instanceof MailcapCommandMap) {
                 MailcapCommandMap mailMap = (MailcapCommandMap) map;
                 String hndlrStr = ";;x-java-content-handler=";
                 mailMap.addMailcap(
                     "text/xml" + hndlrStr + XmlDataContentHandler.class.getName());
                 mailMap.addMailcap(
                     "application/xml" + hndlrStr + XmlDataContentHandler.class.getName());
                 mailMap.addMailcap(
                     "image/*" + hndlrStr + ImageDataContentHandler.class.getName());
                 mailMap.addMailcap(
                     "text/plain" + hndlrStr + StringDataContentHandler.class.getName());
             }
         } catch (Throwable t) {
             // ignore the exception.
         }
     }
    

    The above static blocks provides some default MIME types for DCH and it was getting executed at WS startup. Now, before sending the mail, the code searches for MIME type using javax.activation,CommandMap(rt.jar/activation.jar). The expected mime type loading has been overridden in this case. The mail will work only if the MIME type is either of the above 4.

    So, everytime before sending the mail, i just reset the CommandMAp to the expected functionality using the following code and the mail functionality has started working fine without any issue.

    CommandMap.setDefaultCommandMap(new MailcapCommandMap());
    

    Also, when i checked the older version of jaxws-rt.jar(2.1.1), the static block was not present there but the same functionality was provided by some other class(Sorry as i don’t remember the name now).

    Also, while debugging, i noticed that inside javax.activation.MailcapCommandMap, the MIME type was getting loaded from

    System.getProperty("user.home") + File.separator + ".mailcap";
    

    and

    System.getProperty("java.home") + File.separator + "lib" + File.separator + "mailcap";
    

    So, if we provide the MIME type at the above locations, then also, the mail should work(i have not tested this).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a really annoying problem with a deployed Grails application on tomcat 7
I have a rails application deployed that works fine in Safari, Firefox, and Opera.
I have an ASPNET MVC application that works fine locally but when I deployed
Since C# doesn't have a before,after,last,first etc. as part of its foreach. The challenge
I have an ASP.NET MVC3 application deployed to a shared hosting service. It uses
I am new to Rails. I have my rails application and now I want
I have a web forms application that uses entity framework, the application is deployed
I have a wicket application which can be deployed in different environments. One of
I have built a Java/Swing Application and I have successfully deployed it using Ant,
We have an application which is deployed to a WebSphere server running on UNIX,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.