users@jersey.java.net

Re: Aw: Re: [Jersey] A blog entry on using the Jersey Test Framework

From: J Irving <j_at_lollyshouse.net>
Date: Tue, 21 Apr 2009 15:37:30 -0400

Hi Naresh

Maven 2.0.9 works, thanks. Another data point: Maven 2.0.6 (which
ships with OS X) fails as 2.1.0 fails, with the
MethodNotFoundException.

Thanks for your help.

   cheers, J


On Tue, Apr 21, 2009 at 02:52, Naresh <bsnaresh_at_sun.com> wrote:
> Naresh wrote:
>> Hi Irving,
>>
>> J Irving wrote:
>>
>>> Another data point from me - if I leave this property unset, or set it
>>> to GrizzlyWeb, the tests actually pass.  I have no idea if M.S. has
>>> the same issue as mine, but the property setting is having some effect
>>> for me, even if it isn't the desired one :)
>>>
>>>
>>>
>> True.
>>
>> I have checked this on Mac. Property setting is definitely not having
>> the desired effect.
>> For instance, when I try to run with an invalid container type, like-
>> mvn clean test -Dcontainer.type=INVALID,
>> the build should FAIL. But it is not happening this way. In fact, it is
>> running the tests against Grizzly Web Container.
>> When we set "container.type" to EmbeddedGF, the maven profile
>> corresponding to EmbeddedGF is getting activated and an older version of
>> Grizzly jar is taking precedence over 1.9.8, but when it comes to the
>> container startup, somehow the runtime tries to start the
>> GrizzlyWebContainer which is causing the problem.
>> I'm not sure of the reason for this kind of behavior on Mac, but I guess
>> its got something to do with property setting on
>> the Mac+Maven+Java combination.
>> I will investigate into this and let you know.
>> For tracking purpose, I have filed this issue at
>> https://jersey.dev.java.net/issues/show_bug.cgi?id=274.
>>
> I have checked with Maven 2.0.9, and it works fine with that version.
> This might be a regression in Maven 2.1.0
> Please check with Maven 2.0.9 and see if you still get the problem.
>
> -Naresh
>
>> Thanks for letting me know this issue.
>>
>> - Naresh
>>
>>> On Sun, Apr 19, 2009 at 00:09, Naresh <bsnaresh_at_sun.com> wrote:
>>>
>>>
>>>> Hi M.S.,
>>>>
>>>>    since you are unable to get none of those samples work with
>>>> EmbeddedGF, and are getting the same NoSuchMethodError, I suspect the
>>>> "container.type" property is not getting set.
>>>>
>>>> Can you please do this:
>>>> 1.  In one of the sample, say HelloWorld, edit the MainTest.java class,
>>>> and put the following statement after the call to "super()" constructor:
>>>> System.out.println("CONTAINER TYPE :: " +
>>>> System.getProperty("container.type"));
>>>> 2. Run the test with: mvn clean test -Dcontainer.type=EmbeddedGF
>>>> 3. See if you get CONTAINER TYPE :: EmbeddedGF in the console
>>>> 4. Alternatively, if you do not want to modify any code, run the following:
>>>>     mvn clean test -Dcontainer.type=INVALID
>>>>   You should see a BUILD FAILURE, if things are working fine.
>>>>
>>>> -Naresh
>>>>
>>>>
>>>> da_bus_at_arcor.de wrote:(
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I get the same java.lang.NoSuchMethodError when I try tro run the examples with EmbeddedGF and all tests pass when I use Grizzly. I'm using Java version 1.6.0_11 on Windows XP.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> M.S.
>>>>>
>>>>>
>>>>> ----- Original Nachricht ----
>>>>> Von:     J Irving <j_at_lollyshouse.net>
>>>>> An:      users_at_jersey.dev.java.net
>>>>> Datum:   18.04.2009 18:52
>>>>> Betreff: Re: [Jersey] A blog entry on using the Jersey Test Framework
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi Naresh
>>>>>>
>>>>>> Per your earlier mail, I'm using Java version 1.6.0_07-b06-153 on Mac OS
>>>>>> 10.5.6.
>>>>>>
>>>>>> On Fri, Apr 17, 2009 at 23:57, Naresh <bsnaresh_at_sun.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>    looks like some old version of Grizzly jar is overriding the 1.9.8
>>>>>>> version.
>>>>>>> Could you try moving the dependency on the jersey-test-framework to the
>>>>>>> top, i.e., place it before everything else?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> In the entity-provider-1.0.3 example, it already is at the top of the
>>>>>> dependency list.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> The stack trace says, you are trying to run the tests with the Grizzly
>>>>>>> Web Server. Can you confirm this? Because, your other mails say that you
>>>>>>> were trying to run the tests using EmbeddedGF.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> No, I *am* trying to use EmbeddedGF.  Here is the maven command line:
>>>>>>
>>>>>>    mvn clean test -Dcontainer.type=EmbeddedGF
>>>>>>
>>>>>> and the stack traces included are generated by *that* invocation.  Is
>>>>>> that correct?
>>>>>>
>>>>>> When I run the tests using the -Dcontainer.type=GrizzlyWeb property,
>>>>>> they all pass (same code example).
>>>>>>
>>>>>> Interestingly, when I try this on another code example
>>>>>> (extended-wadl-webapp) I get a completely different error:
>>>>>>
>>>>>> ------------------8<-----------------
>>>>>> [ERROR] BUILD ERROR
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] An error has occurred in JavaDocs report generation:Exit code:
>>>>>> 1 - javadoc: error - invalid flag: -author
>>>>>>
>>>>>> Command line
>>>>>> was:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
>>>>>> doc
>>>>>> @options
>>>>>> -----------------8<----------------
>>>>>>
>>>>>> I get the same error with Java 1.5 also.
>>>>>>
>>>>>> I guess that if it works for you, my environment is somehow messed up.
>>>>>>  I'll try to debug it some more later on, but if you have any more
>>>>>> suggestions please make them :)
>>>>>>
>>>>>>    cheers, J
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> J Irving wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> This appears to have been a problem with the j2ee API jar file I was
>>>>>>>> using to build against.  I dumped it and included only the
>>>>>>>> persistence-api component, and the error disappeared.  Now however, I
>>>>>>>> have another issue - a MethodNotFound (although the method appears to
>>>>>>>> be right there in the grizzly-http-1.9.8.jar file).
>>>>>>>>
>>>>>>>> I'm including the trace below in case anyone has a solution.
>>>>>>>>
>>>>>>>>    cheers, J
>>>>>>>>
>>>>>>>> -----------------8<-----------------
>>>>>>>> java.lang.NoSuchMethodError:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> com.sun.grizzly.http.embed.GrizzlyWebServer.addGrizzlyAdapter(Lcom/sun/grizz
>>>>>> ly/tcp/http11/GrizzlyAdapter;[Ljava/lang/String;)V
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> com.sun.jersey.test.framework.impl.container.grizzly.web.GrizzlyWebContainer
>>>>>> .start(GrizzlyWebContainer.java:134)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> com.sun.jersey.test.framework.impl.JerseyAppContainer.startServer(JerseyAppC
>>>>>> ontainer.java:170)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> com.sun.jersey.test.framework.JerseyTest.setupTestEnvironment(JerseyTest.jav
>>>>>> a:254)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> com.sun.cloud.downloads.resource.RegistrationTest.<init>(RegistrationTest.ja
>>>>>> va:15)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> Method)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
>>>>>> sorImpl.java:39)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
>>>>>> torAccessorImpl.java:27)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.j
>>>>>> ava:171)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4Clas
>>>>>> sRunner.java:216)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j
>>>>>> ava:15)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.
>>>>>> java:213)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
>>>>>> a:73)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
>>>>>> a:46)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>>>>>>>>     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>>>>>>>>     at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(Ab
>>>>>> stractDirectoryTestSuite.java:140)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractD
>>>>>> irectoryTestSuite.java:127)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>>>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>>>>>> .java:25)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireB
>>>>>> ooter.java:345)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:100
>>>>>> 9)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>> On Fri, Apr 17, 2009 at 15:06, J Irving <j_at_lollyshouse.net> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> I've been trying to write some simple unit tests using the framework
>>>>>>>>> and I have a problem.  It may be unrelated to the framework per se,
>>>>>>>>> because my application also uses JPA and spring - is this likely to
>>>>>>>>> cause problems?  Ideas about what's going on here would be most
>>>>>>>>> welcome.
>>>>>>>>>
>>>>>>>>> The error I see is a ClassFormatError, more below.  Here's the code
>>>>>>>>> for the tests:
>>>>>>>>>
>>>>>>>>> public class RegistrationTest extends JerseyTest {
>>>>>>>>>
>>>>>>>>>    public RegistrationTest() throws Exception {
>>>>>>>>>        super();
>>>>>>>>>        ApplicationDescriptor appDescriptor = new
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> ApplicationDescriptor();
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>  appDescriptor.setRootResourcePackageName("my.package.base.root");
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        setupTestEnvironment(appDescriptor);
>>>>>>>>>    }
>>>>>>>>>
>>>>>>>>>    @Test
>>>>>>>>>    public void testListUploaders() throws Exception {
>>>>>>>>>        String response =
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> webResource.path("uploaders").get(String.class);
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        Assert.assertNotNull(response);
>>>>>>>>>        System.out.println(response);
>>>>>>>>>    }
>>>>>>>>>
>>>>>>>>>    @Test
>>>>>>>>>    public void testTestFramework() throws Exception {
>>>>>>>>>        System.out.println("done");
>>>>>>>>>    }
>>>>>>>>>
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> I run the test like this:
>>>>>>>>>
>>>>>>>>> % mvn clean test -Dcontainer.type=EmbeddedGF
>>>>>>>>>
>>>>>>>>> And the tests fail with the following errors:
>>>>>>>>>
>>>>>>>>> testListUploaders(com.sun.cloud.downloads.resource.RegistrationTest)
>>>>>>>>> Time elapsed: 0.041 sec  <<< ERROR!
>>>>>>>>> java.lang.ClassFormatError: Absent Code attribute in method that is
>>>>>>>>> not native or abstract in class file javax/servlet/http/HttpServlet
>>>>>>>>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>>>>>>>>        at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>>>>>>>>>        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>>>>>>>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>>>>>>>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>>>>>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>>>>>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
>>>>>>>>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
>>>>>>>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>>>>>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
>>>>>>>>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>>>>>>>>        at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>>>>>>>>>        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>>>>>>>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>>>>>>>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>>>>>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>>>>>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
>>>>>>>>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
>>>>>>>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>>>>>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> com.sun.jersey.test.framework.util.ApplicationDescriptor.<init>(ApplicationD
>>>>>> escriptor.java:72)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> com.sun.cloud.downloads.resource.RegistrationTest.<init>(RegistrationTest.ja
>>>>>> va:13)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> Method)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
>>>>>> sorImpl.java:39)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
>>>>>> torAccessorImpl.java:27)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.j
>>>>>> ava:171)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4Clas
>>>>>> sRunner.java:216)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j
>>>>>> ava:15)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.
>>>>>> java:213)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
>>>>>> a:73)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
>>>>>> a:46)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(Ab
>>>>>> stractDirectoryTestSuite.java:140)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractD
>>>>>> irectoryTestSuite.java:127)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>>>>>>>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>>>>>> .java:25)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireB
>>>>>> ooter.java:345)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:100
>>>>>> 9)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>> testTestFramework(com.sun.cloud.downloads.resource.RegistrationTest)
>>>>>>>>> Time elapsed: 0.001 sec  <<< ERROR!
>>>>>>>>> java.lang.ClassFormatError:
>>>>>>>>> com/sun/jersey/spi/container/servlet/ServletContainer
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> com.sun.jersey.test.framework.util.ApplicationDescriptor.<init>(ApplicationD
>>>>>> escriptor.java:72)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> com.sun.cloud.downloads.resource.RegistrationTest.<init>(RegistrationTest.ja
>>>>>> va:13)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> Method)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
>>>>>> sorImpl.java:39)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
>>>>>> torAccessorImpl.java:27)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.j
>>>>>> ava:171)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4Clas
>>>>>> sRunner.java:216)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j
>>>>>> ava:15)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.
>>>>>> java:213)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
>>>>>> a:73)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav
>>>>>> a:46)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(Ab
>>>>>> stractDirectoryTestSuite.java:140)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractD
>>>>>> irectoryTestSuite.java:127)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>>>>>>>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>>>>>> )
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>>>>>> .java:25)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireB
>>>>>> ooter.java:345)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:100
>>>>>> 9)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>> ClassFormatError seems to be somewhat out of leftfield.
>>>>>>>>>
>>>>>>>>> Here's my pom.xml in case that helps:
>>>>>>>>>
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>> <project>
>>>>>>>>>    <modelVersion>4.0.0</modelVersion>
>>>>>>>>>    <groupId>my.package.base</groupId>
>>>>>>>>>    <artifactId>dnc-jersey</artifactId>
>>>>>>>>>    <packaging>war</packaging>
>>>>>>>>>    <name>dnc-jersey Jersey Webapp</name>
>>>>>>>>>    <version>1.0-SNAPSHOT</version>
>>>>>>>>>    <build>
>>>>>>>>>        <finalName>dnc-jersey</finalName>
>>>>>>>>>        <plugins>
>>>>>>>>>            <plugin>
>>>>>>>>>                <artifactId>maven-compiler-plugin</artifactId>
>>>>>>>>>                <inherited>true</inherited>
>>>>>>>>>                <configuration>
>>>>>>>>>                    <source>1.6</source>
>>>>>>>>>                    <target>1.6</target>
>>>>>>>>>                </configuration>
>>>>>>>>>            </plugin>
>>>>>>>>>            <plugin>
>>>>>>>>>                <groupId>org.glassfish</groupId>
>>>>>>>>>                <artifactId>maven-glassfish-plugin</artifactId>
>>>>>>>>>            </plugin>
>>>>>>>>>        </plugins>
>>>>>>>>>    </build>
>>>>>>>>>    <profiles>
>>>>>>>>>        <profile>
>>>>>>>>>            <id>jdk-1.5</id>
>>>>>>>>>            <activation>
>>>>>>>>>                <jdk>1.5</jdk>
>>>>>>>>>            </activation>
>>>>>>>>>            <dependencies>
>>>>>>>>>                <dependency>
>>>>>>>>>                    <groupId>com.sun.xml.bind</groupId>
>>>>>>>>>                    <artifactId>jaxb-impl</artifactId>
>>>>>>>>>                    <version>2.1.10</version>
>>>>>>>>>                </dependency>
>>>>>>>>>            </dependencies>
>>>>>>>>>        </profile>
>>>>>>>>>    </profiles>
>>>>>>>>>    <repositories>
>>>>>>>>>        <repository>
>>>>>>>>>            <id>glassfish-maven2-repository.dev.java.net</id>
>>>>>>>>>            <name>Java.net Maven 2 Repository for GlassFish</name>
>>>>>>>>>            <url>http://download.java.net/maven/glassfish/</url>
>>>>>>>>>            <layout>default</layout>
>>>>>>>>>        </repository>
>>>>>>>>>        <repository>
>>>>>>>>>            <id>maven2-repository.dev.java.net</id>
>>>>>>>>>            <name>Java.net Maven 2 Repository</name>
>>>>>>>>>            <url>http://download.java.net/maven/2/</url>
>>>>>>>>>        </repository>
>>>>>>>>>        <repository>
>>>>>>>>>            <id>maven-repository.dev.java.net</id>
>>>>>>>>>            <name>Java.net Maven 1 Repository (legacy)</name>
>>>>>>>>>            <url>http://download.java.net/maven/1</url>
>>>>>>>>>            <layout>legacy</layout>
>>>>>>>>>        </repository>
>>>>>>>>>    </repositories>
>>>>>>>>>    <pluginRepositories>
>>>>>>>>>        <pluginRepository>
>>>>>>>>>            <id>maven2-repository.dev.java.net</id>
>>>>>>>>>            <name>Java.net Repository for Maven</name>
>>>>>>>>>            <url>http://download.java.net/maven/2/</url>
>>>>>>>>>        </pluginRepository>
>>>>>>>>>        <pluginRepository>
>>>>>>>>>            <id>maven-repository.dev.java.net</id>
>>>>>>>>>            <name>Java.net Maven 1 Repository (legacy)</name>
>>>>>>>>>            <url>http://download.java.net/maven/1</url>
>>>>>>>>>            <layout>legacy</layout>
>>>>>>>>>        </pluginRepository>
>>>>>>>>>    </pluginRepositories>
>>>>>>>>>    <dependencies>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>com.sun.jersey</groupId>
>>>>>>>>>            <artifactId>jersey-server</artifactId>
>>>>>>>>>            <version>${jersey-version}</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>com.sun.jersey</groupId>
>>>>>>>>>            <artifactId>jersey-json</artifactId>
>>>>>>>>>            <version>${jersey-version}</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>com.sun.jersey.contribs</groupId>
>>>>>>>>>            <artifactId>jersey-spring</artifactId>
>>>>>>>>>            <version>${jersey-version}</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>com.sun.jersey</groupId>
>>>>>>>>>            <artifactId>jersey-client</artifactId>
>>>>>>>>>            <version>${jersey-version}</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>javaee</groupId>
>>>>>>>>>            <artifactId>javaee-api</artifactId>
>>>>>>>>>            <version>5</version>
>>>>>>>>>            <scope>provided</scope>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>org.slf4j</groupId>
>>>>>>>>>            <artifactId>slf4j-api</artifactId>
>>>>>>>>>            <version>1.5.6</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>org.slf4j</groupId>
>>>>>>>>>            <artifactId>slf4j-jdk14</artifactId>
>>>>>>>>>            <version>1.5.6</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>org.json</groupId>
>>>>>>>>>            <artifactId>json</artifactId>
>>>>>>>>>            <version>20090211</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>hibernate</groupId>
>>>>>>>>>            <artifactId>hibernate-entitymanager</artifactId>
>>>>>>>>>            <version>3.4.0.GA</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>cglib</groupId>
>>>>>>>>>            <artifactId>cglib-nodep</artifactId>
>>>>>>>>>            <version>2.2</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>commons-codec</groupId>
>>>>>>>>>            <artifactId>commons-codec</artifactId>
>>>>>>>>>            <version>1.3</version>
>>>>>>>>>        </dependency>
>>>>>>>>>        <dependency>
>>>>>>>>>            <groupId>com.sun.jersey.test.framework</groupId>
>>>>>>>>>            <artifactId>jersey-test-framework</artifactId>
>>>>>>>>>            <version>1.0.3</version>
>>>>>>>>>            <scope>test</scope>
>>>>>>>>>        </dependency>
>>>>>>>>>    </dependencies>
>>>>>>>>>    <properties>
>>>>>>>>>        <jersey-version>1.0.3</jersey-version>
>>>>>>>>>    </properties>
>>>>>>>>> </project>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Apr 17, 2009 at 09:13, Naresh <bsnaresh_at_sun.com> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>>   I have just written a blog entry [1] which describes how to use the
>>>>>>>>>> Jersey Test Framework, which is part of the Jersey 1.0.3 release.
>>>>>>>>>>
>>>>>>>>>> [1] http://blogs.sun.com/naresh/entry/jersey_test_framework_makes_it
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Naresh
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> Zerreißen Sie die Netze der Phisher, Hacker und Betrüger!
>>>>> Ihre Internet-Sicherheits-Seiten auf Arcor.de bieten alle Infos und Hilfsmittel, die Sie zum sicheren Surfen brauchen! Play it safe!
>>>>> http://www.arcor.de/footer-sicherheit/
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>