users@jersey.java.net

Re: [Jersey] RE: Problem getting multipart data

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Sun, 31 May 2009 22:34:39 -0700

Hi Seth, Don,

Do you have the mimepull.jar in the classpath as described in the
dependencies document? (see the Mail and MIME multipart section):

https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.3/jersey/dependencies.html

If you do not use maven then you require:

http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-multipart/1.0.3/jersey-multipart-1.0.3.jar

and:

http://download.java.net/maven/2/org/jvnet/mimepull/1.3/mimepull-1.3.jar

Paul.


On May 31, 2009, at 6:54 PM, Seth Levenson wrote:

> Hi -
>
> I’m having a very similar problem deploying to Tomcat 5.5.27. I am
> using Netbeans 6.5.1 and the supplied Jersey library. I added the
> jersey-multipart-1.0.3.jar, and even tried adding the jersey-
> core-1.0.3.jar, jersey-server-1.0.3.jar, and the jersey-
> bundle-1.0.3.jar separately. I am getting the following HTTP 415
> error returned to the client:
>
> <html><head><title>Apache Tomcat/5.5.27 - Error report</
> title><style><!--H1 {font-family:Tahoma,Arial,sans-
> serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-
> family:Tahoma,Arial,sans-serif;color:white;background-
> color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-
> serif;color:white;background-color:#525D76;font-size:14px;} BODY
> {font-family:Tahoma,Arial,sans-serif;color:black;background-
> color:white;} B {font-family:Tahoma,Arial,sans-
> serif;color:white;background-color:#525D76;} P {font-
> family:Tahoma,Arial,sans-serif;background:white;color:black;font-
> size:12px;}A {color : black;}A.name {color : black;}HR {color :
> #525D76;}--></style> </head><body><h1>HTTP Status 415 - </h1><HR
> size="1" noshade="noshade"><p><b>type</b> Status report</
> p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server
> refused this request because the request entity is in a format not
> supported by the requested resource for the requested method ().</
> u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.27</h3></
> body></html>
>
> In the catalina.out log, I am getting this error:
>
> May 31, 2009 12:07:59 PM
> com.sun.jersey.spi.container.ContainerRequest getEntity
> SEVERE: A message body reader for Java type, class
> com.sun.jersey.multipart.MultiPart, and MIME media type, multipart/
> mixed;boundary=111222333444, was not found
>
> Like the other poster, I have the same basic code except I have two
> boundaries – one of type text/plain and the other application/octet-
> stream. As soon as I make the input parameter of my method
> “Multipart multipart” I get these errors. I feel like I am SO
> close, but I am a complete newbie when it comes to Jersey – I’m not
> even sure how to invoke the Jersey logging.
>
> Any help would be greatly appreciated!
>
> Thanks,
> Seth