users@jersey.java.net

[Jersey] Re: Glassfish embedded server does not start in junit tests after upgrading to 1.6

From: Pierre Radermecker <pradermecker_at_yahoo.ca>
Date: Mon, 16 May 2011 13:05:03 -0700 (PDT)

Hi,

I can be a bit more specific. It fails the first time because of this error:

Caused by: java.io.IOException: src/main/webapp/WEB-INF/sun-web.xml does not
exist.
    at
org.glassfish.embeddable.archive.ScatteredArchive.addMetadata(ScatteredArchive.java:327)




I don't understand the change made in "createArchive()". Why is it suddendly
trying to build a "sun-web.xml" ?

I am using Tomcat in production so maybe I should forget about Glassfish
altogether and use "jersey-test-framework-external" ?

Thanks for any help.

- Pierre

----- Original Message ----
From: Pierre Radermecker <pradermecker_at_yahoo.ca>
To: users_at_jersey.dev.java.net
Sent: Mon, May 16, 2011 5:39:15 PM
Subject: Glassfish embedded server does not start in junit tests after upgrading
to 1.6

Hi,

Since the 1.6 Jersey upgrade (from 1.5), I have the following error message
while I try to run my tests (using "jersey-test-framework-embedded-glassfish")


Caused by: org.glassfish.embeddable.GlassFishException: Already bootstrapped
    at
org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:150)
    at
org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:106)
    at
org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:80)
    at
com.sun.jersey.test.framework.spi.container.embedded.glassfish.EmbeddedGlassFishTestContainerFactory$EmbeddedGlassFishTestContainer.instantiateServer(EmbeddedGlassFishTestContainerFactory.java:258)


    ... 33 more

Here is my pom entry (${jerseyVersion} is 1.6):

        <dependency>
            <groupId>com.sun.jersey.jersey-test-framework</groupId>
            <artifactId>jersey-test-framework-embedded-glassfish</artifactId>
            <version>${jerseyVersion}</version>
            <scope>test</scope>
        </dependency>

Any ideas ?

Thanks for your help,

- Pierre