users@jersey.java.net

Re: [Jersey] Jersey client problem with mvn assembly

From: Jose Javier García Zornoza <josejavier.garcia.zornoza_at_gmail.com>
Date: Tue, 08 Dec 2009 13:15:59 +0100

Hello Jakub.

Problem solved and bug report filed ->
https://jersey.dev.java.net/issues/show_bug.cgi?id=440.

Thank you very much.


Jakub Podlesak escribió:
> Hi Jose,
>
> for mvn assembly plugin, especially with the following (jar-with-dependencies)
> setting
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-assembly-plugin</artifactId>
> <configuration>
> <descriptorRefs>
> <descriptorRef>jar-with-dependencies</descriptorRef>
> <descriptorRef>project</descriptorRef>
> </descriptorRefs>
> ...
>
> switching from jersy-client to jersey-bundle dependency is known to work fine:
>
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-bundle</artifactId>
> <version>${jersey.version}</version>
> </dependency>
>
> If you mind the bigger footprint, please file a new bug report so that we do
> not forget to fix this,
>
> Thanks,
>
> ~Jakub
>
>
>
> On Tue, Dec 08, 2009 at 01:36:51AM +0100, Jose Javier García Zornoza wrote:
>
>> Hello.
>> When I run this code within a Maven project running on Netbeans there's
>> no problem:
>>
>> webResource = Client.create().resource(postURL);
>> clientResponse = webResource.type(MediaType.TEXT_PLAIN)
>> .accept(MediaType.TEXT_PLAIN).post(
>> ClientResponse.class, "blimblimblim");
>>
>> But when I try to run that code with the executable jar I get with mvn
>> assembly then:
>> 'com.sun.jersey.api.client.ClientHandlerException: A message body writer
>> for Java type, class java.lang.String, and MIME media type, text/plain,
>> was not found'
>>
>> Any clue with this?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>