embedded@glassfish.java.net

Re: [embedded] maven plugin - problem with multiple builds (tests) executed during single build

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Thu, 27 May 2010 13:43:06 -0700

Siraj,

It's the same problem as
https://glassfish.dev.java.net/issues/show_bug.cgi?id=11727 - when
habitat is injected into an instance
(InternalInterceptorBindingNamingProxy in this case), it's stale on the
2nd run. I'll change the summary.

-marina

Siraj Ghaffar wrote:
> CCing Marina, if she has any comment.
>
>
> Pavel Bucek wrote:
>>
>> Hello,
>>
>> I have two projects with tests being executed on glassfish embedded
>> 3.0 using maven plugin.
>>
>> There is no problem with build/test when building separately; problem
>> arises when building both projects from parent pom - looks like
>> second embedded glassfish instance is somehow influenced by first and
>> deployment fails on following exception:
>>
>> May 27, 2010 3:36:28 PM
>> com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer
>> initialize
>> SEVERE: Error when configuring to use the EJB interceptor binding
>> API. JAX-RS EJB support is disabled.
>> java.lang.reflect.InvocationTargetException
>> 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
>> com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer.initialize(EJBComponentProviderFactoryInitilizer.java:77)
>>
>> at
>> com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:531)
>>
>> at
>> com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:270)
>>
>> at
>> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:565)
>>
>> at
>> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:211)
>>
>> at
>> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:332)
>>
>> at
>> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:496)
>>
>> at javax.servlet.GenericServlet.init(GenericServlet.java:242)
>> at
>> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1428)
>>
>> at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1230)
>> at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4934)
>>
>> at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5207)
>>
>> at com.sun.enterprise.web.WebModule.start(WebModule.java:499)
>> at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
>>
>> at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
>> at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
>> at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1933)
>>
>> at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1605)
>>
>> at
>> com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)
>> at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
>> at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
>> at
>> org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
>>
>> at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
>>
>> at
>> org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
>>
>> at
>> org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
>>
>> at org.glassfish.maven.DeployMojo.execute(DeployMojo.java:75)
>> at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
>>
>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>> at
>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
>> 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>> at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: java.lang.IllegalStateException: no current invocation
>> at
>> com.sun.ejb.containers.InternalInterceptorBindingImpl.registerInterceptor(InternalInterceptorBindingImpl.java:68)
>>
>> ... 49 more
>>
>> Do you know what could cause this issue?
>>
>> Testcase:
>> http://anise.cz/~paja/jersey-maven-embedded-gf-plugin-testcase.zip
>>
>> Steps to reproduce:
>>
>> cd jcdi-beans-webapp
>> mvn clean install
>> # ok
>> cd ../bookmark-em
>> mvn clean install
>> # ok
>> cd ..
>> mvn clean install
>> # executes clean install for jcdi-beans and bookmark-em (in this order)
>> # not ok
>> # id doesn't matter which one is executed first, latter always fails.
>>
>>
>> Thanks,
>> Pavel
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: embedded-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: embedded-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embedded-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: embedded-help_at_glassfish.dev.java.net
>