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 <[email protected]>:
> 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) <[email protected]>:
>> 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:[email protected]]
>> Gesendet: Freitag, 3. Januar 2014 15:56
>> An: [email protected]
>> 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) <[email protected]>:
>>> 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:[email protected]]
>>> Gesendet: Freitag, 3. Januar 2014 15:00
>>> An: [email protected]
>>> 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) <[email protected]>:
>>>> 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
>>>>
>>>>
>>>>

Reply via email to