users@jersey.java.net

[Jersey] Re: Bizarre stack trace with jersey-client

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Fri, 21 Jan 2011 09:55:12 +0100

The EE jar is a stubbed jar, meaning only the class signatures are
retained any method implementation code is removed. It should only be
used for compiling not running.

Paul.


On Jan 20, 2011, at 6:45 PM, Pavel Bucek wrote:

> really interesting.. I even was able to reproduce it by myself..
>
> exclude javaee-web-api dependency and it should start to work (if
> you need it, you shouldn't be testing on grizzly webserver anyway,
> it doesn't support EE stuff).
>
> However, I need to investigate what is happening here, it is
> probably some classloading issue (I can see jsr 311 api included
> once from javaee-web-api and once from jersey, not sure yet about
> javamail).. I'll keep you updated.
>
> Regards,
> Pavel
>
> On 01/20/2011 05:50 PM, Mewel wrote:
>> Sorry that i reply to this old thread but i have exact the same
>> problem.
>>
>> My pom.xml contains:
>>
>> <!-- jersey test framework 1.5 -->
>> <dependency>
>> <groupId>com.sun.jersey.jersey-test-framework</groupId>
>> <artifactId>jersey-test-framework-grizzly</artifactId>
>> <version>1.5</version>
>> <scope>test</scope>
>> </dependency>
>>
>> <!-- java ee 6.0 -->
>> <dependency>
>> <groupId>javax</groupId>
>> <artifactId>javaee-web-api</artifactId>
>> <version>6.0</version>
>> <scope>provided</scope>
>> </dependency>
>>
>> <!-- junit -->
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <version>4.8.1</version>
>> <scope>test</scope>
>> </dependency>
>>
>> If i run my test case i get the same strange exception
>> ("java.lang.ClassFormatError: Absent Code attribute in method that
>> is not
>> native or abstract in class file javax/mail/MessagingException").
>> My test
>> looks like:
>>
>> public class MyTestCase extends JerseyTest {
>>
>> public MyTestCase() {
>> super("my.webservice"); //<-- error occur here
>> }
>>
>> ...
>> }
>>
>> Thanks for any tip or advice.
>> Matthias
>>
>