You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "Fabian Schwarzer (Inxmail GmbH)" <Fa...@inxmail.de> on 2014/01/03 14:51:29 UTC

Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Hi everyone!

I got following setup:

-          Development machine where I code

-          VM (started by Vagrant) on that dev machine that runs TomEE 1.6.0

-          Arquillian tests and the tomee-remote adapter

Now I want to start the execution of my Arquillian tests on the dev machine which should use the remote TomeEE (on the VM) as the target container.
This does not work due to the following exception:

Caused by: org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
        at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
        at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
        at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
        at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
        at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
        at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
        at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
        at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
        at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
        at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
        at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
       at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
        at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
        at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
        at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
        at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
        at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
        at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
    Caused by: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:215)
        at java.util.zip.ZipFile.<init>(ZipFile.java:145)
        at java.util.jar.JarFile.<init>(JarFile.java:153)
        at java.util.jar.JarFile.<init>(JarFile.java:117)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
        at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
        ... 53 more

As far as I understand from looking at the exception and the relevant code (both deploy methods) on

https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeployer.java

and

https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java

the TomEE remote adapter does not transfer the war file to the remote container like other remote adapters (e.g. the one for Glassfish) do. Instead, the adapter just passes a path to the remote TomEE which then goes and tries to fetch the war from that location.

This works well in an environment where Arquillian tests and the remote TomEE run on the same system, but fails in an setup like mine were the remote container "really" is remote.
Are my observations correct? If not, what do I miss and how am I able to let the TomEE remote adapter transfer the whole war file? If they are correct, how should I proceed since this is a very very crucial feature for us that determines whether we can use TomEE or not.
We might be able to contribute to the project and implement that feature...would be glad if you could point me to the right people in order to get some sort of entry point...

Thanks,
Fabian




AW: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by "Fabian Schwarzer (Inxmail GmbH)" <Fa...@inxmail.de>.
Wow! That's what I call a quick response! Thank you very much guys!!
I'll test it and comment on the ticket for my findings

Merci!
Fabian

-----Ursprüngliche Nachricht-----
Von: Jean-Louis MONTEIRO [mailto:jeanouii@gmail.com] 
Gesendet: Freitag, 3. Januar 2014 17:52
An: users@tomee.apache.org
Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

All committed for you.
Please test with the snapshot as soon as it gets deployed (at least 2h to reach the Maven repo).

JLouis


2014/1/3 Romain Manni-Bucau <rm...@gmail.com>

