users@glassfish.java.net

Re: maven-embedded-glassfish-plugin and integration testing maven multi-module projects

From: Bhavanishankar <bhavanishankara.sapaliga_at_oracle.com>
Date: Tue, 29 Nov 2011 23:02:42 +0530

Hi,

Continue to use 3.1.1 instead of 3.1.

To fix the "PWC2769: Manager has not yet been started" error, please
follow these steps:

1. Download
http://repo1.maven.org/maven2/org/glassfish/metro/webservices-api-osgi/2.1/webservices-api-osgi-2.1.jar

2. Keep the above file in a directory say /tmp/endorsed

3. Add this option to your MAVEN_OPTS environment variable :

    MAVEN_OPTS="-Djava.endorsed.dirs=/tmp/endorsed $MAVEN_OPTS"

4. Now continue with your normal mvn execution.

Let us know if this fixes your problem or not.

Thanks,

Bhavani

On 11/22/2011 08:15 PM, forums_at_java.net wrote:
> Hi,
> We are using maven-embedded-glassfish-plugin to integration test our
> webserves, ensuring that they deploy in a Glassfish instance and that
> they
> can call out to the other webservices they are required too.
>
> This all works perfectly fine (mostly) when the test are run localy, but
> fails when the Maven (via our CI tool) does a build.
> This appears to be an issue with the use of maven multi module
> project, that
> is we have a parent project that has a module for each webservice, and as
> each webservice has its own set of integration tests, each of which
> make use
> of their own maven-embedded-glassfish-plugin we seem to be having
> problems.
>
> When using version 3.1 the the second webservice project is unable to
> load
> the Glassfish plugin
> WARNING: Error registering contexts
> java.lang.ClassCastException: com.sun.enterprise.web.VirtualServer
> cannot be
> cast to org.apache.catalina.Host
>
> When moving to version 3.1.1 the second webservice project appears to
> start
> up the Glassfish plugin but fails to load the webservice application:
> SEVERE: PWC1305: Exception during cleanup after start failed
> org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been
> started
>
> Which is then followed by:
> SEVERE: ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException:
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean
> with name 'com.sun.xml.ws.transport.http.servlet.SpringBinding#0'
> defined in
> ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot create
> inner bean '(inner bean)' of type
> [org.jvnet.jax_ws_commons.spring.SpringService] while setting bean
> property
> 'service'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean
> with name '(inner bean)#1': FactoryBean threw exception on object
> creation;
> nested exception is java.lang.IllegalStateException: Illegal class loader
> binding
>
> My guess is there is some sort of class loader issue going on, I am
> wondering
> if the two instances of teh glassfish plugin are being "mixed up"
> somehow and
> this is causing a major plugin failure in 3.1, but as an application load
> issue in 3.1.1
>
> The first plugin instance is configured to have both a database (H2)
> and has
> JMS resources configured, while the second has no additional resources
> configured.
>
> I have tried having both plugins use different ports, this did not solve
> matters. I have also tried having the plugin available to only one
> applciation at a time, when it is the sole
> maven-embedded-glassfish-plugin in
> the build it works as expected.
>
>
>
> I was hoping somebody might have some insight or advice.
>
> Thanks
>
> Gavin
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
>
> [Message sent by forum member 'encrypt']
>
> View Post: http://forums.java.net/node/866700
>
>