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 7974817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:29:14+00:00 2026-06-04T08:29:14+00:00

I’ve found a number of possible matches to this problem but none that work

  • 0

I’ve found a number of possible matches to this problem but none that work for me.

I’m using Apache Camel to deliver a file as an email attachement. It works perfectly using the following maven goals:

jetty:run
jetty:run-exploded
jetty:run-war

I’m using java 1.6. My deployment container is tomcat6. In tomcat6 and tomcat7 I get the following exception:

org.springframework.mail.MailSendException: Failed messages: javax.mail.MessagingException: Missing start boundary; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Missing start boundary
at javax.mail.internet.MimeMultipart.parsebm(MimeMultipart.java:882)

The advice on the web suggests this is a class loader problem. Its either that the activation-1.1.jar or mail-1.4.4.jar files are not being found, or the mailcap file in mail-1.4.4.jar is not being found.

I’ve tried putting these jar files in tomcat/lib. I’ve tried copying the mailcap from the jar file into the META-INF directory of the exploded war. Neither of these make a difference.

Versions:

Windows: Apache Tomcat/7.0.5 JDK 1.6.0_27-b07 Apache Camel 2.8.0-fuse-00-08

Linux – the versions that come with ubuntu 10.04 LTS – I’ll check these later and add.

This is a simplified version of my camel routes:

<route id="uploadFileForm">
    <from uri="jetty:http://0.0.0.0:9095/premier"/>
    <to uri="velocity:form.html"/>
</route>
<route id="uploadFile">
    <from uri="jetty:http://0.0.0.0:9095/fup"/>
    <to uri="log:mail?showBody=true&amp;showHeaders=true"/>
    <to uri="smtp://localhost"/>
    <setHeader headerName="content-type"><constant>text/plain</constant></setHeader>
    <setBody><constant>Message Sent</constant></setBody>
</route>

This is what the log shows:

[4 - seda://mail-ws-audio-files] mail                           INFO  Exchange[ExchangePattern:InOut, Headers:{Connection=Keep-Alive, CamelHttpServletRequest=org.eclipse.jetty.servlets.MultiPartFilter$Wrapper@bb32c5, upfile=D:downloads!37SQFTS.pdf, CamelHttpPath=/fup, subject=BBC Premier League Update - Edition 1, CamelHttpQuery=null, CamelHttpServletResponse=HTTP/1.1 200 

, UntilMessage=until 10:30 GMT when a second bulletin is available (Mon-Fri only), Host=localhost:9095, User-Agent=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E), Accept-Encoding=gzip, deflate, bulletin_type=am, to=julian.cable@yahoo.com, cc=admin@localhost, breadcrumbId=ID-B1-L0N336601-58958-1335935026761-0-2, CamelHttpUrl=http://localhost:9095/fup, Content-Length=24896, Referer=http://localhost:9095/premier, from=jfbcable@gmail.com, Accept=image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*, Accept-Language=en-GB, Content-Type=multipart/form-data; boundary=---------------------------7dc3a8371906f6, CamelHttpUri=/fup, Cache-Control=no-cache, CamelHttpMethod=POST}, BodyType:String, Body:Dear Partner,

    please find attached the latest edition of our file. 

A minimal example maven project is here and the war is here. If you run the project in eclipse or with

mvn jetty:run

and then use the form at http://localhost:9095/premier

You will get a “cannot contact server” exception. But if you deploy the war to tomcat you will get the missing start boundary exception. If you edit applicationContext.xml and replace the ** with valid values, it will actually send an email.

Any ideas?

  • 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-04T08:29:17+00:00Added an answer on June 4, 2026 at 8:29 am

    I have tried your simplified camel route sample, it works well with mvn jetty:run.

    In my Tomcat 7.0.27, Java 6, it actually works. The mail was sent correctly. The only difference is I don’t use the:

    mvn install
    

    Instead using:

    mvn package
    

    Then copy the target/test-mail-0.0.1-SNAPSHOT.war to the Tomcat webapps folder, and start tomcat (bin/startup.sh or bin/startup.bat).

    Hope this works for you as well.

    My suggestion that you pick the same Tomcat version as I had and follow the same step.

    Other source of problem you should:

    1. Check is whether you have environment variable CATALINA_HOME or CATALINA_BASE unsuspectingly to you set to point to other Tomcat installation.
    2. Also in the environment variable, check the content of your JRE_HOME or JAVA_HOME (when using JDK), and your CLASSPATH variable. You should set your classpath to $JAVA_HOME/jre/lib:$JAVA_HOME/jre/lib/ext:. or %JAVA_HOME%/jre/lib;%JAVA_HOME%/jre/lib/ext;. (the last dot is very important)
    3. Substitute JAVA_HOME/lib with JRE_HOME if you are running on JRE only.
    4. What version of JVM are you running. I am using Oracle JDK 6. Are you using OpenJDK/J9 or something else?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I know there's a lot of other questions out there that deal with this
This could be a duplicate question, but I have no idea what search terms
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,

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.