> attached a first patch to support it, didnt tested (I dont have a 
> remote host right now) and wrote "on the fly" so review welcomed 
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014/1/3 Romain Manni-Bucau <rm...@gmail.com>:
> > btw, why not using a local tomee (just curiosity)?
> > Romain Manni-Bucau
> > Twitter: @rmannibucau
> > Blog: http://rmannibucau.wordpress.com/
> > LinkedIn: http://fr.linkedin.com/in/rmannibucau
> > Github: https://github.com/rmannibucau
> >
> >
> >
> > 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> >> Ok, I've opened a ticket (
> https://issues.apache.org/jira/browse/TOMEE-1102). If time permits I 
> will try to code the fix, otherwise I have to switch to Wildfly ;(
> >>
> >> Fabian
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> >> Gesendet: Freitag, 3. Januar 2014 15:56
> >> An: users@tomee.apache.org
> >> Betreff: Re: Arquillian remote adapter not able to deploy to a 
> >> "really
> remote" TomEE?
> >>
> >> well if you want to try go for it (it would be very appreciated)
> otherwise just open a ticket (in all cases a ticket will be needed).
> >>
> >> The client part needing to be hacked (properties to add) is in
> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian
> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEE
> Container.java
> >> (deployer().deploy(...) invocation doesn't have properties), note 
> >> you
> have to check if host is remote to do so, I think I'd prefer a new 
> property in TomEEConfiguration to set properties of the deploy 
> invocation (you can inspire from system properties for the usage) 
> Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >>
> >> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> >>> Thank you for your quick reply!
> >>> I've set the property to true, but that just changes the 
> >>> FileNotFoundException to org.apache.openejb.OpenEJBRuntimeException:
> >>> java.io.FileNotFoundException:
> >>> /opt/tomee/conf/C:\0\62d2b262-795d-4597-a5e0-e2715737caea.war
> >>>
> >>> I searched for the string openejb.deployer.binaries.use in the 
> >>> whole
> 1.6.0 code base and only had one hit in 
> https://github.com/apache/tomee/blob/tomee-1.6.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java. So the Arquillian adapter does not seem to check if its set, does it?
> >>>
> >>> So how should I proceed? Try to fix it myself and open a pull 
> >>> request
> or should I raise a JIRA ticket?
> >>>
> >>> Fabian
> >>>
> >>> -----Ursprüngliche Nachricht-----
> >>> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> >>> Gesendet: Freitag, 3. Januar 2014 15:00
> >>> An: users@tomee.apache.org
> >>> Betreff: Re: Arquillian remote adapter not able to deploy to a 
> >>> "really
> remote" TomEE?
> >>>
> >>> Did you try adding as system properties:
> >>> openejb.deployer.binaries.use=true on the remote tomee
> >>>
> >>> That said I think we miss openejb.deployer.binaries.value support 
> >>> in adapter itself if the host is really remote
> >>>
> >>> Their would be workaround but not that arquillian complaint and we 
> >>> need to fix it in all cases so I prefer to not speak of them right 
> >>> now Romain Manni-Bucau
> >>> Twitter: @rmannibucau
> >>> Blog: http://rmannibucau.wordpress.com/
> >>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >>> Github: https://github.com/rmannibucau
> >>>
> >>>
> >>>
> >>> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) 
> >>> <Fabian.Schwarzer@inxmail.de
> >:
> >>>> Hi everyone!
> >>>>
> >>>> I got following setup:
> >>>>
> >>>> -          Development machine where I code
> >>>>
> >>>> -          VM (started by Vagrant) on that dev machine that runs
> TomEE 1.6.0
> >>>>
> >>>> -          Arquillian tests and the tomee-remote adapter
> >>>>
> >>>> Now I want to start the execution of my Arquillian tests on the 
> >>>> dev
> machine which should use the remote TomeEE (on the VM) as the target 
> container.
> >>>> This does not work due to the following exception:
> >>>>
> >>>> Caused by: org.apache.openejb.OpenEJBRuntimeException:
> java.io.FileNotFoundException:
> /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-wor
> king-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war
> (No such file or directory)
> >>>>         at
> org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(Tomca
> tWebappDeployer.java:46)
> >>>>         at
> org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
> >>>>         at
> org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
> >>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:57)
> >>>>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:43)
> >>>>         at java.lang.reflect.Method.invoke(Method.java:606)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invoca
> tion.invoke(ReflectionInvocationContext.java:182)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee
> d(ReflectionInvocationContext.java:164)
> >>>>         at
> org.apache.openejb.security.internal.InternalSecurityInterceptor.invok
> e(InternalSecurityInterceptor.java:34)
> >>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:57)
> >>>>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:43)
> >>>>         at java.lang.reflect.Method.invoke(Method.java:606)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invoca
> tion.invoke(ReflectionInvocationContext.java:182)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee
> d(ReflectionInvocationContext.java:164)
> >>>>         at
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor
> .java:180)
> >>>>         at
> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor
> .java:99)
> >>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:57)
> >>>>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:43)
> >>>>         at java.lang.reflect.Method.invoke(Method.java:606)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invoca
> tion.invoke(ReflectionInvocationContext.java:182)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee
> d(ReflectionInvocationContext.java:164)
> >>>>         at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(Intercepto
> rStack.java:80)
> >>>>         at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(Stateless
> Container.java:212)
> >>>>        at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessC
> ontainer.java:181)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_
> METHOD(EjbRequestHandler.java:370)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbReq
> uestHandler.java:181)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.j
> ava:344)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
> >>>>         at
> org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.ja
> va:58)
> >>>>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> >>>>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> cationFilterChain.java:305)
> >>>>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> lterChain.java:210)
> >>>>         at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
> >>>>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> cationFilterChain.java:243)
> >>>>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> lterChain.java:210)
> >>>>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
> lve.java:222)
> >>>>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
> lve.java:123)
> >>>>         at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
> >>>>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticat
> orBase.java:611)
> >>>>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
> va:171)
> >>>>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
> va:100)
> >>>>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:9
> 53)
> >>>>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
> e.java:118)
> >>>>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :408)
> >>>>         at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp1
> 1Processor.java:1041)
> >>>>         at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(A
> bstractProtocol.java:603)
> >>>>         at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint
> .java:312)
> >>>>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
> ava:1145)
> >>>>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:615)
> >>>>         at java.lang.Thread.run(Thread.java:724)
> >>>>     Caused by: java.io.FileNotFoundException:
> /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-wor
> king-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war
> (No such file or directory)
> >>>>         at java.util.zip.ZipFile.open(Native Method)
> >>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
> >>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
> >>>>         at java.util.jar.JarFile.<init>(JarFile.java:153)
> >>>>         at java.util.jar.JarFile.<init>(JarFile.java:117)
> >>>>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebA
> ppBuilder.java:476)
> >>>>         at
> org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(Tomca
> tWebappDeployer.java:44)
> >>>>         ... 53 more
> >>>>
> >>>> As far as I understand from looking at the exception and the 
> >>>> relevant code (both deploy methods) on
> >>>>
> >>>> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-cata
> >>>> lina
> >>>> /
> >>>> src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDe
> >>>> ploy
> >>>> e
> >>>> r.java
> >>>>
> >>>> and
> >>>>
> >>>> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arqui
> >>>> llia
> >>>> n
> >>>> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/
> >>>> TomE
> >>>> E
> >>>> Container.java
> >>>>
> >>>> the TomEE remote adapter does not transfer the war file to the 
> >>>> remote
> container like other remote adapters (e.g. the one for Glassfish) do.
> Instead, the adapter just passes a path to the remote TomEE which then 
> goes and tries to fetch the war from that location.
> >>>>
> >>>> This works well in an environment where Arquillian tests and the
> remote TomEE run on the same system, but fails in an setup like mine 
> were the remote container "really" is remote.
> >>>> Are my observations correct? If not, what do I miss and how am I 
> >>>> able
> to let the TomEE remote adapter transfer the whole war file? If they 
> are correct, how should I proceed since this is a very very crucial 
> feature for us that determines whether we can use TomEE or not.
> >>>> We might be able to contribute to the project and implement that
> feature...would be glad if you could point me to the right people in 
> order to get some sort of entry point...
> >>>>
> >>>> Thanks,
> >>>> Fabian
> >>>>
> >>>>
> >>>>
>



--
Jean-Louis

Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
All committed for you.
Please test with the snapshot as soon as it gets deployed (at least 2h to
reach the Maven repo).

JLouis


