users@jersey.java.net

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

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Sun, 13 Mar 2011 11:34:27 -0700 (PDT)

Under Netbeans 6.9.1 the IDE copies javaee-endorsed-api-6.0.jar into
target/endorsed and adds it into the classpath when running tests, in spite
of the fact that the dependency is declared as "provided".

I can't exclude this dependency because my code (not tests) extends
ServletContextListener which is defined by this JAR file.

What am I supposed to do now?

Gili


Gili wrote:
>
> I am also getting the "java.lang.ClassFormatError" and my dependency on
> javaee-web-api is already set to "provided" scope. In fact, reading the
> email thread, Mewel already had his dependency set to "provided" as well.
> How did you solve this problem? What should I be doing?
>
> Thanks,
> Gili
>
>
> Paul Sandoz-2 wrote:
>>
>> On Jan 21, 2011, at 10:41 AM, Mewel wrote:
>>
>>>
>>> Thanks for your answer Paul.
>>>
>>> What testframework should i use to deal with servlet 3.0 and jersey?
>>>
>>
>> Probably external test deployment to either GF or another compliant
>> Servlet 3 impl (dunno if Jetty or Tomcat 7 support Servlet 3).
>>
>>
>>> You say that the EE jar is only for compiling, but changing the
>>> scope to
>>> compile
>>> doens't change anything? Did i miss something here?
>>>
>>
>> Use the "provided" scope, which means compile against this jar but do
>> not include in the war, because the jar is provided by the runtime.
>>
>> Paul.
>>
>


--
View this message in context: http://jersey.576304.n2.nabble.com/Bizarre-stack-trace-with-jersey-client-tp785445p6166842.html
Sent from the Jersey mailing list archive at Nabble.com.