users@jersey.java.net

Re: [Jersey] Jersey Multipart / Missing Dependencies

From: Patrick Duin <patrick.duin_at_mpi.nl>
Date: Wed, 25 Aug 2010 12:00:18 +0200

Hi,

I am new but I am experiencing similar problems. The @FormDataParam
are reported as missing dependencies. It seems to be related to the
order in which the multipart jar is loaded in the classpath, if I run
a test in eclipse where I set the multipart jar to load after the
jersey-core/jersey-server jars I get the error. If I set it to load
before the jars it works fine, when I deploy my app in tomcat I get
the error again. I stumbled into this when migrating from jersey 1.1.5
to 1.3.

I hope this helps.

Kind regards,
  Patrick.

On Aug 25, 2010, at 11:14 AM, Stefan Heinz wrote:

> Hi!
> I switched to a workaround using @FormDataParam("file")
> FormDataBodyPart bodyPart and then
> FormDataContentDisposition contentDisp =
> bodyPart.getFormDataContentDisposition(); and InputStream in =
> bodyPart.getValueAs(InputStream.class);. This approach also works in
> the unit tests (also I switched a second time to @Context
> HttpServletRequest using Apache Commons FileUpload). Still haven't
> found out the reason for the problem. All Jersey modules have
> version 1.3 and I also tried switching all to 1.4-ea5 with the same
> result (I had a maven property in place to try this, so all modules
> should have the same version number).
>
> Nevertheless, thank you for the response.
>
> Regards,
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>