2014/1/3 Romain Manni-Bucau <rm...@gmail.com>

> attached a first patch to support it, didnt tested (I dont have a
> remote host right now) and wrote "on the fly" so review welcomed
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014/1/3 Romain Manni-Bucau <rm...@gmail.com>:
> > btw, why not using a local tomee (just curiosity)?
> > Romain Manni-Bucau
> > Twitter: @rmannibucau
> > Blog: http://rmannibucau.wordpress.com/
> > LinkedIn: http://fr.linkedin.com/in/rmannibucau
> > Github: https://github.com/rmannibucau
> >
> >
> >
> > 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> >> Ok, I've opened a ticket (
> https://issues.apache.org/jira/browse/TOMEE-1102). If time permits I will
> try to code the fix, otherwise I have to switch to Wildfly ;(
> >>
> >> Fabian
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> >> Gesendet: Freitag, 3. Januar 2014 15:56
> >> An: users@tomee.apache.org
> >> Betreff: Re: Arquillian remote adapter not able to deploy to a "really
> remote" TomEE?
> >>
> >> well if you want to try go for it (it would be very appreciated)
> otherwise just open a ticket (in all cases a ticket will be needed).
> >>
> >> The client part needing to be hacked (properties to add) is in
> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
> >> (deployer().deploy(...) invocation doesn't have properties), note you
> have to check if host is remote to do so, I think I'd prefer a new property
> in TomEEConfiguration to set properties of the deploy invocation (you can
> inspire from system properties for the usage) Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >>
> >> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> >>> Thank you for your quick reply!
> >>> I've set the property to true, but that just changes the
> >>> FileNotFoundException to org.apache.openejb.OpenEJBRuntimeException:
> >>> java.io.FileNotFoundException:
> >>> /opt/tomee/conf/C:\0\62d2b262-795d-4597-a5e0-e2715737caea.war
> >>>
> >>> I searched for the string openejb.deployer.binaries.use in the whole
> 1.6.0 code base and only had one hit in
> https://github.com/apache/tomee/blob/tomee-1.6.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java. So the Arquillian adapter does not seem to check if its set, does it?
> >>>
> >>> So how should I proceed? Try to fix it myself and open a pull request
> or should I raise a JIRA ticket?
> >>>
> >>> Fabian
> >>>
> >>> -----Ursprüngliche Nachricht-----
> >>> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> >>> Gesendet: Freitag, 3. Januar 2014 15:00
> >>> An: users@tomee.apache.org
> >>> Betreff: Re: Arquillian remote adapter not able to deploy to a "really
> remote" TomEE?
> >>>
> >>> Did you try adding as system properties:
> >>> openejb.deployer.binaries.use=true on the remote tomee
> >>>
> >>> That said I think we miss openejb.deployer.binaries.value support in
> >>> adapter itself if the host is really remote
> >>>
> >>> Their would be workaround but not that arquillian complaint and we
> >>> need to fix it in all cases so I prefer to not speak of them right now
> >>> Romain Manni-Bucau
> >>> Twitter: @rmannibucau
> >>> Blog: http://rmannibucau.wordpress.com/
> >>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >>> Github: https://github.com/rmannibucau
> >>>
> >>>
> >>>
> >>> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fabian.Schwarzer@inxmail.de
> >:
> >>>> Hi everyone!
> >>>>
> >>>> I got following setup:
> >>>>
> >>>> -          Development machine where I code
> >>>>
> >>>> -          VM (started by Vagrant) on that dev machine that runs
> TomEE 1.6.0
> >>>>
> >>>> -          Arquillian tests and the tomee-remote adapter
> >>>>
> >>>> Now I want to start the execution of my Arquillian tests on the dev
> machine which should use the remote TomeEE (on the VM) as the target
> container.
> >>>> This does not work due to the following exception:
> >>>>
> >>>> Caused by: org.apache.openejb.OpenEJBRuntimeException:
> java.io.FileNotFoundException:
> /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war
> (No such file or directory)
> >>>>         at
> org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
> >>>>         at
> org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
> >>>>         at
> org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
> >>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >>>>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>>>         at java.lang.reflect.Method.invoke(Method.java:606)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
> >>>>         at
> org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
> >>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >>>>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>>>         at java.lang.reflect.Method.invoke(Method.java:606)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
> >>>>         at
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
> >>>>         at
> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
> >>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >>>>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>>>         at java.lang.reflect.Method.invoke(Method.java:606)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
> >>>>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
> >>>>         at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
> >>>>         at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
> >>>>        at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
> >>>>         at
> org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
> >>>>         at
> org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
> >>>>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> >>>>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> >>>>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >>>>         at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
> >>>>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >>>>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >>>>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> >>>>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> >>>>         at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
> >>>>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
> >>>>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> >>>>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> >>>>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> >>>>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >>>>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> >>>>         at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
> >>>>         at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
> >>>>         at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> >>>>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> >>>>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> >>>>         at java.lang.Thread.run(Thread.java:724)
> >>>>     Caused by: java.io.FileNotFoundException:
> /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war
> (No such file or directory)
> >>>>         at java.util.zip.ZipFile.open(Native Method)
> >>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
> >>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
> >>>>         at java.util.jar.JarFile.<init>(JarFile.java:153)
> >>>>         at java.util.jar.JarFile.<init>(JarFile.java:117)
> >>>>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
> >>>>         at
> org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
> >>>>         ... 53 more
> >>>>
> >>>> As far as I understand from looking at the exception and the relevant
> >>>> code (both deploy methods) on
> >>>>
> >>>> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalina
> >>>> /
> >>>> src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeploy
> >>>> e
> >>>> r.java
> >>>>
> >>>> and
> >>>>
> >>>> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillia
> >>>> n
> >>>> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomE
> >>>> E
> >>>> Container.java
> >>>>
> >>>> the TomEE remote adapter does not transfer the war file to the remote
> container like other remote adapters (e.g. the one for Glassfish) do.
> Instead, the adapter just passes a path to the remote TomEE which then goes
> and tries to fetch the war from that location.
> >>>>
> >>>> This works well in an environment where Arquillian tests and the
> remote TomEE run on the same system, but fails in an setup like mine were
> the remote container "really" is remote.
> >>>> Are my observations correct? If not, what do I miss and how am I able
> to let the TomEE remote adapter transfer the whole war file? If they are
> correct, how should I proceed since this is a very very crucial feature for
> us that determines whether we can use TomEE or not.
> >>>> We might be able to contribute to the project and implement that
> feature...would be glad if you could point me to the right people in order
> to get some sort of entry point...
> >>>>
> >>>> Thanks,
> >>>> Fabian
> >>>>
> >>>>
> >>>>
>



-- 
Jean-Louis

Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
attached a first patch to support it, didnt tested (I dont have a
remote host right now) and wrote "on the fly" so review welcomed
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014/1/3 Romain Manni-Bucau <rm...@gmail.com>:
> btw, why not using a local tomee (just curiosity)?
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>> Ok, I've opened a ticket (https://issues.apache.org/jira/browse/TOMEE-1102). If time permits I will try to code the fix, otherwise I have to switch to Wildfly ;(
>>
>> Fabian
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
>> Gesendet: Freitag, 3. Januar 2014 15:56
>> An: users@tomee.apache.org
>> Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?
>>
>> well if you want to try go for it (it would be very appreciated) otherwise just open a ticket (in all cases a ticket will be needed).
>>
>> The client part needing to be hacked (properties to add) is in https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
>> (deployer().deploy(...) invocation doesn't have properties), note you have to check if host is remote to do so, I think I'd prefer a new property in TomEEConfiguration to set properties of the deploy invocation (you can inspire from system properties for the usage) Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>>> Thank you for your quick reply!
>>> I've set the property to true, but that just changes the
>>> FileNotFoundException to org.apache.openejb.OpenEJBRuntimeException:
>>> java.io.FileNotFoundException:
>>> /opt/tomee/conf/C:\0\62d2b262-795d-4597-a5e0-e2715737caea.war
>>>
>>> I searched for the string openejb.deployer.binaries.use in the whole 1.6.0 code base and only had one hit in https://github.com/apache/tomee/blob/tomee-1.6.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java . So the Arquillian adapter does not seem to check if its set, does it?
>>>
>>> So how should I proceed? Try to fix it myself and open a pull request or should I raise a JIRA ticket?
>>>
>>> Fabian
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
>>> Gesendet: Freitag, 3. Januar 2014 15:00
>>> An: users@tomee.apache.org
>>> Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?
>>>
>>> Did you try adding as system properties:
>>> openejb.deployer.binaries.use=true on the remote tomee
>>>
>>> That said I think we miss openejb.deployer.binaries.value support in
>>> adapter itself if the host is really remote
>>>
>>> Their would be workaround but not that arquillian complaint and we
>>> need to fix it in all cases so I prefer to not speak of them right now
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau
>>>
>>>
>>>
>>> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>>>> Hi everyone!
>>>>
>>>> I got following setup:
>>>>
>>>> -          Development machine where I code
>>>>
>>>> -          VM (started by Vagrant) on that dev machine that runs TomEE 1.6.0
>>>>
>>>> -          Arquillian tests and the tomee-remote adapter
>>>>
>>>> Now I want to start the execution of my Arquillian tests on the dev machine which should use the remote TomeEE (on the VM) as the target container.
>>>> This does not work due to the following exception:
>>>>
>>>> Caused by: org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
>>>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
>>>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>>         at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>>         at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>>>>         at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>>         at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>>>>         at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
>>>>        at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
>>>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
>>>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
>>>>         at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
>>>>         at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
>>>>         at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
>>>>         at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
>>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>>>>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>>>>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>>>>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
>>>>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>>>>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>>>>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>>>>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>>>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>>>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>>>>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>>>>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>>>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>         at java.lang.Thread.run(Thread.java:724)
>>>>     Caused by: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>>>         at java.util.zip.ZipFile.open(Native Method)
>>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
>>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
>>>>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>>>>         at java.util.jar.JarFile.<init>(JarFile.java:117)
>>>>         at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
>>>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
>>>>         ... 53 more
>>>>
>>>> As far as I understand from looking at the exception and the relevant
>>>> code (both deploy methods) on
>>>>
>>>> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalina
>>>> /
>>>> src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeploy
>>>> e
>>>> r.java
>>>>
>>>> and
>>>>
>>>> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillia
>>>> n
>>>> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomE
>>>> E
>>>> Container.java
>>>>
>>>> the TomEE remote adapter does not transfer the war file to the remote container like other remote adapters (e.g. the one for Glassfish) do. Instead, the adapter just passes a path to the remote TomEE which then goes and tries to fetch the war from that location.
>>>>
>>>> This works well in an environment where Arquillian tests and the remote TomEE run on the same system, but fails in an setup like mine were the remote container "really" is remote.
>>>> Are my observations correct? If not, what do I miss and how am I able to let the TomEE remote adapter transfer the whole war file? If they are correct, how should I proceed since this is a very very crucial feature for us that determines whether we can use TomEE or not.
>>>> We might be able to contribute to the project and implement that feature...would be glad if you could point me to the right people in order to get some sort of entry point...
>>>>
>>>> Thanks,
>>>> Fabian
>>>>
>>>>
>>>>

AW: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by "Fabian Schwarzer (Inxmail GmbH)" <Fa...@inxmail.de>.
Hi Romain,

we implement a continuous delivery pipeline. We use a provisioning tool that sets up our machines. Hence the developers have a VM running on their local machine that is the same as the ones on our test machines, prod environment etc...
The TomEE is running inside the developers VM where he deploys to for testing. Also our CI server spins up test machines where the arquillian tests have to run on.
 So the machine where the arquillian tests run on is always a different one than the machine where the test runner resides.

Cheers,
Fabian

-----Ursprüngliche Nachricht-----
Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com] 
Gesendet: Freitag, 3. Januar 2014 17:14
An: users@tomee.apache.org
Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

btw, why not using a local tomee (just curiosity)?
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> Ok, I've opened a ticket 
> (https://issues.apache.org/jira/browse/TOMEE-1102). If time permits I 
> will try to code the fix, otherwise I have to switch to Wildfly ;(
>
> Fabian
>
> -----Ursprüngliche Nachricht-----
> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Gesendet: Freitag, 3. Januar 2014 15:56
> An: users@tomee.apache.org
> Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?
>
> well if you want to try go for it (it would be very appreciated) otherwise just open a ticket (in all cases a ticket will be needed).
>
> The client part needing to be hacked (properties to add) is in 
> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian
> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEE
> Container.java
> (deployer().deploy(...) invocation doesn't have properties), note you 
> have to check if host is remote to do so, I think I'd prefer a new 
> property in TomEEConfiguration to set properties of the deploy 
> invocation (you can inspire from system properties for the usage) 
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>> Thank you for your quick reply!
>> I've set the property to true, but that just changes the 
>> FileNotFoundException to org.apache.openejb.OpenEJBRuntimeException:
>> java.io.FileNotFoundException:
>> /opt/tomee/conf/C:\0\62d2b262-795d-4597-a5e0-e2715737caea.war
>>
>> I searched for the string openejb.deployer.binaries.use in the whole 1.6.0 code base and only had one hit in https://github.com/apache/tomee/blob/tomee-1.6.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java . So the Arquillian adapter does not seem to check if its set, does it?
>>
>> So how should I proceed? Try to fix it myself and open a pull request or should I raise a JIRA ticket?
>>
>> Fabian
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
>> Gesendet: Freitag, 3. Januar 2014 15:00
>> An: users@tomee.apache.org
>> Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?
>>
>> Did you try adding as system properties:
>> openejb.deployer.binaries.use=true on the remote tomee
>>
>> That said I think we miss openejb.deployer.binaries.value support in 
>> adapter itself if the host is really remote
>>
>> Their would be workaround but not that arquillian complaint and we 
>> need to fix it in all cases so I prefer to not speak of them right 
>> now Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>>> Hi everyone!
>>>
>>> I got following setup:
>>>
>>> -          Development machine where I code
>>>
>>> -          VM (started by Vagrant) on that dev machine that runs TomEE 1.6.0
>>>
>>> -          Arquillian tests and the tomee-remote adapter
>>>
>>> Now I want to start the execution of my Arquillian tests on the dev machine which should use the remote TomeEE (on the VM) as the target container.
>>> This does not work due to the following exception:
>>>
>>> Caused by: org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
>>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
>>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>         at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>         at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>>>         at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>         at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>>>         at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
>>>        at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
>>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
>>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
>>>         at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
>>>         at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
>>>         at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
>>>         at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>>>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>>>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>>>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
>>>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>>>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>>>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>>>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>>>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>>>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>         at java.lang.Thread.run(Thread.java:724)
>>>     Caused by: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>>         at java.util.zip.ZipFile.open(Native Method)
>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
>>>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>>>         at java.util.jar.JarFile.<init>(JarFile.java:117)
>>>         at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
>>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
>>>         ... 53 more
>>>
>>> As far as I understand from looking at the exception and the 
>>> relevant code (both deploy methods) on
>>>
>>> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalin
>>> a
>>> /
>>> src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeplo
>>> y
>>> e
>>> r.java
>>>
>>> and
>>>
>>> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquilli
>>> a
>>> n
>>> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/Tom
>>> E
>>> E
>>> Container.java
>>>
>>> the TomEE remote adapter does not transfer the war file to the remote container like other remote adapters (e.g. the one for Glassfish) do. Instead, the adapter just passes a path to the remote TomEE which then goes and tries to fetch the war from that location.
>>>
>>> This works well in an environment where Arquillian tests and the remote TomEE run on the same system, but fails in an setup like mine were the remote container "really" is remote.
>>> Are my observations correct? If not, what do I miss and how am I able to let the TomEE remote adapter transfer the whole war file? If they are correct, how should I proceed since this is a very very crucial feature for us that determines whether we can use TomEE or not.
>>> We might be able to contribute to the project and implement that feature...would be glad if you could point me to the right people in order to get some sort of entry point...
>>>
>>> Thanks,
>>> Fabian
>>>
>>>
>>>

Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
btw, why not using a local tomee (just curiosity)?
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> Ok, I've opened a ticket (https://issues.apache.org/jira/browse/TOMEE-1102). If time permits I will try to code the fix, otherwise I have to switch to Wildfly ;(
>
> Fabian
>
> -----Ursprüngliche Nachricht-----
> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Gesendet: Freitag, 3. Januar 2014 15:56
> An: users@tomee.apache.org
> Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?
>
> well if you want to try go for it (it would be very appreciated) otherwise just open a ticket (in all cases a ticket will be needed).
>
> The client part needing to be hacked (properties to add) is in https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
> (deployer().deploy(...) invocation doesn't have properties), note you have to check if host is remote to do so, I think I'd prefer a new property in TomEEConfiguration to set properties of the deploy invocation (you can inspire from system properties for the usage) Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>> Thank you for your quick reply!
>> I've set the property to true, but that just changes the
>> FileNotFoundException to org.apache.openejb.OpenEJBRuntimeException:
>> java.io.FileNotFoundException:
>> /opt/tomee/conf/C:\0\62d2b262-795d-4597-a5e0-e2715737caea.war
>>
>> I searched for the string openejb.deployer.binaries.use in the whole 1.6.0 code base and only had one hit in https://github.com/apache/tomee/blob/tomee-1.6.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java . So the Arquillian adapter does not seem to check if its set, does it?
>>
>> So how should I proceed? Try to fix it myself and open a pull request or should I raise a JIRA ticket?
>>
>> Fabian
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
>> Gesendet: Freitag, 3. Januar 2014 15:00
>> An: users@tomee.apache.org
>> Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?
>>
>> Did you try adding as system properties:
>> openejb.deployer.binaries.use=true on the remote tomee
>>
>> That said I think we miss openejb.deployer.binaries.value support in
>> adapter itself if the host is really remote
>>
>> Their would be workaround but not that arquillian complaint and we
>> need to fix it in all cases so I prefer to not speak of them right now
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>>> Hi everyone!
>>>
>>> I got following setup:
>>>
>>> -          Development machine where I code
>>>
>>> -          VM (started by Vagrant) on that dev machine that runs TomEE 1.6.0
>>>
>>> -          Arquillian tests and the tomee-remote adapter
>>>
>>> Now I want to start the execution of my Arquillian tests on the dev machine which should use the remote TomeEE (on the VM) as the target container.
>>> This does not work due to the following exception:
>>>
>>> Caused by: org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
>>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
>>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>         at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>         at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>>>         at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>>         at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>>>         at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
>>>        at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
>>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
>>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
>>>         at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
>>>         at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
>>>         at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
>>>         at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>>>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>>>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>>>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
>>>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>>>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>>>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>>>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>>>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>>>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>         at java.lang.Thread.run(Thread.java:724)
>>>     Caused by: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>>         at java.util.zip.ZipFile.open(Native Method)
>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
>>>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
>>>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>>>         at java.util.jar.JarFile.<init>(JarFile.java:117)
>>>         at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
>>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
>>>         ... 53 more
>>>
>>> As far as I understand from looking at the exception and the relevant
>>> code (both deploy methods) on
>>>
>>> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalina
>>> /
>>> src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeploy
>>> e
>>> r.java
>>>
>>> and
>>>
>>> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillia
>>> n
>>> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomE
>>> E
>>> Container.java
>>>
>>> the TomEE remote adapter does not transfer the war file to the remote container like other remote adapters (e.g. the one for Glassfish) do. Instead, the adapter just passes a path to the remote TomEE which then goes and tries to fetch the war from that location.
>>>
>>> This works well in an environment where Arquillian tests and the remote TomEE run on the same system, but fails in an setup like mine were the remote container "really" is remote.
>>> Are my observations correct? If not, what do I miss and how am I able to let the TomEE remote adapter transfer the whole war file? If they are correct, how should I proceed since this is a very very crucial feature for us that determines whether we can use TomEE or not.
>>> We might be able to contribute to the project and implement that feature...would be glad if you could point me to the right people in order to get some sort of entry point...
>>>
>>> Thanks,
>>> Fabian
>>>
>>>
>>>

AW: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by "Fabian Schwarzer (Inxmail GmbH)" <Fa...@inxmail.de>.
Ok, I've opened a ticket (https://issues.apache.org/jira/browse/TOMEE-1102). If time permits I will try to code the fix, otherwise I have to switch to Wildfly ;(

Fabian

-----Ursprüngliche Nachricht-----
Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com] 
Gesendet: Freitag, 3. Januar 2014 15:56
An: users@tomee.apache.org
Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

well if you want to try go for it (it would be very appreciated) otherwise just open a ticket (in all cases a ticket will be needed).

The client part needing to be hacked (properties to add) is in https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
(deployer().deploy(...) invocation doesn't have properties), note you have to check if host is remote to do so, I think I'd prefer a new property in TomEEConfiguration to set properties of the deploy invocation (you can inspire from system properties for the usage) Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> Thank you for your quick reply!
> I've set the property to true, but that just changes the 
> FileNotFoundException to org.apache.openejb.OpenEJBRuntimeException: 
> java.io.FileNotFoundException: 
> /opt/tomee/conf/C:\0\62d2b262-795d-4597-a5e0-e2715737caea.war
>
> I searched for the string openejb.deployer.binaries.use in the whole 1.6.0 code base and only had one hit in https://github.com/apache/tomee/blob/tomee-1.6.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java . So the Arquillian adapter does not seem to check if its set, does it?
>
> So how should I proceed? Try to fix it myself and open a pull request or should I raise a JIRA ticket?
>
> Fabian
>
> -----Ursprüngliche Nachricht-----
> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Gesendet: Freitag, 3. Januar 2014 15:00
> An: users@tomee.apache.org
> Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?
>
> Did you try adding as system properties:
> openejb.deployer.binaries.use=true on the remote tomee
>
> That said I think we miss openejb.deployer.binaries.value support in 
> adapter itself if the host is really remote
>
> Their would be workaround but not that arquillian complaint and we 
> need to fix it in all cases so I prefer to not speak of them right now 
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>> Hi everyone!
>>
>> I got following setup:
>>
>> -          Development machine where I code
>>
>> -          VM (started by Vagrant) on that dev machine that runs TomEE 1.6.0
>>
>> -          Arquillian tests and the tomee-remote adapter
>>
>> Now I want to start the execution of my Arquillian tests on the dev machine which should use the remote TomeEE (on the VM) as the target container.
>> This does not work due to the following exception:
>>
>> Caused by: org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>         at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>         at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>>         at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>         at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>>         at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
>>        at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
>>         at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
>>         at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
>>         at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
>>         at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
>>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>         at java.lang.Thread.run(Thread.java:724)
>>     Caused by: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>         at java.util.zip.ZipFile.open(Native Method)
>>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
>>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
>>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>>         at java.util.jar.JarFile.<init>(JarFile.java:117)
>>         at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
>>         ... 53 more
>>
>> As far as I understand from looking at the exception and the relevant 
>> code (both deploy methods) on
>>
>> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalina
>> / 
>> src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeploy
>> e
>> r.java
>>
>> and
>>
>> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillia
>> n 
>> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomE
>> E
>> Container.java
>>
>> the TomEE remote adapter does not transfer the war file to the remote container like other remote adapters (e.g. the one for Glassfish) do. Instead, the adapter just passes a path to the remote TomEE which then goes and tries to fetch the war from that location.
>>
>> This works well in an environment where Arquillian tests and the remote TomEE run on the same system, but fails in an setup like mine were the remote container "really" is remote.
>> Are my observations correct? If not, what do I miss and how am I able to let the TomEE remote adapter transfer the whole war file? If they are correct, how should I proceed since this is a very very crucial feature for us that determines whether we can use TomEE or not.
>> We might be able to contribute to the project and implement that feature...would be glad if you could point me to the right people in order to get some sort of entry point...
>>
>> Thanks,
>> Fabian
>>
>>
>>

Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
well if you want to try go for it (it would be very appreciated)
otherwise just open a ticket (in all cases a ticket will be needed).

The client part needing to be hacked (properties to add) is in
https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
(deployer().deploy(...) invocation doesn't have properties), note you
have to check if host is remote to do so, I think I'd prefer a new
property in TomEEConfiguration to set properties of the deploy
invocation (you can inspire from system properties for the usage)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> Thank you for your quick reply!
> I've set the property to true, but that just changes the FileNotFoundException to org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /opt/tomee/conf/C:\0\62d2b262-795d-4597-a5e0-e2715737caea.war
>
> I searched for the string openejb.deployer.binaries.use in the whole 1.6.0 code base and only had one hit in https://github.com/apache/tomee/blob/tomee-1.6.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java . So the Arquillian adapter does not seem to check if its set, does it?
>
> So how should I proceed? Try to fix it myself and open a pull request or should I raise a JIRA ticket?
>
> Fabian
>
> -----Ursprüngliche Nachricht-----
> Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Gesendet: Freitag, 3. Januar 2014 15:00
> An: users@tomee.apache.org
> Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?
>
> Did you try adding as system properties:
> openejb.deployer.binaries.use=true on the remote tomee
>
> That said I think we miss openejb.deployer.binaries.value support in adapter itself if the host is really remote
>
> Their would be workaround but not that arquillian complaint and we need to fix it in all cases so I prefer to not speak of them right now Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
>> Hi everyone!
>>
>> I got following setup:
>>
>> -          Development machine where I code
>>
>> -          VM (started by Vagrant) on that dev machine that runs TomEE 1.6.0
>>
>> -          Arquillian tests and the tomee-remote adapter
>>
>> Now I want to start the execution of my Arquillian tests on the dev machine which should use the remote TomeEE (on the VM) as the target container.
>> This does not work due to the following exception:
>>
>> Caused by: org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
>>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>         at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>         at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>>         at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>>         at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>>         at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
>>        at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
>>         at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
>>         at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
>>         at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
>>         at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
>>         at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
>>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>         at java.lang.Thread.run(Thread.java:724)
>>     Caused by: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>>         at java.util.zip.ZipFile.open(Native Method)
>>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
>>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
>>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>>         at java.util.jar.JarFile.<init>(JarFile.java:117)
>>         at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
>>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
>>         ... 53 more
>>
>> As far as I understand from looking at the exception and the relevant
>> code (both deploy methods) on
>>
>> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalina/
>> src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeploye
>> r.java
>>
>> and
>>
>> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian
>> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEE
>> Container.java
>>
>> the TomEE remote adapter does not transfer the war file to the remote container like other remote adapters (e.g. the one for Glassfish) do. Instead, the adapter just passes a path to the remote TomEE which then goes and tries to fetch the war from that location.
>>
>> This works well in an environment where Arquillian tests and the remote TomEE run on the same system, but fails in an setup like mine were the remote container "really" is remote.
>> Are my observations correct? If not, what do I miss and how am I able to let the TomEE remote adapter transfer the whole war file? If they are correct, how should I proceed since this is a very very crucial feature for us that determines whether we can use TomEE or not.
>> We might be able to contribute to the project and implement that feature...would be glad if you could point me to the right people in order to get some sort of entry point...
>>
>> Thanks,
>> Fabian
>>
>>
>>

AW: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by "Fabian Schwarzer (Inxmail GmbH)" <Fa...@inxmail.de>.
Thank you for your quick reply!
I've set the property to true, but that just changes the FileNotFoundException to org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /opt/tomee/conf/C:\0\62d2b262-795d-4597-a5e0-e2715737caea.war

I searched for the string openejb.deployer.binaries.use in the whole 1.6.0 code base and only had one hit in https://github.com/apache/tomee/blob/tomee-1.6.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java . So the Arquillian adapter does not seem to check if its set, does it?

So how should I proceed? Try to fix it myself and open a pull request or should I raise a JIRA ticket?

Fabian

-----Ursprüngliche Nachricht-----
Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com] 
Gesendet: Freitag, 3. Januar 2014 15:00
An: users@tomee.apache.org
Betreff: Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Did you try adding as system properties:
openejb.deployer.binaries.use=true on the remote tomee

That said I think we miss openejb.deployer.binaries.value support in adapter itself if the host is really remote

Their would be workaround but not that arquillian complaint and we need to fix it in all cases so I prefer to not speak of them right now Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> Hi everyone!
>
> I got following setup:
>
> -          Development machine where I code
>
> -          VM (started by Vagrant) on that dev machine that runs TomEE 1.6.0
>
> -          Arquillian tests and the tomee-remote adapter
>
> Now I want to start the execution of my Arquillian tests on the dev machine which should use the remote TomeEE (on the VM) as the target container.
> This does not work due to the following exception:
>
> Caused by: org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>         at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>         at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
>        at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
>         at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
>         at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
>         at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
>         at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
>         at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
>         at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:724)
>     Caused by: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>         at java.util.jar.JarFile.<init>(JarFile.java:117)
>         at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
>         ... 53 more
>
> As far as I understand from looking at the exception and the relevant 
> code (both deploy methods) on
>
> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalina/
> src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeploye
> r.java
>
> and
>
> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian
> -tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEE
> Container.java
>
> the TomEE remote adapter does not transfer the war file to the remote container like other remote adapters (e.g. the one for Glassfish) do. Instead, the adapter just passes a path to the remote TomEE which then goes and tries to fetch the war from that location.
>
> This works well in an environment where Arquillian tests and the remote TomEE run on the same system, but fails in an setup like mine were the remote container "really" is remote.
> Are my observations correct? If not, what do I miss and how am I able to let the TomEE remote adapter transfer the whole war file? If they are correct, how should I proceed since this is a very very crucial feature for us that determines whether we can use TomEE or not.
> We might be able to contribute to the project and implement that feature...would be glad if you could point me to the right people in order to get some sort of entry point...
>
> Thanks,
> Fabian
>
>
>

Re: Arquillian remote adapter not able to deploy to a "really remote" TomEE?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Did you try adding as system properties:
openejb.deployer.binaries.use=true on the remote tomee

That said I think we miss openejb.deployer.binaries.value support in
adapter itself if the host is really remote

Their would be workaround but not that arquillian complaint and we
need to fix it in all cases so I prefer to not speak of them right now
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014/1/3 Fabian Schwarzer (Inxmail GmbH) <Fa...@inxmail.de>:
> Hi everyone!
>
> I got following setup:
>
> -          Development machine where I code
>
> -          VM (started by Vagrant) on that dev machine that runs TomEE 1.6.0
>
> -          Arquillian tests and the tomee-remote adapter
>
> Now I want to start the execution of my Arquillian tests on the dev machine which should use the remote TomeEE (on the VM) as the target container.
> This does not work due to the following exception:
>
> Caused by: org.apache.openejb.OpenEJBRuntimeException: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:46)
>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:168)
>         at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:133)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>         at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>         at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:212)
>        at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:181)
>         at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
>         at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
>         at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
>         at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
>         at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
>         at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>         at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:724)
>     Caused by: java.io.FileNotFoundException: /home/vagrant/C:\Users\fsr\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\a3682ea3-16c1-44d6-b183-fd579872517a.war (No such file or directory)
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:215)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:145)
>         at java.util.jar.JarFile.<init>(JarFile.java:153)
>         at java.util.jar.JarFile.<init>(JarFile.java:117)
>         at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:476)
>         at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
>         ... 53 more
>
> As far as I understand from looking at the exception and the relevant code (both deploy methods) on
>
> https://github.com/apache/tomee/blob/tomee-1.6.0/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/deployment/TomcatWebappDeployer.java
>
> and
>
> https://github.com/apache/tomee/blob/tomee-1.6.0/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEContainer.java
>
> the TomEE remote adapter does not transfer the war file to the remote container like other remote adapters (e.g. the one for Glassfish) do. Instead, the adapter just passes a path to the remote TomEE which then goes and tries to fetch the war from that location.
>
> This works well in an environment where Arquillian tests and the remote TomEE run on the same system, but fails in an setup like mine were the remote container "really" is remote.
> Are my observations correct? If not, what do I miss and how am I able to let the TomEE remote adapter transfer the whole war file? If they are correct, how should I proceed since this is a very very crucial feature for us that determines whether we can use TomEE or not.
> We might be able to contribute to the project and implement that feature...would be glad if you could point me to the right people in order to get some sort of entry point...
>
> Thanks,
> Fabian
>
>
>