UnsupportedDataTypeException

I'm using the Java Mail API (Sample Code)to send a Multipart Mail with Attachment (*.jpg).
Everything works fine in JBuilder (German W2K machine). THEN I generate a JAR with all sources.The GUI comes up , then I push the send button and this happens.
javax.mail.SendFailedException: Sending failed; nested exception is:
class javax.mail.MessagingException: IOException while
sending message; nested exception is:
javax.activation.UnsupportedDataTypeException: no object
DCH for MIME type multipart/mixed;
boundary="----=_Part_0_16749301.1029937112375"
Could anyone pleeease help ?!
############# the Code
roperties props = System.getProperties();
// Setup mail server
props.put("mail.smtp.host", host);
// Get session
Session session = Session.getInstance(props, null);
// Define message
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(mailTo));
message.setSubject(subjText);
// Create the message part
BodyPart messageBodyPart = new MimeBodyPart();
// Fill the message
messageBodyPart.setText(mailText);
// Create a Multipart
Multipart multipart = new MimeMultipart();
// Add part one
multipart.addBodyPart(messageBodyPart);
// Part two is attachment
// Create second body part
messageBodyPart = new MimeBodyPart();
// Get the attachment
DataSource source = new FileDataSource(filename);
DataHandler dh = new DataHandler(source);
// Set the data handler to the attachment
messageBodyPart.setDataHandler(dh);
// Set the filename
messageBodyPart.setFileName(filename);
// Add part two
multipart.addBodyPart(messageBodyPart);
// Put parts in message
message.setContent(multipart);
// Send the message
Transport.send(message);
THANKS in advance

Hi,
Try this
replace in your code
// Get the attachment
DataSource source = new FileDataSource(filename);
With this
File f = new File(filename);
DataSource source = new FileDataSource(f);
bye

