You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Wolfgang Winter <w....@logitags.com> on 2013/11/21 20:35:12 UTC

Using VM args in Tomee Arquillian adapter

Hi,

I need to start Tomee with the remote Arquillian adapter using aspectjweaver
as javaagent. Is it possible to configure runtime args? The doc speaks only
of httpPort, stopPort, version and classifier as config params.

thanks for help
Wolfgang



--
View this message in context: http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Using VM args in Tomee Arquillian adapter

Posted by Romain Manni-Bucau <rm...@gmail.com>.
If your local repo is not in default location set openejb.m2.home property.
The diff with 1.5 is we got rid of openejb-prpvisionning by default. Adding
it back will make it work the same way but can lead to conflicts with some
other deps
Le 25 nov. 2013 22:24, "Wolfgang Winter" <w....@logitags.com> a écrit :

> that's what I did and Maven downloaded it into local rep. Here is the
> profle:
>
>
> and arquillian.xml:
>
>
> But there is an evident difference with 1.5.2 at this point:
>
> /INFO: Extracting
>
> 'D:\projects\cibet-parent\cibet\target\org\apache\openejb\apache-tomee\1.5.2\apache-tomee-1.5.2-webprofile.zip'
> to 'D:\projects\cibet-parent\cibet\target\tomee-remote'
> Nov 25, 2013 9:47:45 PM
> org.apache.tomee.arquillian.remote.RemoteTomEEContainer configure
> INFO: Downloaded container to:
>
> D:\projects\cibet-parent\cibet\target\tomee-remote\apache-tomee-webprofile-1.5.2/
>
> Clearly
>
> /D:\projects\cibet-parent\cibet\mvn:org.apache.openejb:apache-tomee:1.6.0:zip:webprofile
> / is not a file in contrast.
>
> Now, I loose too much time with this, I think I will skip Tomee Arquillian
> adapter. I tried dozens of different combinations and found dozens errors
> and problems. Incomplete documentation, buggy code and inconsistent usage
> is
> not a good combination. The positive thing about it is your responsive
> support, thanks for that.
> My tests are running already with the Arquillian JBoss adapter and I will
> give Glassfish a try.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311p4666410.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Using VM args in Tomee Arquillian adapter

Posted by Wolfgang Winter <w....@logitags.com>.
that's what I did and Maven downloaded it into local rep. Here is the profle:


and arquillian.xml:


But there is an evident difference with 1.5.2 at this point:

/INFO: Extracting
'D:\projects\cibet-parent\cibet\target\org\apache\openejb\apache-tomee\1.5.2\apache-tomee-1.5.2-webprofile.zip'
to 'D:\projects\cibet-parent\cibet\target\tomee-remote'
Nov 25, 2013 9:47:45 PM
org.apache.tomee.arquillian.remote.RemoteTomEEContainer configure
INFO: Downloaded container to:
D:\projects\cibet-parent\cibet\target\tomee-remote\apache-tomee-webprofile-1.5.2/

Clearly
/D:\projects\cibet-parent\cibet\mvn:org.apache.openejb:apache-tomee:1.6.0:zip:webprofile
/ is not a file in contrast.

Now, I loose too much time with this, I think I will skip Tomee Arquillian
adapter. I tried dozens of different combinations and found dozens errors
and problems. Incomplete documentation, buggy code and inconsistent usage is
not a good combination. The positive thing about it is your responsive
support, thanks for that.
My tests are running already with the Arquillian JBoss adapter and I will
give Glassfish a try. 



--
View this message in context: http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311p4666410.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Using VM args in Tomee Arquillian adapter

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

the tip is to add org.apache.openejb:apache-tomee:1.6.0:webprofile:zip
in scope test in your pom.

