No object DCH for MIME type images/jpeg

what is the solution to this problem?

Thank you for your response!!!
I already found the solution. For those who still having problem send e-mail, make sure to put mail.jar and activation.jar in the same location.
Also, make sure to check catalina.xml to make sure those jars are same location!!!->That what I found out.
->I put jars in same location of my eclipse project but it turns out, the tomcat app server didn't put them in same location.
Anyway, Thank you java_2006 for your response!!!!!
:)

Similar Messages

  • No object DCH for MIME type multipart/related

    Hi, everyone!!!
    When I execute my code, I got this exception:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/related
    boundary="----=_Part_0_20851530.1186777547859"
    the funny things is : I got it work before. However, when I come back a few days to run, it doesn't.
    I use tomcat 5.0,
    mail.jar: version: 1.6
    activation.jar:version: I don't know but I download the new ones in sun website.
    Note: Also, when I run the code below in standalone application (java application), it works but doesn't work on tomcat application
    Any help would be appreciate.
    I tried some helps tips from other website such as http://www.jguru.com/faq/view.jsp?EID=237257
    and still doesn't work :((((
    ***********Here is my code**********
    ********props is properties file...............
    Authenticator auth = new SMTPAuthenticator();
              // Get session
              Session session = Session.getDefaultInstance(props, auth);
              session.setDebug(true);
              // Create the message
              Message message = new MimeMessage(session);
              // Fill its headers
              message.setSubject(subject);
              message.setFrom(new InternetAddress(from));
    for(int x=0;x<recipients.size();x++)
         message.addRecipient(Message.RecipientType.TO, new InternetAddress(recipients.get(x).toString()));
                        // Create your new message part
                        BodyPart messBodyPart=new MimeBodyPart();
                        // Set the HTML content, be sure it references the attachment
                        String htmlText="<h1>Hi</h1>"+"<img src=\"cid:picture\">";
                        // Set the content of the body part
                        messBodyPart.setContent(htmlText, "text/html");
                        // Create a related multi-part to combine the parts
                        MimeMultipart multipart=new MimeMultipart("related");
                        // Add body part to multipart
                        multipart.addBodyPart(messBodyPart);
                        // Create part for the image
                        messBodyPart=new MimeBodyPart();
                        // Fetch the image and associate to part
                        System.out.println("before dataSource");
                        DataSource fds=new FileDataSource(this.getString("image_location"));
                        System.out.println("After dataSource");
                        messBodyPart.setDataHandler(new DataHandler(fds));
                        System.out.println("*************** dataSource");
                        // Add a header to connect to the HTML
                        messBodyPart.setHeader("Content-ID", "<picture>");
                        // Add part to multi-part
                        multipart.addBodyPart(messBodyPart);
                        // Associate multi-part with message
                        message.setContent(multipart);
                        // Send message
                        System.out.println("Before Send");
                        Transport.send(message);
                        System.out.println("Finish");
    }

    Thank you for your response!!!
    I already found the solution. For those who still having problem send e-mail, make sure to put mail.jar and activation.jar in the same location.
    Also, make sure to check catalina.xml to make sure those jars are same location!!!->That what I found out.
    ->I put jars in same location of my eclipse project but it turns out, the tomcat app server didn't put them in same location.
    Anyway, Thank you java_2006 for your response!!!!!
    :)

  • Javax.activation.UnsupportedDataTypeException: no object DCH for MIME type

    hi there
    i'm new to javamail and i'm trying to build a sample tool able only to send an e-mail.
    i'm connecting to my office mail-server (web-mail). I'm sending from my office's address to an hotmail's address but i always receive the UnsupportedDataTypeException message. The same problem occurs if i mail to another user of web-mail
    Have someone already encountered this problem?
    Thanks in advance
    here is my debug:
    DEBUG: setDebug: JavaMail version 1.3.2
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "212.239.51.130", port 25, isSSL false
    220 mail.euchia.it ESMTP
    DEBUG SMTP: connected to host "212.239.51.130", port: 25
    EHLO tim1
    250-mail.euchia.it talking to [192.168.1.145] ([192.168.1.145])
    250-ENHANCEDSTATUSCODES
    250-SIZE
    250-ETRN
    250-ATRN
    250-DSN
    250-8BITMIME
    250 HELP
    DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    DEBUG SMTP: Found extension "SIZE", arg ""
    DEBUG SMTP: Found extension "ETRN", arg ""
    DEBUG SMTP: Found extension "ATRN", arg ""
    DEBUG SMTP: Found extension "DSN", arg ""
    DEBUG SMTP: Found extension "8BITMIME", arg ""
    DEBUG SMTP: Found extension "HELP", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 2.1.0 <[email protected]>... Sender ok
    RCPT TO:<[email protected]>
    250 2.1.5 <[email protected]>... Recipient ok; will forward
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP: [email protected]
    DATA
    354 Enter mail, end with "." on a line by itself
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_597230.1126769454656"
         at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
         at javax.activation.DataHandler.writeTo(DataHandler.java:305)
         at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1206)
         at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1611)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:526)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at msgmultisendsample.main(msgmultisendsample.java:78)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

    I hope this will help you.
    http://jce.iaik.tugraz.at/products/03_cms/faq/index.php
    Thanks,
    Amol

  • Extension type for mime-type "multipart/form-data"

              Hello:
              If I want to register a mime-type of type "multipart/form-data" in WebLogic 6.0
              what, if any, extension should I specify fot it in the web.xml? Is it necessary
              to specify this mime-type for handling "multipart/form-data" type http requests?
              Thanks
              John
              

    You cannot use request.getParameter() for Multipart/form-data.
              You need to Use getInputStream and use the InputStream to read data.
              Please Refer Jeason Hunters Implementation for the same. Its a very good example.
              Kumar.
              John Buckley wrote:
              > Hmm. Strange. When I send in a multipart/form-data request and when I try to do
              > a request.getParameter within my servlet it returns null and also throws a socket
              > exception at the server console.
              >
              > Any ideas?
              >
              > John
              >
              > Mettu Kumar <[email protected]> wrote:
              > >I don't think its neccesary as I am able to run my code with wls6.0 without
              > >registering
              > >multipart/form-data.
              > >
              > >kumar.
              > >John Buckley wrote:
              > >
              > >> Hello:
              > >> If I want to register a mime-type of type "multipart/form-data" in
              > >WebLogic 6.0
              > >> what, if any, extension should I specify fot it in the web.xml? Is
              > >it necessary
              > >> to specify this mime-type for handling "multipart/form-data" type http
              > >requests?
              > >>
              > >> Thanks
              > >>
              > >> John
              > >
              

  • Entity Object validation for "Date" type

    I am trying to use the Entity Object validation for a Date field type, it is a required field.
    I am using the format: MM/dd/yy HH:mm:ss
    It is a simple validation where the date value must be less than or equal to the current date/time.
    I tried using "Query Result" validation where the date is LESS THAN the query SELECT SYSDATE FROM dual.
    This throws an error:
    JBO-27011: Attribute set with value 2006-07-09 14:05:53.0 for LksrSurveyDte in LCFSReportService.LeakDetailView1 failed.
    I have be unable to find help on validating dates using validation for an Entity Object and need some help.
    Thanks in advance.

    In your case you can implement a service method in the VO to check if any other reservation overlaps with the new one (which is not inserted in the db).
    I would use a an other VO (e.g. VODateCheck) for this. This VO has it's query build to check if a given roomid and a given startdate(time?) overlaps any other record for the roomid
    select * from ReservationRoom where RoomId=:bindRoomId and ReservationEnd>=:bindReservationStartIf this query returns one or more rows you have an overlapping in the schedule and throw an error.
    You call this VODateCheck from your service method in the other module before inserting the record. Set the bind variables in the VODateCheck and execute the query.
    Timo

  • Cannot display MIME type image in omniportlet

    I added an omniportlet to one of my pages and I display a list of documents that the users can download.
    I would like to add a column that displays an icon for the type of file (e.g a pdf icon for a .pdf file).
    When I configure my omniportlet and select the Layout tab, in the column field, I can choose MIME_TYPE to display the type of document (e.g. application/pdf) but I cannot display a pdf icon. If I display MIME_TYPE as an image, the link to the image is actually src="application/pdf"
    Does anyone has any idea?
    Thanks a lot in advance

    Hi,
    Thanks for your reply.
    I was able to display a link pointing to the file directly and my question to you is: is there any way to display the list of files in a particular folder?
    Thanks in advance.
    -Rama

  • ERROR ITMS-9000:"The file OEBPS/Images/cover.jpg does not appear to be of type image/jpeg" at Book (MZItmspBookPackage)

    Can anyone tell me how to fix this issue?
    I am reference Apple's sample "FlowingExample3-0" to build ePub 3.0 format,
    but i dont know what this message means?

    iBookstore Publisher Support send me a fast response email which included some helpful info:
    Please make sure that all image files inside the ePub end with one of the following: ".tif", ".jpg", or ".png" and that the file itself matches the file extension type. To check if the image file matches the file extension type, please right click on the image then select "Get Info". Once the info tab appears, please make sure that the file extension type of the image file matches the "Kind" found under "General".
    For further information regarding embedded images, please refer to the iBookstore Asset Guide, which is available for download in the Deliver Your Content module in iTunes Connect.
    And they INCLUDED THE TRANSPORTER LOG (!), the log generated by iTunes Producer as it tries to upload a book. We were able to search for the Validation Error # within the log and find out which image Producer was trying to upload when it encountered an error. Turns out the problem was a corrupted screenshot jpeg.
    Grateful!

  • How do I set the mime type for an attachment to "application/zip"

    I'm sending out an email with a zip file as an attachment. The following code works fine, but the Mimetype for the attachment is set to "application/octet-stream"
    FileDataSource fds = new FileDataSource(zipname);
    DataHandler dh = new DataHandler(fds);
    MimeBodyPart mbp2 = new MimeBodyPart();
    mbp2.setDataHandler(dh);
    mbp2.setFileName(fds.getName());
    I would like the mime type to be application/x-zip. Unfortunately I seem to need a data content handler for this mime type as I get this exception.
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/x-zip
    Building a date content handler in the activation framework seems like a lot of work to do a very simple thing. Am I missing something obvious? Is there a simple way to do this?

    I found the solution after much chasing around. The default mimetypes file that comes with the activation framework does not list zip.

  • How to set Mime Type for Static Files

    Hi All,
    I am working on Apex 3.2.1.00.10.
    When I am trying to upload (create) a ".js" file into Static Files under Shared Components of an application; it is saving as "*text/plain*" for Mime Type. But I need Mime type to be set as "*application/x-javascript*".
    Please help me to change the Mime type of .js file.
    Or is there any way to upload the file directly as "*application/x-javascript*" as its Mime Type.
    Thanks in advance.
    Umesh

    In IIS v4 which comes with the Windows NT4 option pack, you right click the web page you are working with, select properties, then go to the HTTP Headers tab. At the bottom there's a button labelled File Types in the MIME Map section.
    After you've clicked that, you can add the two mime types you need;
    Associated Extension MIME Type
    .jar application/x-java-jar-file
    .jnlp application/x-java-jnlp-file
    I'm assuming that it is the same in W2k/IIS5.

  • MIME type settings for browser are IGNORED

    I have the following problem since Quicktime 7 Preview 2:
    Quicktime by default has many mime types associated which I don't want to be played by quicktime in my browser.
    For example .mp3
    So I deselected everything but Quicktime movies in the mime type associations.
    But no matter what I deselect there - Quicktime is stil playing everything in the browser.
    It seems that Quicktime conmpleteley ignores the mime type settings in the preferences and plays everything by default!
    What do I need to do to fix this?
    In versions 7 Preview 1 an lower these settings worked just fine.
    And as long as this isn't fixed I won't use Quicktime 7...

    The "hijacking" of files types and file extensions has been a part of every piece of software I can remember. Particularly with browsers and media files.
    Not all browsers use the same types of plug-in architecture and this may be what you're experiencing.
    It's been a long time since I fired up Internet Explorer on my Mac. Many browsers still use its style.
    On a Mac (maybe the same on a PC) Internet Explorer uses its own "File Helpers" for MIME types. These can be edited using its "preferences".
    Try changing the settings in IE. You'll find them under "helpers" (or something named like that).
    Because Microsoft has tried to put its own formats in "front" of viewers these obstacles will now be part of much of your online experience.
    User (viewers) do have most of the control. It's a shame that we have to fight just to get what we want in our online experience.

  • Problem with opening Archivelink document because of wrong MIME type

    In transaction OAD2 we have a document type FAX which is currently connected to MIME-type application/pdf. This works fine for opening documents having document class FAX and are actuallty a PDF. However, in the past this document type FAX has also been used to store documents, which refer to a MIME type 'image/tiff'.
    When opening FAX-documents that are actually a PDF-file, this currently works fine. When  trying to view these FAX-documents that are actually a TIFF-file, it won't be shown in e.g. SAP Document Viewer, because the extention is unknown. You you have to save the file locally in order to be able to see it.
    Is there a solution to look to the actual document type when opening a document via ArchiveLink, instead of looking to the ArchiveLink document type?
    Thanks for any input in this one!
    Regards,
    Joost

    I've been looking at the file, and it is indeed a puzzlement.
    There is some good news, however. I don't know why it is happening (perhaps a bug, and maybe John would like to take a look at this, too), but it looks like the Paper-filled rectangle from Hinweise layer on the right of Master Ee is being copied to the left half of the actual document spreads on random layers. The pages that seem to be blank are easy to spot in the Page panel (22, 24, 26 & 32) and you can simply Cmd-Shift click on the rectangles on those pages to override and your text and graphics will be revealed. I'm not immediately picking up any other problems scanning quickly through the pages. For a quick and dirty get it done solution, I think this will work, though I would use the .inx file rather than the .indd for the conversion in CS5.5.
    I've looked through the file history, and it is long. This started out in 2007 in CS2 and has gone through updates in CS3 and CS4, and been recovered from crashes at least 4 times (which might have something to do with the strangeness). I also think there are a lot of extraneous unused frames on many of the pages. If it were my project, I'd probably clean it up as much as possible in CS4, even going as far as recreating the master pages in a new document and then going page by page and doing a copy/paste in place of all non-master objects into the new file if you don't want to spend the time to place everythign again from scratch, which in my opinion would be a better idea (I tried moving the pages to a new file, but that didn't make any difference in the CS5.5 conversion). You could also rebuild from Scratch in CS5.5.

  • No support for content-type in response header?

    When loading both movies and images Strobe Media Playback does not recognize content-type from the response header.I can't find any documentation for this, but when i look in the source code, there sees to be support for this kind of metadata. For example in the "canHandelResource" function for ImageLoader has a "MIME_TYPES_SUPPORTED" vector that contains the type "image/jpeg". I can't see way, but this function is always falling back to checking the URL for file extensions.
    override public function canHandleResource(resource:MediaResourceBase):Boolean
                var rt:int = MediaTypeUtil.checkMetadataMatchWithResource(resource, MEDIA_TYPES_SUPPORTED, MIME_TYPES_SUPPORTED);
                if (rt != MediaTypeUtil.METADATA_MATCH_UNKNOWN)
                    return rt == MediaTypeUtil.METADATA_MATCH_FOUND;
                var urlResource:URLResource = resource as URLResource;
                if (urlResource != null &&
                    urlResource.url != null)
                    var url:URL = new URL(urlResource.url);
                    return (url.path.search(/\.gif$|\.jpg$|\.png$/i) != -1);
                return false;
    This makes it impossible to load an image (or movie) from a web-service that don't contain a file extension. Even though the response header from the request contains the correct "Content-type". Example response header:
    Date: Wed, 13 Jul 2011 08:07:26 GMT
    Server: Apache/2.2.17 (Unix)
    Cache-Control: max-age=60
    Expires: Wed, 13 Jul 2011 08:08:26 GMT
    Content-Length: 34010
    Content-Type: image/jpeg
    X-Pad: avoid browser bug
    200 OK
    Anybody that know way this is the case?

    There is no need for a constructor when all attributes are assigned.Unless there is a date value, apparently ;)
    It also works if you explicitly <tt>CAST(SYSDATE AS DATE)</tt> so perhaps the internal limitation is to do with the two internal DATE types (type 12 and 13, if you check DUMP output).

  • How do I configure WL6.1 to download svg Mime Types?

    I am trying to not only display an svg object on my screen, but also have full access to its SVGDocument object via Javascript in the pages that contain the embedded svg object. It works perfectly when I open it in a browser directly, but not from Weblogic.
              I can even serve it up on Weblogic, save the results of my JSPs as html, and open it from the file system and the code works fine.
              It's as if Weblogic is not protraying the embedded svg as a valid object with an object model.
              I have tried the following:
              1) I changed my .svg file to a .jsp and added the following line to try and force the browser to recognize it:
              <%@ page contentType="image/svg xml"%>
              2) I configured the svg mime type directly on the console.
              3) I also made sure that my WEB-INF/web.xml looked like this:
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <mime-mapping>
              <extension>svg</extension>
              <mime-type>image/svg xml</mime-type>
              </mime-mapping>
              <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              </welcome-file-list>
              </web-app>
              Any ideas? Thanks so much!
              

    I've noticed this too. The issue seems to be that it considers space in and around your server tags significant. The best way to cut down on the space is to group your server tags and code closer together. Or course, this sacrifices a bit of code readability. You can either try to strike a balance between readability and white space, or try writing a small app that adds and removes unneeded whitespace from your jsp. That way you could pass the file through your formatter before posting it to yoru server and pass it back through to read it.
              

  • Safari popup declares that a MIME type is unspecified...

    Hi Fellow Safari Users!
    Whenever I open certain websites (e.g. my own - http://www.bespoke-webwork.com/), Safari tells me that certain features are disabled because Mime Type is unspecified - i.e. a .mp3 file I optionally play on my homepage.
    As a newcomer I am frustrated by the inability of Safari to cater universally for Mime types - specifically playing .mp3 files, without having to download RealPlayer... (why could it not be coped with internally by Safari??).
    If anyone can suggest a way in which one can avoid such popups, without having to troubleshoot each one differently, I would be extremely grateful.
    P.S.
    Does downloading RealPlayer cure the problem anyway?

    As b noir suggests your html code is the cause of your troubles and this free software can help you write perfect code:
    http://www.qtbridge.com/pageot/pageot.html
    Your current code doesn't give proper instructions to any browser plug-in. The "embed" tag isn't properly closed. The "object" tag (used by Internet Explorer) uses the wrong audio "type" for the QuickTime plug-in. When I view your link I get two versions of the same song.
    Fix the page code and your page will work with any browser.

  • Javamail MIME type exception

    Exception javax.mail.internet.ParseException msg = Expected MIME type, got image/jpeg
    javax.mail.internet.ParseException: Expected MIME type, got image/jpeg
    at javax.mail.internet.ContentType.<init>(ContentType.java:91)
    at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1269)
    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 com.sun.messaging.smime.applet.SMIMEAppletCard.c(SMIMEAppletCard:2381)
    at ....
    ===================================================================
    The contents of the mail sent from our software without encryption: Javamail throws exception
    ===================================================================
    MIME-version: 1.0
    Content-type: MULTIPART/MIXED; BOUNDARY="3993497-26500-1250028557=:12180"
    --3993497-26500-1250028557=:12180
    Content-type: TEXT/PLAIN; CHARSET=UTF-8
    Content-transfer-encoding: QUOTED-PRINTABLE
    Adding attachment
    --3993497-26500-1250028557=:12180
    Content-type: IMAGE/jpeg
    Content-transfer-encoding: BASE64
    Content-disposition: attachment; filename="Encrypted.jpg"
    ===================================================================
    ===================================================================
    The contents of the mail sent from thunderbird without encryption: No javamail exception
    ===================================================================
    Content-type: multipart/mixed; boundary=------------070506080605000706080801
    This is a multi-part message in MIME format.
    --------------070506080605000706080801
    Content-Type: text/plain; charset=ISO-8859-1; format=flowed
    Content-Transfer-Encoding: 7bit
    Adding attachment
    --------------070506080605000706080801
    Content-Type: image/jpeg;
    name="Encrypted.jpg"
    Content-Transfer-Encoding: base64
    Content-Disposition: inline;
    filename="Encrypted.jpg"
    ===================================================================
    Is there anything wrong in setting mime type with out software?

    Yes, it sounds like the problem could be somewhere in the encryption/decryption process.
    If you can create a reproducible test case that doesn't require me to do lots of crypto setup,
    I'd be happy to take a look at the code, but you should probably do a bit more debugging
    yourself first to narrow down the problem.
    You can send me code at [email protected]

Maybe you are looking for

  • Assigning a login module to a Web Dynpro application

    Hi everybody, I would like a Web Dynpro application to use a custom login module for authentication. How can I do this? What I found is the Security Provider (in the Visual Administrator tool) where I can add a login module to the "form" authenticati

  • What is the EP 7.2 product price in the market now?

    Hi All, Can anyone please tell me price of the below software products 1) SAP Netweaver EP 7.2 2) SAP R/3 (Latest Version) Thanks All,   Sriram.

  • How to enable the bundled remote from the Audigy 4 under Vi

    Hy folks, how can I enable the bundled remote from the Audigy 4 under Vista ? I can't find the software on my CD. Greetz Handon

  • Development Plan not transporting

    Hi there, I'm having a problem when transporting my Development Plan from DEV to QAS. It shows in PHAP_CATALOG under TMC Talent Development Plan, but it doesn´t show on the Portal. I checked my IMG config, its all the same but the first step. Anyone

  • Very slow to open new window

    How to fix very slow opening window. I have vista 64. Since the last foxfire update it is very slow to open new windows. It can take some windows opening over a minute to open. (yes minutes not seconds) Once a window is open I can open in new tab wit