Similar Messages

  • Javax.activation.UnsupportedDataTypeException:

    I get the following exception when I extract mail.jar, activation.jar and run the program. However, no exception is thrown when I add the two jar file in the classpath.
    How do I solve this problem?
    THanks
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type mul
    part/mixed;
            boundary="----=_Part_0_33536220.1272627745828"
            at javax.activation.ObjectDataContentHandler.writeTo(Unknown Source)
            at javax.activation.DataHandler.writeTo(Unknown Source)
            at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1381)
            at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1742)
            at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:737)
            at SimpleSSLMail.test(SimpleSSLMail.java:77)
            at SimpleSSLMail.main(SimpleSSLMail.java:34)
    javax.mail.MessagingException: IOException while sending message;
      nested exception is:
            javax.activation.UnsupportedDataTypeException: no object DCH for MIME
    pe multipart/mixed;
            boundary="----=_Part_0_33536220.1272627745828"

    sanksrit_source_language wrote:
    Hi,
    please add the following lines in your code.
    // add handlers for main MIME types
                   MailcapCommandMap mc = (MailcapCommandMap)CommandMap.getDefaultCommandMap();
                   mc.addMailcap("text/html;; x-java-content-handler=com.sun.mail.handlers.text_html");
                   mc.addMailcap("text/xml;; x-java-content-handler=com.sun.mail.handlers.text_xml");
                   mc.addMailcap("text/plain;; x-java-content-handler=com.sun.mail.handlers.text_plain");
                   mc.addMailcap("multipart/*;; x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
                   mc.addMailcap("message/rfc822;; x-java-content-handler=com.sun.mail.handlers.message_rfc822");
                   CommandMap.setDefaultCommandMap(mc);
    This just solved my problemAs those handlers are already defined in the mailcap file supplied with JavaMail, that is totally useless advice. It is a clear indication your are not using the libraries in the right way.

  • Javax.activation.UnsupportedDataTypeException: applicaion/pdf error urgent

    Hi,
    When I try to send the PDF document read from database without storing a phyiscal copy, I got the below error.
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/pdf
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:625)
    My code is like below.
    MimeMultipart mimeMultiPart = new MimeMultipart();
    /*below call returns byte array from data store*/
    byte[] byteArray = xxxxMailMessage.getByteStreamAttachment();
    ByteArrayInputStream byteStream = new ByteArrayInputStream(byteArray);
    MimeBodyPart mimeBodyForAttachmnt = new MimeBodyPart();
    mimeBodyForAttachmnt.setContent((Object)byteStream,"application/pdf");
    mimeBodyForAttachmnt.setHeader("Content-Transfer-Encoding","base64");
    mimeBodyForAttachmnt.setHeader("Content-Disposition","attachment");
    mimeBodyForAttachmnt.setFileName(mailAttachmentName);
    mimeMultiPart.addBodyPart(mimeBodyForAttachmnt,1);
    Plese let me know if my code is wrong.
    I got struct with this probelm from last ocuple of days.I was searching info but ocudnt get exact cause.
    thanks in advacne.
    Regards,
    Godspeed

    This solution is in JavaMail 1.4.1. I'm stuck with a lower level of JavaMail which does not support ByteArrayDataSource. Might you have a suggestion for solving this problem with an earlier version of JavaMail?

  • 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

  • JavaMail UnsupportedDataTypeException in custom ClassLoader

    I have an application which is giving a UnsupportedDataTypeException: no object DCH for MIME type text/plain error. Now, what's important to know is that the application runs fine if I execute it from the command line like a regular Java application. So I know the code works fine with all the JAR files I have. However, I normally do not run the application like this. What I usually do is start the application withing an already running JVM, however I create a new ClassLoader and start the application within that new ClassLoader (similar to how each Tomcat webapp application has it's own separate ClassLoader). I'm getting the below exception when running inside this new ClassLoader. Anyone have any ideas why? How to fix it?
    org.apache.commons.mail.EmailException: Sending the email to the following server failed : localhost:25
    at org.apache.commons.mail.Email.sendMimeMessage(Email.java:873)
    at org.apache.commons.mail.Email.send(Email.java:898)
    at org.oak.jmce.masteralbum.jobs.MasterAlbumJob.email(MasterAlbumJob.java:198)
    at org.oak.jmce.masteralbum.jobs.MasterAlbumJob.execute(MasterAlbumJob.java:153)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
    Caused by: javax.mail.MessagingException: IOException while sending message;
    nested exception is:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:625)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at org.apache.commons.mail.Email.sendMimeMessage(Email.java:863)
    ... 5 more
    Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:870)
    at javax.activation.DataHandler.writeTo(DataHandler.java:301)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350)
    at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1683)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:585)
    ... 8 more

    If an application works fine standalone but breaks under Java Web Start, you might want to check out JNLP Wrapper at:
    http://zydego.fontanus.net/jnlp/wrapper
    Your app runs standalone, and JWS is used only for distribution and updates.

  • UnsupportedDataTypeException problem with JAF 1.1.1

    Hi everyone,
    I just recently updated from JAF 1.1 to the newer 1.1.1.
    Now, I have problems while using the MimeMessage.writeTo() method with a multipart MimeMessage (having a text/plain and a text/html part).
    The following exception occurs:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/alternative;
         boundary="----=_Part_13_11592834.1228496239530" Server-Stacktrace:When I debug into the JAF I see the DataHandler.writeTo() method is used:
         * Write the object to the output stream.
        public void writeTo(Object obj, String mimeType, OutputStream os)
                                  throws IOException {
         if (dch != null)
             dch.writeTo(obj, mimeType, os);
         else if (obj instanceof byte[])
             os.write((byte[])obj);
         else if (obj instanceof String) {
             OutputStreamWriter osw = new OutputStreamWriter(os);
             osw.write((String)obj);
             osw.flush();
         } else
             throw new UnsupportedDataTypeException(
                        "no object DCH for MIME type " + this.mimeType);
        }The object passed to this method is neither a byte[], nor a String, but a MimeMultipart with an NULL DataContentHandler (dch), therefore it throws the Exception.
    With the prior JAF everything worked fine. I am unsure what exactly changed in the JAF and what I can do so everythings works fine again.
    Any help is greatly appreciated!
    Fabio

    I fixed it.
    We're using Spring DM OSGi in our project and used the com.springsource.javax.activation-1.1.1.jar and com.springsource.javax.mail-1.4.1.jar in our targetplatform.
    Since the mailcap file defining the DCH's is in the mail.jar and the corresponding classes in the javax.activation.jar, the method loading the mailcap file could'nt find it, resulting in no DCH found at all. Bad thing for JAF, that no exception is thrown if the mailcap file returns as null.
    However, editing the manifest.mf file of the activation bundle and providing a "Eclipse-BuddyPolicy: registered" line as well as a "Eclipse-RegisterBuddy: com.springsource.javax.activation" to the mail bundle solved the problem.
    So thank you once again bshannon for the tip with the mailcap.

  • UnsupportedDataTypeException when sending mail from Java application

    I try to get the Java Mail API running. I'm able to compile all sample programs delivered with the API but when I try to run e.g. msgsend, msgsendsample or a sample that I found in this discussion (zmail from zakir_sh), I always get the same error:
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.MessagingException: IOException while
    sending message;
    nested exception is:
    javax.activation.UnsupportedDataTypeException: no
    object DCH for MIME type text/plain; charset=us-ascii
    Does anybody has the same problem? What's going wrong?

    Initially, I too had difficulty with JavaMail, mainly because I did not read the documentation carefully enough.
    I bypassed msgsend, etc. and wrote a very basic program to send mail; fired up my dial-up-connection and everything worked beautifully.
    Try the same. If you don't succeed, post your code here.
    Good luck.

  • UnsupportedDataTypeException in "text/html"

    Hi,
    I am facing the same problem. I want to send a mail in simple html format without any gif's and all. However I am getting this exception:
    javax.activation.UnsupportedDataTypeException
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:
    884)
    at javax.activation.DataHandler.writeTo(DataHandler.java:313)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:980)
    at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1308)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:170)
    at javax.mail.Transport.send0(Transport.java:149)
    at javax.mail.Transport.send(Transport.java:73)
    at Email.sendMail(Email.java, Compiled Code)
    at MailTest.main(MailTest.java:76)
    DEBUG SMTP SENT: quit
    E-Mail not Sent!
    javax.mail.MessagingException: Can't send command to SMTP host;
    nested exception is:
    java.net.SocketException: Descriptor not a socket: socket write error
    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:518)
    at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:204)
    at javax.mail.Transport.send0(Transport.java:183)
    at javax.mail.Transport.send(Transport.java:73)
    at Email.sendMail(Email.java, Compiled Code)
    at MailTest.main(MailTest.java:76)
    The error is coming after this:
    DEBUG SMTP SENT: rcpt to: <[email protected]>
    DEBUG SMTP RCVD: 250 <[email protected]>: Recipient Ok
    Verified Addresses
    [email protected]
    DEBUG SMTP SENT: data
    DEBUG SMTP RCVD: 354 abc.com: Send data now. Terminate with "."
    <<error comes here.....>>
    As far as I know java activation framework does not support mime type like text/gif or text/jpg. Does it support text/html? Can I do this ->
    message.setContent(htmlMess,"text/html");
    Do I need to modify flavormap.properties file ?
    How do I resolve this problem? Can you please help me?

    You can find a SMTP Mailer Component that will easily send email messages, including attachments, at http://www.codecadet.com/components/ComponentDetail.aspx?ComponentID=ei47v8RePm0=. This component provides an easy to use interface/wrapper to the Java Mail API. Souce code and documentation is included.

  • Little Mailprogramm works in JBuilder but do not work with a JAR File

    Hallo !
    The application works in JBuilder, but if I make an archive it dont work. If have included "JavaMail" and "JavaBeans Activation Framework". (same as in the JBuilderProject)
    The Error Message is:
    class javax.mail.MessegingException: IOException while sending message; nested exception is:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
    at javax.mail.Transport.send0
    at javax.mail.Transport.send
    I have other applications which work on JBuilder an as Jar-File, but why this application not ?
    I have JBuilderProfessional in use.
    Are there some licenceproblems with "JavaBeans Activation Framework".
    Please help me.
    Thank you !
    Wolfgang

    I think I have found a solution here:
    http://forum.java.sun.com/thread.jsp?thread=74127&forum=43&message=519108

  • Error while deploying wsdl file to OER...

    I have installed OER(11.1.1.2) and trying to integrate with jdeveloper(11.1.1.5)...
    i have followed oracle suggested document while integration ...
    the problem while trying to deploy the file wsdl file to OER i am getting the following error
    Buildfile: D:\Oracle\Middleware1\jdeveloper\harvester\harvester-ant.xml
    introspect-file:
    [repository.submit] Unable to initialize harvester plugin: D:\Oracle\Middleware1\jdeveloper\harvester\plugins\osb10.productReader
    [repository.submit] Oracle Enterprise_Repository_Harvester version: v11.1.1.5.0-110414_0001-1399976
    [repository.submit] Unable to initialize harvester plugin: D:\Oracle\Middleware1\jdeveloper\harvester\plugins\osb10.productReader
    [repository.submit] Aug 11, 2011 12:53:17 PM org.apache.axis.attachments.MimeUtils getContentLength
    [repository.submit] SEVERE: Exception:
    [repository.submit] javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
    [repository.submit]      at javax.activation.DataHandler.getInputStream(DataHandler.java:233)
    [repository.submit]      at javax.activation.DataHandlerDataSource.getInputStream(DataHandler.java:688)
    [repository.submit]      at org.apache.axis.attachments.MimeUtils.getContentLength(MimeUtils.java:115)
    [repository.submit]      at org.apache.axis.attachments.MimeUtils.getContentLength(MimeUtils.java:60)
    [repository.submit]      at org.apache.axis.attachments.AttachmentsImpl.getContentLength(AttachmentsImpl.java:406)
    [repository.submit]      at org.apache.axis.Message.getContentLength(Message.java:501)
    [repository.submit]      at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:371)
    [repository.submit]      at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    [repository.submit]      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    [repository.submit]      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    [repository.submit]      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    [repository.submit]      at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    [repository.submit]      at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
    [repository.submit]      at org.apache.axis.client.Call.invoke(Call.java:2748)
    [repository.submit]      at org.apache.axis.client.Call.invoke(Call.java:2424)
    [repository.submit]      at org.apache.axis.client.Call.invoke(Call.java:2347)
    [repository.submit]      at org.apache.axis.client.Call.invoke(Call.java:1804)
    [repository.submit]      at com.flashline.registry.openapi.service.v300.FlashlineRegistryTrSoapBindingStub.assetMetadataCreateDIME(FlashlineRegistryTrSoapBindingStub.java:16008)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.ALERFacade.assetMetadataCreate(ALERFacade.java:757)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetMetadataCreate(OERWriter.java:961)
    [repository.submit]      at com.oracle.oer.sync.oer.client.component.attributes.AttributeSaverImpl.createMetadataEntry(AttributeSaverImpl.java:237)
    [repository.submit]      at com.oracle.oer.sync.oer.client.component.attributes.AttributeSaverImpl.saveAttributes(AttributeSaverImpl.java:69)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.saveAttributes(OERWriter.java:1247)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetCreate(OERWriter.java:434)
    [repository.submit]      at com.oracle.oer.sync.oer.client.component.artifact.ArtifactSaverImpl.findOrCreateArtifact(ArtifactSaverImpl.java:179)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.findOrCreateArtifactAssets(OERWriter.java:574)
    [repository.submit]      at com.oracle.oer.sync.framework.impl.MetadataEntityWriterImpl.createArtifactEntity(MetadataEntityWriterImpl.java:74)
    [repository.submit]      at com.oracle.oer.sync.plugin.artifact.wsdl.WSDLArtifactWriter.createArtifactEntity(WSDLArtifactWriter.java:33)
    [repository.submit]      at com.oracle.oer.sync.framework.impl.MetadataEntityWriterImpl.write(MetadataEntityWriterImpl.java:49)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.createEntities(OERWriter.java:333)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.write(OERWriter.java:279)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.write(OERWriter.java:221)
    [repository.submit]      at com.oracle.oer.sync.framework.MetadataManager.start(MetadataManager.java:666)
    [repository.submit]      at com.oracle.oer.sync.framework.ant.IntrospectTask.performRepositoryWork(IntrospectTask.java:314)
    [repository.submit]      at com.oracle.oer.sync.framework.ant.RepositoryTaskBase.execute(RepositoryTaskBase.java:182)
    [repository.submit]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [repository.submit]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [repository.submit]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [repository.submit]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [repository.submit]      at java.lang.reflect.Method.invoke(Method.java:597)
    [repository.submit]      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [repository.submit]      at org.apache.tools.ant.Task.perform(Task.java:348)
    [repository.submit]      at org.apache.tools.ant.Target.execute(Target.java:357)
    [repository.submit]      at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [repository.submit]      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    [repository.submit]      at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    [repository.submit]      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [repository.submit]      at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    [repository.submit]      at org.apache.tools.ant.Main.runBuild(Main.java:758)
    [repository.submit]      at org.apache.tools.ant.Main.startAnt(Main.java:217)
    [repository.submit]      at org.apache.tools.ant.Main.start(Main.java:179)
    [repository.submit]      at org.apache.tools.ant.Main.main(Main.java:268)
    [repository.submit] Aug 11, 2011 12:53:17 PM org.apache.axis.attachments.MimeUtils writeToMultiPartStream
    [repository.submit] SEVERE: java.io.IOException:
    [repository.submit] javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/related; type="text/xml"; start="<7C0BB8BEF8426D99CB1155AAA88AE37E>";
    [repository.submit]      boundary="----=_Part_0_32955489.1313047397642"
    [repository.submit]      at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:877)
    [repository.submit]      at javax.activation.DataHandler.writeTo(DataHandler.java:302)
    [repository.submit]      at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350)
    [repository.submit]      at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1683)
    [repository.submit]      at org.apache.axis.attachments.MimeUtils.writeToMultiPartStream(MimeUtils.java:202)
    [repository.submit]      at org.apache.axis.attachments.AttachmentsImpl.writeContentToStream(AttachmentsImpl.java:461)
    [repository.submit]      at org.apache.axis.Message.writeTo(Message.java:534)
    [repository.submit]      at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511)
    [repository.submit]      at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    [repository.submit]      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    [repository.submit]      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    [repository.submit]      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    [repository.submit]      at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    [repository.submit]      at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
    [repository.submit]      at org.apache.axis.client.Call.invoke(Call.java:2748)
    [repository.submit]      at org.apache.axis.client.Call.invoke(Call.java:2424)
    [repository.submit]      at org.apache.axis.client.Call.invoke(Call.java:2347)
    [repository.submit]      at org.apache.axis.client.Call.invoke(Call.java:1804)
    [repository.submit]      at com.flashline.registry.openapi.service.v300.FlashlineRegistryTrSoapBindingStub.assetMetadataCreateDIME(FlashlineRegistryTrSoapBindingStub.java:16008)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.ALERFacade.assetMetadataCreate(ALERFacade.java:757)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetMetadataCreate(OERWriter.java:961)
    [repository.submit]      at com.oracle.oer.sync.oer.client.component.attributes.AttributeSaverImpl.createMetadataEntry(AttributeSaverImpl.java:237)
    [repository.submit]      at com.oracle.oer.sync.oer.client.component.attributes.AttributeSaverImpl.saveAttributes(AttributeSaverImpl.java:69)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.saveAttributes(OERWriter.java:1247)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetCreate(OERWriter.java:434)
    [repository.submit]      at com.oracle.oer.sync.oer.client.component.artifact.ArtifactSaverImpl.findOrCreateArtifact(ArtifactSaverImpl.java:179)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.findOrCreateArtifactAssets(OERWriter.java:574)
    [repository.submit]      at com.oracle.oer.sync.framework.impl.MetadataEntityWriterImpl.createArtifactEntity(MetadataEntityWriterImpl.java:74)
    [repository.submit]      at com.oracle.oer.sync.plugin.artifact.wsdl.WSDLArtifactWriter.createArtifactEntity(WSDLArtifactWriter.java:33)
    [repository.submit]      at com.oracle.oer.sync.framework.impl.MetadataEntityWriterImpl.write(MetadataEntityWriterImpl.java:49)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.createEntities(OERWriter.java:333)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.write(OERWriter.java:279)
    [repository.submit]      at com.oracle.oer.sync.plugin.writer.oer.OERWriter.write(OERWriter.java:221)
    [repository.submit]      at com.oracle.oer.sync.framework.MetadataManager.start(MetadataManager.java:666)
    [repository.submit]      at com.oracle.oer.sync.framework.ant.IntrospectTask.performRepositoryWork(IntrospectTask.java:314)
    [repository.submit]      at com.oracle.oer.sync.framework.ant.RepositoryTaskBase.execute(RepositoryTaskBase.java:182)
    [repository.submit]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [repository.submit]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [repository.submit]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [repository.submit]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [repository.submit]      at java.lang.reflect.Method.invoke(Method.java:597)
    [repository.submit]      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [repository.submit]      at org.apache.tools.ant.Task.perform(Task.java:348)
    [repository.submit]      at org.apache.tools.ant.Target.execute(Target.java:357)
    [repository.submit]      at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [repository.submit]      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    [repository.submit]      at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    [repository.submit]      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [repository.submit]      at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    [repository.submit]      at org.apache.tools.ant.Main.runBuild(Main.java:758)
    [repository.submit]      at org.apache.tools.ant.Main.startAnt(Main.java:217)
    [repository.submit]      at org.apache.tools.ant.Main.start(Main.java:179)
    [repository.submit]      at org.apache.tools.ant.Main.main(Main.java:268)
    [repository.submit] Entity write failed due to: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
    com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.findOrCreateArtifactAssets(OERWriter.java:586)
         at com.oracle.oer.sync.framework.impl.MetadataEntityWriterImpl.createArtifactEntity(MetadataEntityWriterImpl.java:74)
         at com.oracle.oer.sync.plugin.artifact.wsdl.WSDLArtifactWriter.createArtifactEntity(WSDLArtifactWriter.java:33)
         at com.oracle.oer.sync.framework.impl.MetadataEntityWriterImpl.write(MetadataEntityWriterImpl.java:49)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.createEntities(OERWriter.java:333)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.write(OERWriter.java:279)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.write(OERWriter.java:221)
         at com.oracle.oer.sync.framework.MetadataManager.start(MetadataManager.java:666)
         at com.oracle.oer.sync.framework.ant.IntrospectTask.performRepositoryWork(IntrospectTask.java:314)
         at com.oracle.oer.sync.framework.ant.RepositoryTaskBase.execute(RepositoryTaskBase.java:182)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
         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:597)
         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at org.apache.tools.ant.Target.execute(Target.java:357)
         at org.apache.tools.ant.Target.performTasks(Target.java:385)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
         at org.apache.tools.ant.Main.runBuild(Main.java:758)
         at org.apache.tools.ant.Main.startAnt(Main.java:217)
         at org.apache.tools.ant.Main.start(Main.java:179)
         at org.apache.tools.ant.Main.main(Main.java:268)
    Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.oer.client.component.artifact.ArtifactSaverImpl.findOrCreateArtifact(ArtifactSaverImpl.java:200)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.findOrCreateArtifactAssets(OERWriter.java:574)
         ... 26 more
    Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetCreate(OERWriter.java:438)
         at com.oracle.oer.sync.oer.client.component.artifact.ArtifactSaverImpl.findOrCreateArtifact(ArtifactSaverImpl.java:179)
         ... 27 more
    Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetMetadataCreate(OERWriter.java:963)
         at com.oracle.oer.sync.oer.client.component.attributes.AttributeSaverImpl.createMetadataEntry(AttributeSaverImpl.java:237)
         at com.oracle.oer.sync.oer.client.component.attributes.AttributeSaverImpl.saveAttributes(AttributeSaverImpl.java:69)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.saveAttributes(OERWriter.java:1247)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetCreate(OERWriter.java:434)
         ... 28 more
    Caused by: (500)Internal Server Error
         at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at com.flashline.registry.openapi.service.v300.FlashlineRegistryTrSoapBindingStub.assetMetadataCreateDIME(FlashlineRegistryTrSoapBindingStub.java:16008)
         at com.oracle.oer.sync.plugin.writer.oer.ALERFacade.assetMetadataCreate(ALERFacade.java:757)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetMetadataCreate(OERWriter.java:961)
         ... 32 more
    [repository.submit] Starting OERWriter Shutdown and Clean up...
    [repository.submit] Rolling Back
    [repository.submit] An error occurred performing the Repository operation:
    [repository.submit] com.oracle.oer.sync.framework.MetadataIntrospectionException: Entity write failed due to: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
    BUILD FAILED
    com.oracle.oer.sync.framework.MetadataIntrospectionException: Entity write failed due to: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.framework.MetadataManager.start(MetadataManager.java:677)
         at com.oracle.oer.sync.framework.ant.IntrospectTask.performRepositoryWork(IntrospectTask.java:314)
         at com.oracle.oer.sync.framework.ant.RepositoryTaskBase.execute(RepositoryTaskBase.java:182)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
         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:597)
         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at org.apache.tools.ant.Target.execute(Target.java:357)
         at org.apache.tools.ant.Target.performTasks(Target.java:385)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
         at org.apache.tools.ant.Main.runBuild(Main.java:758)
         at org.apache.tools.ant.Main.startAnt(Main.java:217)
         at org.apache.tools.ant.Main.start(Main.java:179)
         at org.apache.tools.ant.Main.main(Main.java:268)
    Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.findOrCreateArtifactAssets(OERWriter.java:586)
         at com.oracle.oer.sync.framework.impl.MetadataEntityWriterImpl.createArtifactEntity(MetadataEntityWriterImpl.java:74)
         at com.oracle.oer.sync.plugin.artifact.wsdl.WSDLArtifactWriter.createArtifactEntity(WSDLArtifactWriter.java:33)
         at com.oracle.oer.sync.framework.impl.MetadataEntityWriterImpl.write(MetadataEntityWriterImpl.java:49)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.createEntities(OERWriter.java:333)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.write(OERWriter.java:279)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.write(OERWriter.java:221)
         at com.oracle.oer.sync.framework.MetadataManager.start(MetadataManager.java:666)
         ... 19 more
    Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.oer.client.component.artifact.ArtifactSaverImpl.findOrCreateArtifact(ArtifactSaverImpl.java:200)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.findOrCreateArtifactAssets(OERWriter.java:574)
         ... 26 more
    Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionException: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetCreate(OERWriter.java:438)
         at com.oracle.oer.sync.oer.client.component.artifact.ArtifactSaverImpl.findOrCreateArtifact(ArtifactSaverImpl.java:179)
         ... 27 more
    Caused by: com.oracle.oer.sync.framework.MetadataIntrospectionException: (500)Internal Server Error
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetMetadataCreate(OERWriter.java:963)
         at com.oracle.oer.sync.oer.client.component.attributes.AttributeSaverImpl.createMetadataEntry(AttributeSaverImpl.java:237)
         at com.oracle.oer.sync.oer.client.component.attributes.AttributeSaverImpl.saveAttributes(AttributeSaverImpl.java:69)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.saveAttributes(OERWriter.java:1247)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetCreate(OERWriter.java:434)
         ... 28 more
    Caused by: (500)Internal Server Error
         at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at com.flashline.registry.openapi.service.v300.FlashlineRegistryTrSoapBindingStub.assetMetadataCreateDIME(FlashlineRegistryTrSoapBindingStub.java:16008)
         at com.oracle.oer.sync.plugin.writer.oer.ALERFacade.assetMetadataCreate(ALERFacade.java:757)
         at com.oracle.oer.sync.plugin.writer.oer.OERWriter.assetMetadataCreate(OERWriter.java:961)
         ... 32 more
    Total time: 1 minute 6 seconds
    Please help me out from this issue...
    Thanks in advance...
    Edited by: ngsankar on Aug 11, 2011 2:09 PM
    Edited by: ngsankar on Aug 11, 2011 2:10 PM

    Hi,
    Were you able to resolve this error? I am facing the same issue
    --CH                                                                                                                                                                                   

  • Javax Activation error, pls help me very urgent

    Hello,
    I am calling a java stored procedure, but I am getting the following error:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
    boundary="----=_Part_0_-1403249095.1105388630390"
    I dropped the jar files from the database and re-deployed the the latest jar files downloaded from Sun site, still I am getting the the same error.
    could someone please help me with this, I am desperately trying to solve this problem and get the work done. I am using java stored procedure to send emails.
    Any help is highly appreciated.
    Thanks
    Cosmos

    This is a Javamail problem.
    with a quick search of the javamail forum i found the same problem: http://forum.java.sun.com/thread.jspa?threadID=74127&start=0&tstart=0

  • Error while sending a mail with pdf attachment

    Hai
    I am sending mail with an attachment of PDF document. While sending I am getting
    javax.activation.UnsupportedDataTypeException: application/pdf
    This is my code
    public static void setByteArrayAsAttachment(Message msg, byte[] attach)
    throws MessagingException {
    MimeBodyPart p1 = new MimeBodyPart();
    ByteArrayDataSource byteStr = new ByteArrayDataSource(attach,"application/pdf");
    p1.setContent(byteStr,"application/pdf");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(p1);
    msg.setContent(mp);
    Can one one help me on this...
    Thanks
    Jithesh PM

    Change
    p1.setContent(byteStr,"application/pdf");
    to
    p1.setDataHandler(new DataHandler(byteStr));

  • Adding PDF file as attachment to SOAP message

    Hi,
    I want to add a pdf file from the hard disk to a soap message as attachment. I have the following code:
    // CREATE MESSAGE
    SOAPMessage msg= fac.createMessage();
    SOAPEnvelope nEnv= msg.getSOAPPart().getEnvelope();      
    //READ FILE FROM THE HD
    String pdfFileName = "somepdffile.pdf";      
    FileReader fr = new FileReader(pdfFileName);
    BufferedReader buffr = new BufferedReader(fr);
    String sPdf="";
    String line = testB.readLine();
    while(line!=null)
    sPdf += line;
    line = testB.readLine();
    //WRITE THE FILE TO BYTE ARRAY AND THEN TO STREAM
    byte[] pdfData = sPdf.getBytes();
    ByteArrayInputStream stream = new ByteArrayInputStream(pdfData);
    //CREATE ATTACHMENT ADD THE STREAM AS CONTENT
    AttachmentPart attPDF = msg.createAttachmentPart();          
    attPDF.setContent(stream, "application/pdf");
    msg.addAttachmentPart(attPDF);          
    return msg;
    I GET THE NEXT EXCEPTION:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/pdf
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
    at javax.activation.DataHandler.writeTo(DataHandler.java:305)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:635)
    at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:233)
    at com.sun.xml.messaging.soap.MessageImpl.saveChanges(MessageImpl.java:356)
    at javax.xml.messaging.JAXMServlet.doPost(JAXMServlet.java:192)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
    at java.lang.Thread.run(Thread.java:536)
    javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.messaging.JAXMException: Bad response: (500, Internal Server Error)
    at com.sun.xml.messaging.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:93)
    at mp.soap.SendingServlet.getPolisPrint(SendingServlet.java:320)
    at mp.soap.SendingServlet.doPost(SendingServlet.java:234)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
    at java.lang.Thread.run(Thread.java:536)
    CAN ANYONE TELL ME WHAT THE SOLUTION IS ?
    PLEASE HELP ME !!!
    Birol

    testB == buffr ! Sorry.
    IT IS STILL NOT WORKING !!!!!
    // CREATE MESSAGE
    SOAPMessage msg= fac.createMessage();
    SOAPEnvelope nEnv= msg.getSOAPPart().getEnvelope();
    //READ FILE FROM THE HD
    String pdfFileName = "somepdffile.pdf";
    FileReader fr = new FileReader(pdfFileName);
    BufferedReader buffr = new BufferedReader(fr);
    String sPdf="";
    String line = buffr.readLine();
    while(line!=null)
    sPdf += line;
    line = buffr.readLine();
    //WRITE THE FILE TO BYTE ARRAY AND THEN TO STREAM
    byte[] pdfData = sPdf.getBytes();
    ByteArrayInputStream stream = new ByteArrayInputStream(pdfData);
    //CREATE ATTACHMENT ADD THE STREAM AS CONTENT
    AttachmentPart attPDF = msg.createAttachmentPart();
    attPDF.setContent(stream, "application/pdf");
    msg.addAttachmentPart(attPDF);
    return msg;

  • Sending mail with attachment with a JWS deployed app

    Hi,
    I'm trying to solve this problem: I have an application which provides the possibility to send e-mail message with various kind of attached file (such as pdf, doc, txt, ...). The application uses JAF and JavaMail libraries and it works fine when I run it normally (without using webstart). When I deploy the app with JWS I got an exception when I request to send the e-mail message. The exception is:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed
    I read a post in this forum in which the writer says that he solved this problem putting the mailcap file into his jar archive, but he didn't specify where exactly the mailcap file must be located and which mailcap file include in the jar archive.
    Any help would be very appreciate.
    Giacomo.

    I solved it, duke dollars return in my pockets...

  • Error running SendMail when launch application from JNI

    Hello,
    I am getting the following exception when I try to send email using JavaMail. This error began happening when we upgraded to Java 1.6. It does not happen with earlier versions of Java.
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
         javax.mail.MessagingException: IOException while sending message;
    nested exception is:
         javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_2882193.1230049431911"
    I have browsed through the forums and read the many postings with a similar error. I have tried the variety of suggestions, but nothing seems to work. My understanding is the JAF is included in Java 1.6, so we should not need the activation.jar in our classpath anymore. Even so I have tried with and without the activation.jar in the classpath. I do not think it is a class loader issue because we do not build any of this into our application. It is all referenced in jar files on the classpath.
    The interesting thing is that I can launch the application with a normal JVM launch and it works just fine. The error only occurs when I launch the application from a C++ application using JNI. In both cases I am using the exact same classpath. The error occurs whether I include activation.jar in the classpath or not.
    I have tried to programmatically add the MIME types using the MailCommandMap class, but this had no effect.
    The most recent test I ran was to put the activation.jar and mail.jar files in my C:\Java\jre6\lib\endorsed directory. This actually cleared up the error. This is not a viable solution for us, but it leads me to believe the .mailcap file is not being loaded correctly for some reason. I just cannot figure out what the issue could be as it seems to be associated with JNI.
    Thank you for any help,
    Mary Kathryn

    Because JAF is now part of the JDK, the JAF classes are loaded by the system class loader
    instead of the application class loader. If the thread's context class loader is not set, JAF
    uses its class loader to load the mailcap files. Since JavaMail's mailcap file is in mail.jar,
    and mail.jar is still loaded by the application class loader, the system class loader can't
    find JavaMail's mailcap file.
    Normally, when starting the application using the "java" command, the thread's context
    class loader will be set to the application's class loader. This may not be happening
    automatically when starting the application with JNI.

