You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by og0815 <ol...@gg-net.de> on 2017/05/26 11:22:15 UTC

Arquillian Tomee 7.0.3 - Bigger Test fail on undeploy

Hi Team Tomee,

I have a very weird problem with arquillien tomee 7.0.x and "bigger" tests.
They fail with "unable to undeploy".
The test itself are completing successful (Added an output at the end of the
test). The tomee log is showing no abnormalities. No unexpected warnings or
errors. 
But the Test fails with a Deployment Exception "unable to undeploy"
The hole configuration itself works on test of submodules. 

Before digging in too deep, I have 2 qestions:
- Is it possible to ignore the error on undeployment.
- Is there a way to get a stacktrace of the undeployment error. Alle the
output i got can be found below and this doesn't help. i've looked in all
logs and don't see any information about undeployment problems.

Environment
- arquillian-bom 1.1.12.Final
- arquillian-tomee-remote 7.0.3
- a java ee project with multiple datasources.

Output:
INFORMATION:
RemoteInitialContextCreated{providerUri=http://localhost:8080/tomee/ejb}
Mai 26, 2017 1:01:32 PM org.apache.openejb.arquillian.common.TomEEContainer
undeploy
INFORMATION: cleaning
/tmp/arquillian-tomee-app-working-dir/0/receipt-persistence-test.war
Mai 26, 2017 1:01:32 PM org.apache.openejb.arquillian.common.TomEEContainer
undeploy
INFORMATION: cleaning
/tmp/arquillian-tomee-app-working-dir/0/receipt-persistence-test
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 66.647 s <<<
FAILURE! - in eu.ggnet.dwoss.receipt.itest.ScrapUnitOperationIT
eu.ggnet.dwoss.receipt.itest.ScrapUnitOperationIT  Time elapsed: 5.851 s 
<<< ERROR!
org.jboss.arquillian.container.spi.client.container.DeploymentException:
Unable to undeploy receipt-persistence-test.war
Caused by: org.apache.openejb.UndeployException: Failed undeploying
application:
id=/tmp/arquillian-tomee-app-working-dir/0/receipt-persistence-test

I could supply the hole project, to reproduce this.

Thanx,
Olli




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Arquillian-Tomee-7-0-3-Bigger-Test-fail-on-undeploy-tp4681765.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Arquillian Tomee 7.0.3 - Bigger Test fail on undeploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Ok found it I think:


org.apache.openejb.OpenEJBRuntimeException:
java.lang.ClassNotFoundException: Illegal access: this web application
instance has been stopped already. Could not load
[org.hibernate.ejb.HibernatePersistence]. The following stack trace is
thrown for debugging purposes as well as to attempt to terminate the thread
which caused the illegal access.
at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:136)
at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.delegate(ReloadableEntityManagerFactory.java:123)
at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.close(ReloadableEntityManagerFactory.java:254)
at
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2339)
at org.apache.openejb.assembler.DeployerEjb.undeploy(DeployerEjb.java:422)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
at
org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:181)
at
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:100)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:272)
at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:221)
at
org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:371)
at
org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:182)
at
org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:360)
at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:247)
at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:104)
at
org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at
org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: Illegal access: this web
application instance has been stopped already. Could not load
[org.hibernate.ejb.HibernatePersistence]. The following stack trace is
thrown for debugging purposes as well as to attempt to terminate the thread
which caused the illegal access.
at
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1295)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
at
org.apache.tomee.catalina.TomEEWebappClassLoader.loadClass(TomEEWebappClassLoader.java:204)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at
org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:84)
at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:134)
... 54 more
Caused by: java.lang.IllegalStateException: Illegal access: this web
application instance has been stopped already. Could not load
[org.hibernate.ejb.HibernatePersistence]. The following stack trace is
thrown for debugging purposes as well as to attempt to terminate the thread
which caused the illegal access.
at
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305)
at
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
... 59 more


It can be a side effect of the jpa lazy. 7.0.4(-SNAPSHOT) should behave
better thanks to https://issues.apache.org/jira/browse/TOMEE-2075
One workaround is a @Singleton @Startup touching the entity manager (or
factory) in its @PostConstruct just to ensure it is loaded at startup.



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-22 18:24 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:

> Hmm,
>
> did you try configuring :
>
> <property name="appWorkingDir">target/deployments</property>
>
> <property name="dir">target/tomee</property>
>
>
> this way you will not run in /tmp as by default and get a conflict cause
> you run your project from /tmp as well?
>
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2017-06-22 17:43 GMT+02:00 og0815 <ol...@gg-net.de>:
>
>> Hi,
>>
>> problem occurs under windows and linux.
>> A simple test is not possible, because I can reproduce it in the bigger
>> project only.
>> But you are invited to look into it :-)
>>
>> https://github.com/gg-net/dwoss
>> - branch: one-persistence-xml
>> - profile: integration-tomee-remote
>> - happens in submodule DwOss - EE - Extended - Receipt
>>
>> Regards,
>> Oliver
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://tomee-openejb.979440.n4
>> .nabble.com/Arquillian-Tomee-7-0-3-Bigger-Test-fail-on-
>> undeploy-tp4681765p4681944.html
>> Sent from the TomEE Users mailing list archive at Nabble.com.
>>
>
>

Re: Arquillian Tomee 7.0.3 - Bigger Test fail on undeploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm,

did you try configuring :

<property name="appWorkingDir">target/deployments</property>

<property name="dir">target/tomee</property>


this way you will not run in /tmp as by default and get a conflict cause
you run your project from /tmp as well?



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-22 17:43 GMT+02:00 og0815 <ol...@gg-net.de>:

> Hi,
>
> problem occurs under windows and linux.
> A simple test is not possible, because I can reproduce it in the bigger
> project only.
> But you are invited to look into it :-)
>
> https://github.com/gg-net/dwoss
> - branch: one-persistence-xml
> - profile: integration-tomee-remote
> - happens in submodule DwOss - EE - Extended - Receipt
>
> Regards,
> Oliver
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Arquillian-Tomee-7-0-3-Bigger-Test-fail-
> on-undeploy-tp4681765p4681944.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: Arquillian Tomee 7.0.3 - Bigger Test fail on undeploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm,

did you try configuring :

<property name="appWorkingDir">target/deployments</property>

<property name="dir">target/tomee</property>


this way you will not run in /tmp as by default and get a conflict cause
you run your project from /tmp as well?



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-22 17:43 GMT+02:00 og0815 <ol...@gg-net.de>:

> Hi,
>
> problem occurs under windows and linux.
> A simple test is not possible, because I can reproduce it in the bigger
> project only.
> But you are invited to look into it :-)
>
> https://github.com/gg-net/dwoss
> - branch: one-persistence-xml
> - profile: integration-tomee-remote
> - happens in submodule DwOss - EE - Extended - Receipt
>
> Regards,
> Oliver
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Arquillian-Tomee-7-0-3-Bigger-Test-fail-
> on-undeploy-tp4681765p4681944.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: Arquillian Tomee 7.0.3 - Bigger Test fail on undeploy

Posted by og0815 <ol...@gg-net.de>.
Hi,

problem occurs under windows and linux.
A simple test is not possible, because I can reproduce it in the bigger
project only. 
But you are invited to look into it :-)

https://github.com/gg-net/dwoss
- branch: one-persistence-xml
- profile: integration-tomee-remote
- happens in submodule DwOss - EE - Extended - Receipt

Regards,
Oliver





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Arquillian-Tomee-7-0-3-Bigger-Test-fail-on-undeploy-tp4681765p4681944.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Arquillian Tomee 7.0.3 - Bigger Test fail on undeploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

which OS do you run? can it be windows and a file locking issue when trying
to delete the temp files? Would be great to have a sample on github easy to
run (mvn test) to have a deeper look too.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-15 17:08 GMT+02:00 og0815 <ol...@gg-net.de>:

> Just to sum this up: Used wildfly 10 as extra testserver. No problems
> there.
> So it seams to stick to the tomee part.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Arquillian-Tomee-7-0-3-Bigger-Test-fail-
> on-undeploy-tp4681765p4681869.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: Arquillian Tomee 7.0.3 - Bigger Test fail on undeploy

Posted by og0815 <ol...@gg-net.de>.
Just to sum this up: Used wildfly 10 as extra testserver. No problems there.
So it seams to stick to the tomee part.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Arquillian-Tomee-7-0-3-Bigger-Test-fail-on-undeploy-tp4681765p4681869.html
Sent from the TomEE Users mailing list archive at Nabble.com.