Here it just says tomee was not found (you can miss a dependency to
allows it and you maybe run behind a proxy)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/11/24 Wolfgang Winter <w....@logitags.com>:
> 1.6.0 is not usable:
>
> /INFO: Extracting
> 'D:\projects\cibet-parent\cibet\mvn:org.apache.openejb:apache-tomee:1.6.0:zip:webprofile'
> to 'D:\projects\cibet-parent\cibet\target\tomee-remote'
> Nov 24, 2013 7:09:35 PM
> org.apache.tomee.arquillian.remote.RemoteTomEEContainer start
> SEVERE: Unable to start remote container
> java.lang.IllegalStateException: Not a file:
> D:\projects\cibet-parent\cibet\mvn:org.apache.openejb:apache-tomee:1.6.0:zip:webprofile
>         at org.apache.openejb.arquillian.common.Files.assertFile(Files.java:153)
> /
>
> However, I can manually open, extract and run tomee from the file downloaded
> by Maven.
>
> Here another bug from 1.5.2:
> AJP port 8009 is in use on my server. By chance I found another secret
> property ajpPort (btw, why is all this not documented?)
> Setting tomee.ajpPort to -1 in surefire lets tomee choose another port, ok.
> However, setting ajpPort in arquillian.xml has no effect! Like exporting
> ports only when -1, behaviour is not consistent.
>
> ... close before giving up
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311p4666368.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Using VM args in Tomee Arquillian adapter

Posted by Wolfgang Winter <w....@logitags.com>.
1.6.0 is not usable:

/INFO: Extracting
'D:\projects\cibet-parent\cibet\mvn:org.apache.openejb:apache-tomee:1.6.0:zip:webprofile'
to 'D:\projects\cibet-parent\cibet\target\tomee-remote'
Nov 24, 2013 7:09:35 PM
org.apache.tomee.arquillian.remote.RemoteTomEEContainer start
SEVERE: Unable to start remote container
java.lang.IllegalStateException: Not a file:
D:\projects\cibet-parent\cibet\mvn:org.apache.openejb:apache-tomee:1.6.0:zip:webprofile
	at org.apache.openejb.arquillian.common.Files.assertFile(Files.java:153)
/

However, I can manually open, extract and run tomee from the file downloaded
by Maven.

Here another bug from 1.5.2:
AJP port 8009 is in use on my server. By chance I found another secret
property ajpPort (btw, why is all this not documented?)
Setting tomee.ajpPort to -1 in surefire lets tomee choose another port, ok.
However, setting ajpPort in arquillian.xml has no effect! Like exporting
ports only when -1, behaviour is not consistent.

... close before giving up 



--
View this message in context: http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311p4666368.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Using VM args in Tomee Arquillian adapter

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

The repo is central from maven.

Iirc we export it only if we initialized it (-1)

About injections i used it so it should work + thats tested, are you sure
you test on server? Client tests doesnt have injections
Le 24 nov. 2013 14:41, "Wolfgang Winter" <w....@logitags.com> a écrit :

> In which Maven repository can I find 1.6 of apache-tomee and
> arquillian-tomee-remote?
>
> I found out the error while deploying on running tomee:
> The port is not mirrored back as system property.
> System.getProperty("tomee.httpPort") is null. Even setting
> exportConfAsSystemProperty to true does not export the port. You may
> discuss
> if this is a feature or a bug but for me it's a bug because behaviour is
> inconsistent and not intuitive:
> tomee.httpPort = -1 --> exported
> tomee.httpPort != -1 --> not exported
>
> But that one solved comes the next problem:
> I inject an EntityManager and a UserTransaction as @Resource into the test
> class, but they are null. Empty beans.xml is in WEB-INF. Is injecting of
> EntityManager and resources not supported by arquillian-tomee-remote ?
>
> Wolfgang
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311p4666358.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Using VM args in Tomee Arquillian adapter

Posted by Wolfgang Winter <w....@logitags.com>.
In which Maven repository can I find 1.6 of apache-tomee and
arquillian-tomee-remote?

I found out the error while deploying on running tomee:
The port is not mirrored back as system property.
System.getProperty("tomee.httpPort") is null. Even setting
exportConfAsSystemProperty to true does not export the port. You may discuss
if this is a feature or a bug but for me it's a bug because behaviour is
inconsistent and not intuitive:
tomee.httpPort = -1 --> exported
tomee.httpPort != -1 --> not exported

But that one solved comes the next problem: 
I inject an EntityManager and a UserTransaction as @Resource into the test
class, but they are null. Empty beans.xml is in WEB-INF. Is injecting of
EntityManager and resources not supported by arquillian-tomee-remote ?

Wolfgang



--
View this message in context: http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311p4666358.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Using VM args in Tomee Arquillian adapter

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

Would you give a try on last release? 1.6.0

1.5.2 was really buggy regarding the conf IMO 1.5.1 was better but maybe
you have a dependency issue
Le 23 nov. 2013 11:08, "Wolfgang Winter" <w....@logitags.com> a écrit :