Maybe you are looking for

  • Java server does not start; config tool

    Hi All, I am fairly new to SAP BASIS setup. I have installed IDES ECC 6.0 on Oracle(Win2003 as a guest on VMWare). At the time of installation the install program installed a part of the Oracle database files on an external harddisk. The ABAP server

  • Mail Merge script to replace any blank fields with specific text

    In InDesign Mail Merge I would like to replace any blank fields with specific text. For example if we have four fields (A, B, C & D) to merge, and field A is blank, it would insert field C. In essence leaving no blank fields but replacing a blank fie

  • Unable to install Adobe flash player silently while IE is running.

    How to install Adobeflash player Active x while IE is running. I have tried with .exe and .MSI also error is showing same even it's not happening manually also.Have any Idea?

  • Tree based on ViewObject with bindparams

    Hi, We have some pages that are tree-form based; the tree and the form and based on two different viewobject usages, but the same viewobject. This VO uses a bind parameter to limit the data. With JHeadstart we can provide this bindparameter with the

  • PCI Device error on bootup/ and startup

    I have a Toshiba Satellite U405D-S2850 running on Windows Vista Home premium; 32-bit.  Everytime I turn on my laptop on bootup I hear two VERY loud beeping sounds and a black screen appears which shows the following text: Phoenix Trusted (tm) NB Copy