> Thanks Romain, that works. However, I have a lot of problems to get Tomee -
> Arquillian running. With v.1.5.2/webprofile of apache-tomee and
> arquillian-tomee-remote I get:
>
> /INFO: Server startup in 1654 ms
> Nov 22, 2013 11:05:09 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command '' received
> ...
> Nov 22, 2013 11:05:23 PM org.apache.openejb.client.EventLogger log
> WARNING: RequestFailed{server=http://localhost:55730/tomee/ejb}
> EJBRequest{deploymentId='openejb/Deployer',
> type=EJB_OBJECT_BUSINESS_METHOD,
> method='deploy', primaryKey='null'} {error=Cannot read the response from
> the
> server (OEJP/3.1) : org.apache.openejb.assembler.classic.AppInfo; local
> class incompatible: stream classdesc serialVersionUID =
> 7690895426891445405,
> local class serialVersionUID = -8446165016999701001}
> Nov 22, 2013 11:05:23 PM org.apache.openejb.client.EventLogger log
> INFO:
> RemoteInitialContextCreated{providerUri=http://localhost:55730/tomee/ejb}
> Nov 22, 2013 11:05:23 PM org.apache.openejb.client.EventLogger log
> WARNING: RequestFailed{server=http://localhost:55730/tomee/ejb}
> EJBRequest{deploymentId='openejb/Deployer',
> type=EJB_OBJECT_BUSINESS_METHOD,
> method='getDeployedApps', primaryKey='null'} {error=Cannot read the
> response
> from the server (OEJP/3.1) : org.apache.openejb.assembler.classic.AppInfo;
> local class incompatible: stream classdesc serialVersionUID =
> 7690895426891445405, local class serialVersionUID = -8446165016999701001}
> Nov 22, 2013 11:05:23 PM
> org.apache.openejb.arquillian.common.TomEEContainer
> deploy
> SEVERE: appInfo was not found for
> C:\Users\Wolfgang\AppData\Local\Temp\0\cibetArq1.war, available are: []
> org.apache.openejb.OpenEJBException: can't get appInfo
>         at
>
> org.apache.openejb.arquillian.common.TomEEContainer.deploy(TomEEContainer.java:255)/
>
> I tried many other configurations, playing around with the not-documented
> secret properties (like catalina_opts), but always with other errors.
> I also did not find out how to define a datasource in tomee.xml and how to
> add libs in tomees lib dir. Documentation is too scarce to help me.
> Therefore, I tried deploying on a running 1.5.1 Tomee, following your  blog
> entry
> <
> http://rmannibucau.wordpress.com/2012/06/17/arquillian-and-existing-tomee/
> >
> . I get another error:
>
> /Tests run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 12.719 sec
> <<< FAILURE! - in com.logitags.cibet.helper.arquillian.TomeeAIT
> testPojoInvoke(com.logitags.cibet.helper.arquillian.TomeeAIT)  Time
> elapsed:
> 0.034 sec  <<< ERROR!
> java.lang.IllegalStateException: Error launching test
> com.logitags.cibet.helper.arquillian.TomeeAIT public void
> com.logitags.cibet.helper.arquillian.AbstractArquillian.testPojoInvoke()
> throws java.lang.Exception
>         at
>
> org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:103)
>   ...
> Caused by: java.lang.IllegalStateException: Error launching test at
>
> http://localhost:8680/cibetArq1/ArquillianServletRunner?outputMode=serializedObject&className=com.logitags.cibet.helper.arquillian.TomeeAIT&methodName=testPojoInvoke
> .
> Got 500 (Internal Server Error)
>         at
>
> org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:214)/
>
> There is no class from tomee in the error stack trace, only
> jboss.arquillian.
> and in the server log:
>
> /Nov 22, 2013 10:53:44 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/cibetArq1] appears to have started a thread
> named
> [org.apache.openejb.pool.scheduler.5] but has failed to stop it. This is
> very likely to create a memory leak.
> /
> Do you have any idea?
> (BTW, I am a colleague from WL Aachen, but this work is for my private open
> source project  Cibet <http://www.logitags.com/cibet>  )
> thanks Wolfgang
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311p4666339.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Using VM args in Tomee Arquillian adapter

Posted by Wolfgang Winter <w....@logitags.com>.
Thanks Romain, that works. However, I have a lot of problems to get Tomee -
Arquillian running. With v.1.5.2/webprofile of apache-tomee and
arquillian-tomee-remote I get:

/INFO: Server startup in 1654 ms
Nov 22, 2013 11:05:09 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command '' received
...
Nov 22, 2013 11:05:23 PM org.apache.openejb.client.EventLogger log
WARNING: RequestFailed{server=http://localhost:55730/tomee/ejb}
EJBRequest{deploymentId='openejb/Deployer', type=EJB_OBJECT_BUSINESS_METHOD,
method='deploy', primaryKey='null'} {error=Cannot read the response from the
server (OEJP/3.1) : org.apache.openejb.assembler.classic.AppInfo; local
class incompatible: stream classdesc serialVersionUID = 7690895426891445405,
local class serialVersionUID = -8446165016999701001}
Nov 22, 2013 11:05:23 PM org.apache.openejb.client.EventLogger log
INFO:
RemoteInitialContextCreated{providerUri=http://localhost:55730/tomee/ejb}
Nov 22, 2013 11:05:23 PM org.apache.openejb.client.EventLogger log
WARNING: RequestFailed{server=http://localhost:55730/tomee/ejb}
EJBRequest{deploymentId='openejb/Deployer', type=EJB_OBJECT_BUSINESS_METHOD,
method='getDeployedApps', primaryKey='null'} {error=Cannot read the response
from the server (OEJP/3.1) : org.apache.openejb.assembler.classic.AppInfo;
local class incompatible: stream classdesc serialVersionUID =
7690895426891445405, local class serialVersionUID = -8446165016999701001}
Nov 22, 2013 11:05:23 PM org.apache.openejb.arquillian.common.TomEEContainer
deploy
SEVERE: appInfo was not found for
C:\Users\Wolfgang\AppData\Local\Temp\0\cibetArq1.war, available are: []
org.apache.openejb.OpenEJBException: can't get appInfo
	at
org.apache.openejb.arquillian.common.TomEEContainer.deploy(TomEEContainer.java:255)/

I tried many other configurations, playing around with the not-documented
secret properties (like catalina_opts), but always with other errors. 
I also did not find out how to define a datasource in tomee.xml and how to
add libs in tomees lib dir. Documentation is too scarce to help me.
Therefore, I tried deploying on a running 1.5.1 Tomee, following your  blog
entry
<http://rmannibucau.wordpress.com/2012/06/17/arquillian-and-existing-tomee/> 
. I get another error:

/Tests run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 12.719 sec
<<< FAILURE! - in com.logitags.cibet.helper.arquillian.TomeeAIT
testPojoInvoke(com.logitags.cibet.helper.arquillian.TomeeAIT)  Time elapsed:
0.034 sec  <<< ERROR!
java.lang.IllegalStateException: Error launching test
com.logitags.cibet.helper.arquillian.TomeeAIT public void
com.logitags.cibet.helper.arquillian.AbstractArquillian.testPojoInvoke()
throws java.lang.Exception
	at
org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:103)
  ...
Caused by: java.lang.IllegalStateException: Error launching test at
http://localhost:8680/cibetArq1/ArquillianServletRunner?outputMode=serializedObject&className=com.logitags.cibet.helper.arquillian.TomeeAIT&methodName=testPojoInvoke.
Got 500 (Internal Server Error)
	at
org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:214)/

There is no class from tomee in the error stack trace, only
jboss.arquillian.
and in the server log:

/Nov 22, 2013 10:53:44 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/cibetArq1] appears to have started a thread
named
[org.apache.openejb.pool.scheduler.5] but has failed to stop it. This is
very likely to create a memory leak.
/
Do you have any idea?
(BTW, I am a colleague from WL Aachen, but this work is for my private open
source project  Cibet <http://www.logitags.com/cibet>  )
thanks Wolfgang 




--
View this message in context: http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311p4666339.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Using VM args in Tomee Arquillian adapter

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

try catalina_opts property
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/11/21 Wolfgang Winter <w....@logitags.com>:
> Hi,
>
> I need to start Tomee with the remote Arquillian adapter using aspectjweaver
> as javaagent. Is it possible to configure runtime args? The doc speaks only
> of httpPort, stopPort, version and classifier as config params.
>
> thanks for help
> Wolfgang
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/Using-VM-args-in-Tomee-Arquillian-adapter-tp4666311.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.