You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Alex Soto <as...@gmail.com> on 2014/04/29 09:45:11 UTC

Deploying WAR file from Arquillian Extension

Hello I am developing an arquillian extension that basically deploys two
WAR files, the first one automatically and the second one is created by the
user using @Deployment.

Basically the extensions listens for AfterDeploy annotation and it uses the
current org.jboss.arquillian.container.spi.Container instance to call the
deploy method passing as argument one war file resolved by Shrinkwrap Maven
resolver.

The problem is that when I run the extension with Embedded TomEE next
exception is thrown: Application cannot be deployed as it contains
deployment-ids which are in use and points to the WAR deployed by
extension. If instead of listening AfterDeploy event I listen the
BeforeDeploy, the WAR that cannot be deployed is the one generated by user
with @Deployment.

But if I run with Remote (Managed) TomEE then it works perfectly, so it
seems like we couldn't deploy two war files in embed mode, is it correct?

Thank you so much.

-- 
+----------------------------------------------------------+
  Alex Soto Bueno
  www.lordofthejars.com
+----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

Posted by Romain Manni-Bucau <rm...@gmail.com>.
You updated your project?

If so it means both apps uses same name
Le 17 mai 2014 01:27, "asotobu" <as...@gmail.com> a écrit :

> I have tried today with a simple WAR with HelloWorld servlet and still the
> same problem, I can only deploy one application, when I tried to deploy the
> second one the same exception of previous post is thrown. Moreover if I use
> the remote Apache TomEE connector then although both applications are
> deployed, next exception is thrown:
>
> java.lang.RuntimeException: Could not create new instance of class
> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor
>         at
>
> org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:160)
>         at
>
> org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:111)
>         at
>
> org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)
>         at
>
> org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
>         at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:95)
>         at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
>         at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
>
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Deploying-WAR-file-from-Arquillian-Extension-tp4669020p4669209.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Deploying WAR file from Arquillian Extension

Posted by asotobu <as...@gmail.com>.
I have tried today with a simple WAR with HelloWorld servlet and still the
same problem, I can only deploy one application, when I tried to deploy the
second one the same exception of previous post is thrown. Moreover if I use
the remote Apache TomEE connector then although both applications are
deployed, next exception is thrown:

java.lang.RuntimeException: Could not create new instance of class
org.jboss.arquillian.test.impl.EventTestRunnerAdaptor
	at
org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:160)
	at
org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:111)
	at
org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)
	at
org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:95)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)






--
View this message in context: http://openejb.979440.n4.nabble.com/Deploying-WAR-file-from-Arquillian-Extension-tp4669020p4669209.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Deploying WAR file from Arquillian Extension

Posted by Romain Manni-Bucau <rm...@gmail.com>.
hehe it works here with this hack.


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


2014-04-29 15:40 GMT+02:00 Àlex Soto <as...@gmail.com>:
> Still the same I am not pretty sure why it is happening because it is deployed from scratch :S
>
> Enviat des del meu iPhone
>
> El 29/04/2014, a les 14.36, Romain Manni-Bucau <rm...@gmail.com> va escriure:
>> FYI:
>>
>> public class MockServerDeployer {
>>
>>    private WebArchive mockServerWebArchive;
>>
>> @Inject
>> private Instance<DeploymentDescription> descriptionInstance;
>>
>> @Inject
>> @DeploymentScoped
>> private InstanceProducer<DeploymentDescription> descriptionInstanceProducer;
>>    public void executeBeforeDeploy(@Observes BeforeDeploy event)
>> throws DeploymentException {
>>
>>        if(mockServerWebArchive == null){
>>            resolveMockServerArchive();
>>        }
>>
>>        DeployableContainer<?> deployableContainer =
>> event.getDeployableContainer();
>> final DeploymentDescription old = descriptionInstance.get();
>> try {
>> descriptionInstanceProducer.set(new
>> DeploymentDescription(mockServerWebArchive.getName(),
>> mockServerWebArchive).shouldBeTestable(false));
>> deployableContainer.deploy(this.mockServerWebArchive);
>> } finally {
>> descriptionInstanceProducer.set(old);
>> }
>>    }
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-04-29 13:01 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>>> you can inject the arquillian producer and produce it then reset it to
>>> previously initialized value no?
>>>
>>> well if you can't you can't rely on it at all IMO since it inherit
>>> from previous context and it can lead to a lot of side effect.
>>>
>>>
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau
>>>
>>>
>>> 2014-04-29 12:47 GMT+02:00 Àlex Soto <as...@gmail.com>:
>>>> Although I put the descriptor as not managed it stills throws the application cannot be deployed as it contains deployment -ids .... Exception
>>>>
>>>> Enviat des del meu iPhone
>>>>
>>>> El 29/04/2014, a les 11.56, Romain Manni-Bucau <rm...@gmail.com> va escriure:
>>>>> Ok
>>>>>
>>>>> that's because the mock-server is testable so test class is added to
>>>>> both war as a managed bean with the same name. Just make the
>>>>> DeploymentDescription of the mock-server not testable from your
>>>>> extension.
>>>>>
>>>>> Side note: not initializing/resetting it make deployments not
>>>>> consistent since your deployment inherits from the last test
>>>>> deployment
>>>>>
>>>>>
>>>>> Romain Manni-Bucau
>>>>> Twitter: @rmannibucau
>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>> Github: https://github.com/rmannibucau
>>>>>
>>>>>
>>>>> 2014-04-29 10:50 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>>>>>> INFO: Extracting jar:
>>>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629.war
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>>>>>> INFO: Extracted path:
>>>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>>>> deployWebApps
>>>>>> INFO: using default host: localhost
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>>>>>> INFO: ------------------------- localhost ->
>>>>>> /f558050e-f853-40da-baa4-fa9e17c2c629
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>>>>>> configureApplication
>>>>>> INFO: Configuring enterprise application:
>>>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>>>>>> configureService
>>>>>> INFO: Configuring Service(id=Default Managed Container, type=Container,
>>>>>> provider-id=Default Managed Container)
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AutoConfig
>>>>>> createContainer
>>>>>> INFO: Auto-creating a container for bean
>>>>>> f558050e-f853-40da-baa4-fa9e17c2c629.Comp1777833712:
>>>>>> Container(type=MANAGED, id=Default Managed Container)
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>>>> createRecipe
>>>>>> INFO: Creating Container(id=Default Managed Container)
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.core.managed.SimplePassivater
>>>>>> init
>>>>>> INFO: Using directory /tmp for stateful session passivation
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AppInfoBuilder build
>>>>>> INFO: Enterprise application
>>>>>> "/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629"
>>>>>> loaded.
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>>>> createApplication
>>>>>> INFO: Assembling app:
>>>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.CdiBuilder initSingleton
>>>>>> INFO: Existing thread singleton service in SystemInstance():
>>>>>> org.apache.openejb.cdi.ThreadSingletonServiceImpl@138bd16f
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>>>>>> startApplication
>>>>>> INFO: OpenWebBeans Container is starting...
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>>>>>> INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>>>>>> INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.config.BeansDeployer
>>>>>> validateInjectionPoints
>>>>>> INFO: All injection points were validated successfully.
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>>>>>> startApplication
>>>>>> INFO: OpenWebBeans Container has started, it took 66 ms.
>>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>>>> createApplication
>>>>>> INFO: Deployed
>>>>>> Application(path=/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629)
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>>>>>> INFO: Extracting jar:
>>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8.war
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>>>>>> INFO: Extracted path:
>>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>>>> deployWebApps
>>>>>> INFO: using default host: localhost
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>>>>>> INFO: ------------------------- localhost -> /mockserver-war-2.8
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.catalina.loader.WebappClassLoader
>>>>>> validateJarFile
>>>>>> INFO:
>>>>>> validateJarFile(/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8/WEB-INF/lib/javax.servlet-api-3.0.1.jar)
>>>>>> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
>>>>>> javax/servlet/Servlet.class
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.ConfigurationFactory
>>>>>> configureApplication
>>>>>> INFO: Configuring enterprise application:
>>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.AppInfoBuilder build
>>>>>> INFO: Enterprise application
>>>>>> "/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8" loaded.
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>>>> createApplication
>>>>>> INFO: Assembling app:
>>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>>>> createApplication
>>>>>> SEVERE: Application cannot be deployed as it contains deployment-ids which
>>>>>> are in use: app: /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>>>> createApplication
>>>>>> SEVERE: DeploymentId already used:
>>>>>> org.jboss.arquillian.moco.MocoExtensionTestCase
>>>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>>>> startInternal
>>>>>> SEVERE: Unable to deploy collapsed ear in war
>>>>>> StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/mockserver-war-2.8]
>>>>>> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
>>>>>> deployed as it contains deployment-ids which are in use: app:
>>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>>>
>>>>>>
>>>>>> 2014-04-29 10:43 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>>>>>>
>>>>>>> yeah logs would be nice before digging further
>>>>>>>
>>>>>>>
>>>>>>> Romain Manni-Bucau
>>>>>>> Twitter: @rmannibucau
>>>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>>>> Github: https://github.com/rmannibucau
>>>>>>>
>>>>>>>
>>>>>>> 2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
>>>>>>>> Well both wars have different names I will try with startup event you
>>>>>>> Can see some code, not the latest one on
>>>>>>> github.com/arquillian/arquillian-extension-moco the class
>>>>>>> MockServerDeployer
>>>>>>>>
>>>>>>>> If you want I Can send you the logs
>>>>>>>>
>>>>>>>> Enviat des del meu iPhone
>>>>>>>>
>>>>>>>> El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com>
>>>>>>> va escriure:
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> hmm depends actually how you deploy it. Do you put same names? We can
>>>>>>>>> deploy multiple wars if one is not managed by arquillian more or less.
>>>>>>>>> Typically I used deploy on startup feature a lot for it.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Romain Manni-Bucau
>>>>>>>>> Twitter: @rmannibucau
>>>>>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>>>>>> Github: https://github.com/rmannibucau
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>>>>>>>> Hello I am developing an arquillian extension that basically deploys
>>>>>>> two
>>>>>>>>>> WAR files, the first one automatically and the second one is created
>>>>>>> by the
>>>>>>>>>> user using @Deployment.
>>>>>>>>>>
>>>>>>>>>> Basically the extensions listens for AfterDeploy annotation and it
>>>>>>> uses the
>>>>>>>>>> current org.jboss.arquillian.container.spi.Container instance to call
>>>>>>> the
>>>>>>>>>> deploy method passing as argument one war file resolved by Shrinkwrap
>>>>>>> Maven
>>>>>>>>>> resolver.
>>>>>>>>>>
>>>>>>>>>> The problem is that when I run the extension with Embedded TomEE next
>>>>>>>>>> exception is thrown: Application cannot be deployed as it contains
>>>>>>>>>> deployment-ids which are in use and points to the WAR deployed by
>>>>>>>>>> extension. If instead of listening AfterDeploy event I listen the
>>>>>>>>>> BeforeDeploy, the WAR that cannot be deployed is the one generated by
>>>>>>> user
>>>>>>>>>> with @Deployment.
>>>>>>>>>>
>>>>>>>>>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>>>>>>>>>> seems like we couldn't deploy two war files in embed mode, is it
>>>>>>> correct?
>>>>>>>>>>
>>>>>>>>>> Thank you so much.
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> +----------------------------------------------------------+
>>>>>>>>>> Alex Soto Bueno
>>>>>>>>>> www.lordofthejars.com
>>>>>>>>>> +----------------------------------------------------------+
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> +----------------------------------------------------------+
>>>>>> Alex Soto Bueno - Computer Engineer
>>>>>> www.lordofthejars.com
>>>>>> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

Posted by Àlex Soto <as...@gmail.com>.
Still the same I am not pretty sure why it is happening because it is deployed from scratch :S

Enviat des del meu iPhone

El 29/04/2014, a les 14.36, Romain Manni-Bucau <rm...@gmail.com> va escriure:
> FYI:
> 
> public class MockServerDeployer {
> 
>    private WebArchive mockServerWebArchive;
> 
> @Inject
> private Instance<DeploymentDescription> descriptionInstance;
> 
> @Inject
> @DeploymentScoped
> private InstanceProducer<DeploymentDescription> descriptionInstanceProducer;
>    public void executeBeforeDeploy(@Observes BeforeDeploy event)
> throws DeploymentException {
> 
>        if(mockServerWebArchive == null){
>            resolveMockServerArchive();
>        }
> 
>        DeployableContainer<?> deployableContainer =
> event.getDeployableContainer();
> final DeploymentDescription old = descriptionInstance.get();
> try {
> descriptionInstanceProducer.set(new
> DeploymentDescription(mockServerWebArchive.getName(),
> mockServerWebArchive).shouldBeTestable(false));
> deployableContainer.deploy(this.mockServerWebArchive);
> } finally {
> descriptionInstanceProducer.set(old);
> }
>    }
> 
> 
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 2014-04-29 13:01 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>> you can inject the arquillian producer and produce it then reset it to
>> previously initialized value no?
>> 
>> well if you can't you can't rely on it at all IMO since it inherit
>> from previous context and it can lead to a lot of side effect.
>> 
>> 
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>> 
>> 
>> 2014-04-29 12:47 GMT+02:00 Àlex Soto <as...@gmail.com>:
>>> Although I put the descriptor as not managed it stills throws the application cannot be deployed as it contains deployment -ids .... Exception
>>> 
>>> Enviat des del meu iPhone
>>> 
>>> El 29/04/2014, a les 11.56, Romain Manni-Bucau <rm...@gmail.com> va escriure:
>>>> Ok
>>>> 
>>>> that's because the mock-server is testable so test class is added to
>>>> both war as a managed bean with the same name. Just make the
>>>> DeploymentDescription of the mock-server not testable from your
>>>> extension.
>>>> 
>>>> Side note: not initializing/resetting it make deployments not
>>>> consistent since your deployment inherits from the last test
>>>> deployment
>>>> 
>>>> 
>>>> Romain Manni-Bucau
>>>> Twitter: @rmannibucau
>>>> Blog: http://rmannibucau.wordpress.com/
>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>> Github: https://github.com/rmannibucau
>>>> 
>>>> 
>>>> 2014-04-29 10:50 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>>>>> INFO: Extracting jar:
>>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629.war
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>>>>> INFO: Extracted path:
>>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>>> deployWebApps
>>>>> INFO: using default host: localhost
>>>>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>>>>> INFO: ------------------------- localhost ->
>>>>> /f558050e-f853-40da-baa4-fa9e17c2c629
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>>>>> configureApplication
>>>>> INFO: Configuring enterprise application:
>>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>>>>> configureService
>>>>> INFO: Configuring Service(id=Default Managed Container, type=Container,
>>>>> provider-id=Default Managed Container)
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AutoConfig
>>>>> createContainer
>>>>> INFO: Auto-creating a container for bean
>>>>> f558050e-f853-40da-baa4-fa9e17c2c629.Comp1777833712:
>>>>> Container(type=MANAGED, id=Default Managed Container)
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>>> createRecipe
>>>>> INFO: Creating Container(id=Default Managed Container)
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.core.managed.SimplePassivater
>>>>> init
>>>>> INFO: Using directory /tmp for stateful session passivation
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AppInfoBuilder build
>>>>> INFO: Enterprise application
>>>>> "/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629"
>>>>> loaded.
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>>> createApplication
>>>>> INFO: Assembling app:
>>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.CdiBuilder initSingleton
>>>>> INFO: Existing thread singleton service in SystemInstance():
>>>>> org.apache.openejb.cdi.ThreadSingletonServiceImpl@138bd16f
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>>>>> startApplication
>>>>> INFO: OpenWebBeans Container is starting...
>>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>>>>> INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
>>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>>>>> INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
>>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.config.BeansDeployer
>>>>> validateInjectionPoints
>>>>> INFO: All injection points were validated successfully.
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>>>>> startApplication
>>>>> INFO: OpenWebBeans Container has started, it took 66 ms.
>>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>>> createApplication
>>>>> INFO: Deployed
>>>>> Application(path=/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629)
>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>>>>> INFO: Extracting jar:
>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8.war
>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>>>>> INFO: Extracted path:
>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>>> deployWebApps
>>>>> INFO: using default host: localhost
>>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>>>>> INFO: ------------------------- localhost -> /mockserver-war-2.8
>>>>> Apr 29, 2014 10:47:48 AM org.apache.catalina.loader.WebappClassLoader
>>>>> validateJarFile
>>>>> INFO:
>>>>> validateJarFile(/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8/WEB-INF/lib/javax.servlet-api-3.0.1.jar)
>>>>> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
>>>>> javax/servlet/Servlet.class
>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.ConfigurationFactory
>>>>> configureApplication
>>>>> INFO: Configuring enterprise application:
>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.AppInfoBuilder build
>>>>> INFO: Enterprise application
>>>>> "/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8" loaded.
>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>>> createApplication
>>>>> INFO: Assembling app:
>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>>> createApplication
>>>>> SEVERE: Application cannot be deployed as it contains deployment-ids which
>>>>> are in use: app: /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>>> createApplication
>>>>> SEVERE: DeploymentId already used:
>>>>> org.jboss.arquillian.moco.MocoExtensionTestCase
>>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>>> startInternal
>>>>> SEVERE: Unable to deploy collapsed ear in war
>>>>> StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/mockserver-war-2.8]
>>>>> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
>>>>> deployed as it contains deployment-ids which are in use: app:
>>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>> 
>>>>> 
>>>>> 2014-04-29 10:43 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>>>>> 
>>>>>> yeah logs would be nice before digging further
>>>>>> 
>>>>>> 
>>>>>> Romain Manni-Bucau
>>>>>> Twitter: @rmannibucau
>>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>>> Github: https://github.com/rmannibucau
>>>>>> 
>>>>>> 
>>>>>> 2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
>>>>>>> Well both wars have different names I will try with startup event you
>>>>>> Can see some code, not the latest one on
>>>>>> github.com/arquillian/arquillian-extension-moco the class
>>>>>> MockServerDeployer
>>>>>>> 
>>>>>>> If you want I Can send you the logs
>>>>>>> 
>>>>>>> Enviat des del meu iPhone
>>>>>>> 
>>>>>>> El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com>
>>>>>> va escriure:
>>>>>>>> Hi
>>>>>>>> 
>>>>>>>> hmm depends actually how you deploy it. Do you put same names? We can
>>>>>>>> deploy multiple wars if one is not managed by arquillian more or less.
>>>>>>>> Typically I used deploy on startup feature a lot for it.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Romain Manni-Bucau
>>>>>>>> Twitter: @rmannibucau
>>>>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>>>>> Github: https://github.com/rmannibucau
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>>>>>>> Hello I am developing an arquillian extension that basically deploys
>>>>>> two
>>>>>>>>> WAR files, the first one automatically and the second one is created
>>>>>> by the
>>>>>>>>> user using @Deployment.
>>>>>>>>> 
>>>>>>>>> Basically the extensions listens for AfterDeploy annotation and it
>>>>>> uses the
>>>>>>>>> current org.jboss.arquillian.container.spi.Container instance to call
>>>>>> the
>>>>>>>>> deploy method passing as argument one war file resolved by Shrinkwrap
>>>>>> Maven
>>>>>>>>> resolver.
>>>>>>>>> 
>>>>>>>>> The problem is that when I run the extension with Embedded TomEE next
>>>>>>>>> exception is thrown: Application cannot be deployed as it contains
>>>>>>>>> deployment-ids which are in use and points to the WAR deployed by
>>>>>>>>> extension. If instead of listening AfterDeploy event I listen the
>>>>>>>>> BeforeDeploy, the WAR that cannot be deployed is the one generated by
>>>>>> user
>>>>>>>>> with @Deployment.
>>>>>>>>> 
>>>>>>>>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>>>>>>>>> seems like we couldn't deploy two war files in embed mode, is it
>>>>>> correct?
>>>>>>>>> 
>>>>>>>>> Thank you so much.
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> +----------------------------------------------------------+
>>>>>>>>> Alex Soto Bueno
>>>>>>>>> www.lordofthejars.com
>>>>>>>>> +----------------------------------------------------------+
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> +----------------------------------------------------------+
>>>>> Alex Soto Bueno - Computer Engineer
>>>>> www.lordofthejars.com
>>>>> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

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

public class MockServerDeployer {

    private WebArchive mockServerWebArchive;

@Inject
private Instance<DeploymentDescription> descriptionInstance;

@Inject
@DeploymentScoped
private InstanceProducer<DeploymentDescription> descriptionInstanceProducer;
    public void executeBeforeDeploy(@Observes BeforeDeploy event)
throws DeploymentException {

        if(mockServerWebArchive == null){
            resolveMockServerArchive();
        }

        DeployableContainer<?> deployableContainer =
event.getDeployableContainer();
final DeploymentDescription old = descriptionInstance.get();
try {
descriptionInstanceProducer.set(new
DeploymentDescription(mockServerWebArchive.getName(),
mockServerWebArchive).shouldBeTestable(false));
deployableContainer.deploy(this.mockServerWebArchive);
} finally {
descriptionInstanceProducer.set(old);
}
    }


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


2014-04-29 13:01 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
> you can inject the arquillian producer and produce it then reset it to
> previously initialized value no?
>
> well if you can't you can't rely on it at all IMO since it inherit
> from previous context and it can lead to a lot of side effect.
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-04-29 12:47 GMT+02:00 Àlex Soto <as...@gmail.com>:
>> Although I put the descriptor as not managed it stills throws the application cannot be deployed as it contains deployment -ids .... Exception
>>
>> Enviat des del meu iPhone
>>
>> El 29/04/2014, a les 11.56, Romain Manni-Bucau <rm...@gmail.com> va escriure:
>>> Ok
>>>
>>> that's because the mock-server is testable so test class is added to
>>> both war as a managed bean with the same name. Just make the
>>> DeploymentDescription of the mock-server not testable from your
>>> extension.
>>>
>>> Side note: not initializing/resetting it make deployments not
>>> consistent since your deployment inherits from the last test
>>> deployment
>>>
>>>
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau
>>>
>>>
>>> 2014-04-29 10:50 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>>>> INFO: Extracting jar:
>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629.war
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>>>> INFO: Extracted path:
>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>> deployWebApps
>>>> INFO: using default host: localhost
>>>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>>>> INFO: ------------------------- localhost ->
>>>> /f558050e-f853-40da-baa4-fa9e17c2c629
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>>>> configureApplication
>>>> INFO: Configuring enterprise application:
>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>>>> configureService
>>>> INFO: Configuring Service(id=Default Managed Container, type=Container,
>>>> provider-id=Default Managed Container)
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AutoConfig
>>>> createContainer
>>>> INFO: Auto-creating a container for bean
>>>> f558050e-f853-40da-baa4-fa9e17c2c629.Comp1777833712:
>>>> Container(type=MANAGED, id=Default Managed Container)
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>> createRecipe
>>>> INFO: Creating Container(id=Default Managed Container)
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.core.managed.SimplePassivater
>>>> init
>>>> INFO: Using directory /tmp for stateful session passivation
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AppInfoBuilder build
>>>> INFO: Enterprise application
>>>> "/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629"
>>>> loaded.
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>> createApplication
>>>> INFO: Assembling app:
>>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.CdiBuilder initSingleton
>>>> INFO: Existing thread singleton service in SystemInstance():
>>>> org.apache.openejb.cdi.ThreadSingletonServiceImpl@138bd16f
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>>>> startApplication
>>>> INFO: OpenWebBeans Container is starting...
>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>>>> INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>>>> INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
>>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.config.BeansDeployer
>>>> validateInjectionPoints
>>>> INFO: All injection points were validated successfully.
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>>>> startApplication
>>>> INFO: OpenWebBeans Container has started, it took 66 ms.
>>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>>> createApplication
>>>> INFO: Deployed
>>>> Application(path=/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629)
>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>>>> INFO: Extracting jar:
>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8.war
>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>>>> INFO: Extracted path:
>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>> deployWebApps
>>>> INFO: using default host: localhost
>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>>>> INFO: ------------------------- localhost -> /mockserver-war-2.8
>>>> Apr 29, 2014 10:47:48 AM org.apache.catalina.loader.WebappClassLoader
>>>> validateJarFile
>>>> INFO:
>>>> validateJarFile(/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8/WEB-INF/lib/javax.servlet-api-3.0.1.jar)
>>>> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
>>>> javax/servlet/Servlet.class
>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.ConfigurationFactory
>>>> configureApplication
>>>> INFO: Configuring enterprise application:
>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.AppInfoBuilder build
>>>> INFO: Enterprise application
>>>> "/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8" loaded.
>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>> createApplication
>>>> INFO: Assembling app:
>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>> createApplication
>>>> SEVERE: Application cannot be deployed as it contains deployment-ids which
>>>> are in use: app: /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>>> createApplication
>>>> SEVERE: DeploymentId already used:
>>>> org.jboss.arquillian.moco.MocoExtensionTestCase
>>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>>> startInternal
>>>> SEVERE: Unable to deploy collapsed ear in war
>>>> StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/mockserver-war-2.8]
>>>> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
>>>> deployed as it contains deployment-ids which are in use: app:
>>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>>
>>>>
>>>> 2014-04-29 10:43 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>>>>
>>>>> yeah logs would be nice before digging further
>>>>>
>>>>>
>>>>> Romain Manni-Bucau
>>>>> Twitter: @rmannibucau
>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>> Github: https://github.com/rmannibucau
>>>>>
>>>>>
>>>>> 2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
>>>>>> Well both wars have different names I will try with startup event you
>>>>> Can see some code, not the latest one on
>>>>> github.com/arquillian/arquillian-extension-moco the class
>>>>> MockServerDeployer
>>>>>>
>>>>>> If you want I Can send you the logs
>>>>>>
>>>>>> Enviat des del meu iPhone
>>>>>>
>>>>>> El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com>
>>>>> va escriure:
>>>>>>> Hi
>>>>>>>
>>>>>>> hmm depends actually how you deploy it. Do you put same names? We can
>>>>>>> deploy multiple wars if one is not managed by arquillian more or less.
>>>>>>> Typically I used deploy on startup feature a lot for it.
>>>>>>>
>>>>>>>
>>>>>>> Romain Manni-Bucau
>>>>>>> Twitter: @rmannibucau
>>>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>>>> Github: https://github.com/rmannibucau
>>>>>>>
>>>>>>>
>>>>>>> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>>>>>> Hello I am developing an arquillian extension that basically deploys
>>>>> two
>>>>>>>> WAR files, the first one automatically and the second one is created
>>>>> by the
>>>>>>>> user using @Deployment.
>>>>>>>>
>>>>>>>> Basically the extensions listens for AfterDeploy annotation and it
>>>>> uses the
>>>>>>>> current org.jboss.arquillian.container.spi.Container instance to call
>>>>> the
>>>>>>>> deploy method passing as argument one war file resolved by Shrinkwrap
>>>>> Maven
>>>>>>>> resolver.
>>>>>>>>
>>>>>>>> The problem is that when I run the extension with Embedded TomEE next
>>>>>>>> exception is thrown: Application cannot be deployed as it contains
>>>>>>>> deployment-ids which are in use and points to the WAR deployed by
>>>>>>>> extension. If instead of listening AfterDeploy event I listen the
>>>>>>>> BeforeDeploy, the WAR that cannot be deployed is the one generated by
>>>>> user
>>>>>>>> with @Deployment.
>>>>>>>>
>>>>>>>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>>>>>>>> seems like we couldn't deploy two war files in embed mode, is it
>>>>> correct?
>>>>>>>>
>>>>>>>> Thank you so much.
>>>>>>>>
>>>>>>>> --
>>>>>>>> +----------------------------------------------------------+
>>>>>>>> Alex Soto Bueno
>>>>>>>> www.lordofthejars.com
>>>>>>>> +----------------------------------------------------------+
>>>>
>>>>
>>>>
>>>> --
>>>> +----------------------------------------------------------+
>>>>  Alex Soto Bueno - Computer Engineer
>>>>  www.lordofthejars.com
>>>> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you can inject the arquillian producer and produce it then reset it to
previously initialized value no?

well if you can't you can't rely on it at all IMO since it inherit
from previous context and it can lead to a lot of side effect.


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


2014-04-29 12:47 GMT+02:00 Àlex Soto <as...@gmail.com>:
> Although I put the descriptor as not managed it stills throws the application cannot be deployed as it contains deployment -ids .... Exception
>
> Enviat des del meu iPhone
>
> El 29/04/2014, a les 11.56, Romain Manni-Bucau <rm...@gmail.com> va escriure:
>> Ok
>>
>> that's because the mock-server is testable so test class is added to
>> both war as a managed bean with the same name. Just make the
>> DeploymentDescription of the mock-server not testable from your
>> extension.
>>
>> Side note: not initializing/resetting it make deployments not
>> consistent since your deployment inherits from the last test
>> deployment
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-04-29 10:50 GMT+02:00 Alex Soto <as...@gmail.com>:
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>>> INFO: Extracting jar:
>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629.war
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>>> INFO: Extracted path:
>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>> deployWebApps
>>> INFO: using default host: localhost
>>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>>> INFO: ------------------------- localhost ->
>>> /f558050e-f853-40da-baa4-fa9e17c2c629
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>>> configureApplication
>>> INFO: Configuring enterprise application:
>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>>> configureService
>>> INFO: Configuring Service(id=Default Managed Container, type=Container,
>>> provider-id=Default Managed Container)
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AutoConfig
>>> createContainer
>>> INFO: Auto-creating a container for bean
>>> f558050e-f853-40da-baa4-fa9e17c2c629.Comp1777833712:
>>> Container(type=MANAGED, id=Default Managed Container)
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>> createRecipe
>>> INFO: Creating Container(id=Default Managed Container)
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.core.managed.SimplePassivater
>>> init
>>> INFO: Using directory /tmp for stateful session passivation
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AppInfoBuilder build
>>> INFO: Enterprise application
>>> "/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629"
>>> loaded.
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>> createApplication
>>> INFO: Assembling app:
>>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.CdiBuilder initSingleton
>>> INFO: Existing thread singleton service in SystemInstance():
>>> org.apache.openejb.cdi.ThreadSingletonServiceImpl@138bd16f
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>>> startApplication
>>> INFO: OpenWebBeans Container is starting...
>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>>> INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>>> INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
>>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.config.BeansDeployer
>>> validateInjectionPoints
>>> INFO: All injection points were validated successfully.
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>>> startApplication
>>> INFO: OpenWebBeans Container has started, it took 66 ms.
>>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>>> createApplication
>>> INFO: Deployed
>>> Application(path=/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629)
>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>>> INFO: Extracting jar:
>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8.war
>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>>> INFO: Extracted path:
>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>> deployWebApps
>>> INFO: using default host: localhost
>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>>> INFO: ------------------------- localhost -> /mockserver-war-2.8
>>> Apr 29, 2014 10:47:48 AM org.apache.catalina.loader.WebappClassLoader
>>> validateJarFile
>>> INFO:
>>> validateJarFile(/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8/WEB-INF/lib/javax.servlet-api-3.0.1.jar)
>>> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
>>> javax/servlet/Servlet.class
>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.ConfigurationFactory
>>> configureApplication
>>> INFO: Configuring enterprise application:
>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.AppInfoBuilder build
>>> INFO: Enterprise application
>>> "/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8" loaded.
>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>> createApplication
>>> INFO: Assembling app:
>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>> createApplication
>>> SEVERE: Application cannot be deployed as it contains deployment-ids which
>>> are in use: app: /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>>> createApplication
>>> SEVERE: DeploymentId already used:
>>> org.jboss.arquillian.moco.MocoExtensionTestCase
>>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>>> startInternal
>>> SEVERE: Unable to deploy collapsed ear in war
>>> StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/mockserver-war-2.8]
>>> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
>>> deployed as it contains deployment-ids which are in use: app:
>>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>>>
>>>
>>> 2014-04-29 10:43 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>>>
>>>> yeah logs would be nice before digging further
>>>>
>>>>
>>>> Romain Manni-Bucau
>>>> Twitter: @rmannibucau
>>>> Blog: http://rmannibucau.wordpress.com/
>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>> Github: https://github.com/rmannibucau
>>>>
>>>>
>>>> 2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
>>>>> Well both wars have different names I will try with startup event you
>>>> Can see some code, not the latest one on
>>>> github.com/arquillian/arquillian-extension-moco the class
>>>> MockServerDeployer
>>>>>
>>>>> If you want I Can send you the logs
>>>>>
>>>>> Enviat des del meu iPhone
>>>>>
>>>>> El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com>
>>>> va escriure:
>>>>>> Hi
>>>>>>
>>>>>> hmm depends actually how you deploy it. Do you put same names? We can
>>>>>> deploy multiple wars if one is not managed by arquillian more or less.
>>>>>> Typically I used deploy on startup feature a lot for it.
>>>>>>
>>>>>>
>>>>>> Romain Manni-Bucau
>>>>>> Twitter: @rmannibucau
>>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>>> Github: https://github.com/rmannibucau
>>>>>>
>>>>>>
>>>>>> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>>>>> Hello I am developing an arquillian extension that basically deploys
>>>> two
>>>>>>> WAR files, the first one automatically and the second one is created
>>>> by the
>>>>>>> user using @Deployment.
>>>>>>>
>>>>>>> Basically the extensions listens for AfterDeploy annotation and it
>>>> uses the
>>>>>>> current org.jboss.arquillian.container.spi.Container instance to call
>>>> the
>>>>>>> deploy method passing as argument one war file resolved by Shrinkwrap
>>>> Maven
>>>>>>> resolver.
>>>>>>>
>>>>>>> The problem is that when I run the extension with Embedded TomEE next
>>>>>>> exception is thrown: Application cannot be deployed as it contains
>>>>>>> deployment-ids which are in use and points to the WAR deployed by
>>>>>>> extension. If instead of listening AfterDeploy event I listen the
>>>>>>> BeforeDeploy, the WAR that cannot be deployed is the one generated by
>>>> user
>>>>>>> with @Deployment.
>>>>>>>
>>>>>>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>>>>>>> seems like we couldn't deploy two war files in embed mode, is it
>>>> correct?
>>>>>>>
>>>>>>> Thank you so much.
>>>>>>>
>>>>>>> --
>>>>>>> +----------------------------------------------------------+
>>>>>>> Alex Soto Bueno
>>>>>>> www.lordofthejars.com
>>>>>>> +----------------------------------------------------------+
>>>
>>>
>>>
>>> --
>>> +----------------------------------------------------------+
>>>  Alex Soto Bueno - Computer Engineer
>>>  www.lordofthejars.com
>>> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

Posted by Àlex Soto <as...@gmail.com>.
Although I put the descriptor as not managed it stills throws the application cannot be deployed as it contains deployment -ids .... Exception

Enviat des del meu iPhone

El 29/04/2014, a les 11.56, Romain Manni-Bucau <rm...@gmail.com> va escriure:
> Ok
> 
> that's because the mock-server is testable so test class is added to
> both war as a managed bean with the same name. Just make the
> DeploymentDescription of the mock-server not testable from your
> extension.
> 
> Side note: not initializing/resetting it make deployments not
> consistent since your deployment inherits from the last test
> deployment
> 
> 
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 2014-04-29 10:50 GMT+02:00 Alex Soto <as...@gmail.com>:
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>> INFO: Extracting jar:
>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629.war
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>> INFO: Extracted path:
>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>> deployWebApps
>> INFO: using default host: localhost
>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>> INFO: ------------------------- localhost ->
>> /f558050e-f853-40da-baa4-fa9e17c2c629
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>> configureApplication
>> INFO: Configuring enterprise application:
>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>> configureService
>> INFO: Configuring Service(id=Default Managed Container, type=Container,
>> provider-id=Default Managed Container)
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AutoConfig
>> createContainer
>> INFO: Auto-creating a container for bean
>> f558050e-f853-40da-baa4-fa9e17c2c629.Comp1777833712:
>> Container(type=MANAGED, id=Default Managed Container)
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>> createRecipe
>> INFO: Creating Container(id=Default Managed Container)
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.core.managed.SimplePassivater
>> init
>> INFO: Using directory /tmp for stateful session passivation
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AppInfoBuilder build
>> INFO: Enterprise application
>> "/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629"
>> loaded.
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> INFO: Assembling app:
>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.CdiBuilder initSingleton
>> INFO: Existing thread singleton service in SystemInstance():
>> org.apache.openejb.cdi.ThreadSingletonServiceImpl@138bd16f
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>> startApplication
>> INFO: OpenWebBeans Container is starting...
>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>> INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>> INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.config.BeansDeployer
>> validateInjectionPoints
>> INFO: All injection points were validated successfully.
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>> startApplication
>> INFO: OpenWebBeans Container has started, it took 66 ms.
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> INFO: Deployed
>> Application(path=/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629)
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>> INFO: Extracting jar:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8.war
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>> INFO: Extracted path:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>> deployWebApps
>> INFO: using default host: localhost
>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>> INFO: ------------------------- localhost -> /mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.catalina.loader.WebappClassLoader
>> validateJarFile
>> INFO:
>> validateJarFile(/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8/WEB-INF/lib/javax.servlet-api-3.0.1.jar)
>> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
>> javax/servlet/Servlet.class
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.ConfigurationFactory
>> configureApplication
>> INFO: Configuring enterprise application:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.AppInfoBuilder build
>> INFO: Enterprise application
>> "/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8" loaded.
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> INFO: Assembling app:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> SEVERE: Application cannot be deployed as it contains deployment-ids which
>> are in use: app: /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> SEVERE: DeploymentId already used:
>> org.jboss.arquillian.moco.MocoExtensionTestCase
>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>> startInternal
>> SEVERE: Unable to deploy collapsed ear in war
>> StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/mockserver-war-2.8]
>> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
>> deployed as it contains deployment-ids which are in use: app:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> 
>> 
>> 2014-04-29 10:43 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>> 
>>> yeah logs would be nice before digging further
>>> 
>>> 
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau
>>> 
>>> 
>>> 2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
>>>> Well both wars have different names I will try with startup event you
>>> Can see some code, not the latest one on
>>> github.com/arquillian/arquillian-extension-moco the class
>>> MockServerDeployer
>>>> 
>>>> If you want I Can send you the logs
>>>> 
>>>> Enviat des del meu iPhone
>>>> 
>>>> El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com>
>>> va escriure:
>>>>> Hi
>>>>> 
>>>>> hmm depends actually how you deploy it. Do you put same names? We can
>>>>> deploy multiple wars if one is not managed by arquillian more or less.
>>>>> Typically I used deploy on startup feature a lot for it.
>>>>> 
>>>>> 
>>>>> Romain Manni-Bucau
>>>>> Twitter: @rmannibucau
>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>> Github: https://github.com/rmannibucau
>>>>> 
>>>>> 
>>>>> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>>>> Hello I am developing an arquillian extension that basically deploys
>>> two
>>>>>> WAR files, the first one automatically and the second one is created
>>> by the
>>>>>> user using @Deployment.
>>>>>> 
>>>>>> Basically the extensions listens for AfterDeploy annotation and it
>>> uses the
>>>>>> current org.jboss.arquillian.container.spi.Container instance to call
>>> the
>>>>>> deploy method passing as argument one war file resolved by Shrinkwrap
>>> Maven
>>>>>> resolver.
>>>>>> 
>>>>>> The problem is that when I run the extension with Embedded TomEE next
>>>>>> exception is thrown: Application cannot be deployed as it contains
>>>>>> deployment-ids which are in use and points to the WAR deployed by
>>>>>> extension. If instead of listening AfterDeploy event I listen the
>>>>>> BeforeDeploy, the WAR that cannot be deployed is the one generated by
>>> user
>>>>>> with @Deployment.
>>>>>> 
>>>>>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>>>>>> seems like we couldn't deploy two war files in embed mode, is it
>>> correct?
>>>>>> 
>>>>>> Thank you so much.
>>>>>> 
>>>>>> --
>>>>>> +----------------------------------------------------------+
>>>>>> Alex Soto Bueno
>>>>>> www.lordofthejars.com
>>>>>> +----------------------------------------------------------+
>> 
>> 
>> 
>> --
>> +----------------------------------------------------------+
>>  Alex Soto Bueno - Computer Engineer
>>  www.lordofthejars.com
>> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

Posted by Àlex Soto <as...@gmail.com>.
But the problem is that deploy method requires a descriptor class and deploymentdescription is not interface of descriptor, si I have done next code scenario.get().addDeployment(....)
deployer.get().deploy(name)

And when deploy method is called an illegalstateexception is thrown that the name application cannot be deployer because is managed by arquillian, so can I deploy the war in testeable false?

Enviat des del meu iPhone

El 29/04/2014, a les 11.56, Romain Manni-Bucau <rm...@gmail.com> va escriure:
> Ok
> 
> that's because the mock-server is testable so test class is added to
> both war as a managed bean with the same name. Just make the
> DeploymentDescription of the mock-server not testable from your
> extension.
> 
> Side note: not initializing/resetting it make deployments not
> consistent since your deployment inherits from the last test
> deployment
> 
> 
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 2014-04-29 10:50 GMT+02:00 Alex Soto <as...@gmail.com>:
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>> INFO: Extracting jar:
>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629.war
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
>> INFO: Extracted path:
>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>> deployWebApps
>> INFO: using default host: localhost
>> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>> INFO: ------------------------- localhost ->
>> /f558050e-f853-40da-baa4-fa9e17c2c629
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>> configureApplication
>> INFO: Configuring enterprise application:
>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
>> configureService
>> INFO: Configuring Service(id=Default Managed Container, type=Container,
>> provider-id=Default Managed Container)
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AutoConfig
>> createContainer
>> INFO: Auto-creating a container for bean
>> f558050e-f853-40da-baa4-fa9e17c2c629.Comp1777833712:
>> Container(type=MANAGED, id=Default Managed Container)
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>> createRecipe
>> INFO: Creating Container(id=Default Managed Container)
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.core.managed.SimplePassivater
>> init
>> INFO: Using directory /tmp for stateful session passivation
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AppInfoBuilder build
>> INFO: Enterprise application
>> "/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629"
>> loaded.
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> INFO: Assembling app:
>> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.CdiBuilder initSingleton
>> INFO: Existing thread singleton service in SystemInstance():
>> org.apache.openejb.cdi.ThreadSingletonServiceImpl@138bd16f
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>> startApplication
>> INFO: OpenWebBeans Container is starting...
>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>> INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
>> INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
>> Apr 29, 2014 10:47:46 AM org.apache.webbeans.config.BeansDeployer
>> validateInjectionPoints
>> INFO: All injection points were validated successfully.
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
>> startApplication
>> INFO: OpenWebBeans Container has started, it took 66 ms.
>> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> INFO: Deployed
>> Application(path=/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629)
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>> INFO: Extracting jar:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8.war
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
>> INFO: Extracted path:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>> deployWebApps
>> INFO: using default host: localhost
>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
>> INFO: ------------------------- localhost -> /mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.catalina.loader.WebappClassLoader
>> validateJarFile
>> INFO:
>> validateJarFile(/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8/WEB-INF/lib/javax.servlet-api-3.0.1.jar)
>> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
>> javax/servlet/Servlet.class
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.ConfigurationFactory
>> configureApplication
>> INFO: Configuring enterprise application:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.AppInfoBuilder build
>> INFO: Enterprise application
>> "/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8" loaded.
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> INFO: Assembling app:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> SEVERE: Application cannot be deployed as it contains deployment-ids which
>> are in use: app: /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
>> createApplication
>> SEVERE: DeploymentId already used:
>> org.jboss.arquillian.moco.MocoExtensionTestCase
>> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
>> startInternal
>> SEVERE: Unable to deploy collapsed ear in war
>> StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/mockserver-war-2.8]
>> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
>> deployed as it contains deployment-ids which are in use: app:
>> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>> 
>> 
>> 2014-04-29 10:43 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>> 
>>> yeah logs would be nice before digging further
>>> 
>>> 
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau
>>> 
>>> 
>>> 2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
>>>> Well both wars have different names I will try with startup event you
>>> Can see some code, not the latest one on
>>> github.com/arquillian/arquillian-extension-moco the class
>>> MockServerDeployer
>>>> 
>>>> If you want I Can send you the logs
>>>> 
>>>> Enviat des del meu iPhone
>>>> 
>>>> El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com>
>>> va escriure:
>>>>> Hi
>>>>> 
>>>>> hmm depends actually how you deploy it. Do you put same names? We can
>>>>> deploy multiple wars if one is not managed by arquillian more or less.
>>>>> Typically I used deploy on startup feature a lot for it.
>>>>> 
>>>>> 
>>>>> Romain Manni-Bucau
>>>>> Twitter: @rmannibucau
>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>> Github: https://github.com/rmannibucau
>>>>> 
>>>>> 
>>>>> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>>>>>> Hello I am developing an arquillian extension that basically deploys
>>> two
>>>>>> WAR files, the first one automatically and the second one is created
>>> by the
>>>>>> user using @Deployment.
>>>>>> 
>>>>>> Basically the extensions listens for AfterDeploy annotation and it
>>> uses the
>>>>>> current org.jboss.arquillian.container.spi.Container instance to call
>>> the
>>>>>> deploy method passing as argument one war file resolved by Shrinkwrap
>>> Maven
>>>>>> resolver.
>>>>>> 
>>>>>> The problem is that when I run the extension with Embedded TomEE next
>>>>>> exception is thrown: Application cannot be deployed as it contains
>>>>>> deployment-ids which are in use and points to the WAR deployed by
>>>>>> extension. If instead of listening AfterDeploy event I listen the
>>>>>> BeforeDeploy, the WAR that cannot be deployed is the one generated by
>>> user
>>>>>> with @Deployment.
>>>>>> 
>>>>>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>>>>>> seems like we couldn't deploy two war files in embed mode, is it
>>> correct?
>>>>>> 
>>>>>> Thank you so much.
>>>>>> 
>>>>>> --
>>>>>> +----------------------------------------------------------+
>>>>>> Alex Soto Bueno
>>>>>> www.lordofthejars.com
>>>>>> +----------------------------------------------------------+
>> 
>> 
>> 
>> --
>> +----------------------------------------------------------+
>>  Alex Soto Bueno - Computer Engineer
>>  www.lordofthejars.com
>> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

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

that's because the mock-server is testable so test class is added to
both war as a managed bean with the same name. Just make the
DeploymentDescription of the mock-server not testable from your
extension.

Side note: not initializing/resetting it make deployments not
consistent since your deployment inherits from the last test
deployment


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


2014-04-29 10:50 GMT+02:00 Alex Soto <as...@gmail.com>:
> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
> INFO: Extracting jar:
> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629.war
> Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
> INFO: Extracted path:
> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder
> deployWebApps
> INFO: using default host: localhost
> Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
> INFO: ------------------------- localhost ->
> /f558050e-f853-40da-baa4-fa9e17c2c629
> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
> configureApplication
> INFO: Configuring enterprise application:
> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=Default Managed Container, type=Container,
> provider-id=Default Managed Container)
> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AutoConfig
> createContainer
> INFO: Auto-creating a container for bean
> f558050e-f853-40da-baa4-fa9e17c2c629.Comp1777833712:
> Container(type=MANAGED, id=Default Managed Container)
> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating Container(id=Default Managed Container)
> Apr 29, 2014 10:47:46 AM org.apache.openejb.core.managed.SimplePassivater
> init
> INFO: Using directory /tmp for stateful session passivation
> Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AppInfoBuilder build
> INFO: Enterprise application
> "/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629"
> loaded.
> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Assembling app:
> /tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.CdiBuilder initSingleton
> INFO: Existing thread singleton service in SystemInstance():
> org.apache.openejb.cdi.ThreadSingletonServiceImpl@138bd16f
> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
> startApplication
> INFO: OpenWebBeans Container is starting...
> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
> INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
> Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
> INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
> Apr 29, 2014 10:47:46 AM org.apache.webbeans.config.BeansDeployer
> validateInjectionPoints
> INFO: All injection points were validated successfully.
> Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
> startApplication
> INFO: OpenWebBeans Container has started, it took 66 ms.
> Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Deployed
> Application(path=/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629)
> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
> INFO: Extracting jar:
> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8.war
> Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
> INFO: Extracted path:
> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
> deployWebApps
> INFO: using default host: localhost
> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
> INFO: ------------------------- localhost -> /mockserver-war-2.8
> Apr 29, 2014 10:47:48 AM org.apache.catalina.loader.WebappClassLoader
> validateJarFile
> INFO:
> validateJarFile(/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8/WEB-INF/lib/javax.servlet-api-3.0.1.jar)
> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
> javax/servlet/Servlet.class
> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.ConfigurationFactory
> configureApplication
> INFO: Configuring enterprise application:
> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
> Apr 29, 2014 10:47:48 AM org.apache.openejb.config.AppInfoBuilder build
> INFO: Enterprise application
> "/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8" loaded.
> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Assembling app:
> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
> createApplication
> SEVERE: Application cannot be deployed as it contains deployment-ids which
> are in use: app: /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
> Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
> createApplication
> SEVERE: DeploymentId already used:
> org.jboss.arquillian.moco.MocoExtensionTestCase
> Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
> startInternal
> SEVERE: Unable to deploy collapsed ear in war
> StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/mockserver-war-2.8]
> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
> deployed as it contains deployment-ids which are in use: app:
> /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
>
>
> 2014-04-29 10:43 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> yeah logs would be nice before digging further
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
>> > Well both wars have different names I will try with startup event you
>> Can see some code, not the latest one on
>> github.com/arquillian/arquillian-extension-moco the class
>> MockServerDeployer
>> >
>> > If you want I Can send you the logs
>> >
>> > Enviat des del meu iPhone
>> >
>> > El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com>
>> va escriure:
>> >> Hi
>> >>
>> >> hmm depends actually how you deploy it. Do you put same names? We can
>> >> deploy multiple wars if one is not managed by arquillian more or less.
>> >> Typically I used deploy on startup feature a lot for it.
>> >>
>> >>
>> >> Romain Manni-Bucau
>> >> Twitter: @rmannibucau
>> >> Blog: http://rmannibucau.wordpress.com/
>> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> >> Github: https://github.com/rmannibucau
>> >>
>> >>
>> >> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>> >>> Hello I am developing an arquillian extension that basically deploys
>> two
>> >>> WAR files, the first one automatically and the second one is created
>> by the
>> >>> user using @Deployment.
>> >>>
>> >>> Basically the extensions listens for AfterDeploy annotation and it
>> uses the
>> >>> current org.jboss.arquillian.container.spi.Container instance to call
>> the
>> >>> deploy method passing as argument one war file resolved by Shrinkwrap
>> Maven
>> >>> resolver.
>> >>>
>> >>> The problem is that when I run the extension with Embedded TomEE next
>> >>> exception is thrown: Application cannot be deployed as it contains
>> >>> deployment-ids which are in use and points to the WAR deployed by
>> >>> extension. If instead of listening AfterDeploy event I listen the
>> >>> BeforeDeploy, the WAR that cannot be deployed is the one generated by
>> user
>> >>> with @Deployment.
>> >>>
>> >>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>> >>> seems like we couldn't deploy two war files in embed mode, is it
>> correct?
>> >>>
>> >>> Thank you so much.
>> >>>
>> >>> --
>> >>> +----------------------------------------------------------+
>> >>>  Alex Soto Bueno
>> >>>  www.lordofthejars.com
>> >>> +----------------------------------------------------------+
>>
>
>
>
> --
> +----------------------------------------------------------+
>   Alex Soto Bueno - Computer Engineer
>   www.lordofthejars.com
> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

Posted by Alex Soto <as...@gmail.com>.
Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
INFO: Extracting jar:
/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629.war
Apr 29, 2014 10:47:46 AM org.apache.openejb.util.JarExtractor extract
INFO: Extracted path:
/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder
deployWebApps
INFO: using default host: localhost
Apr 29, 2014 10:47:46 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
INFO: ------------------------- localhost ->
/f558050e-f853-40da-baa4-fa9e17c2c629
Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
configureApplication
INFO: Configuring enterprise application:
/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
Apr 29, 2014 10:47:46 AM org.apache.openejb.config.ConfigurationFactory
configureService
INFO: Configuring Service(id=Default Managed Container, type=Container,
provider-id=Default Managed Container)
Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AutoConfig
createContainer
INFO: Auto-creating a container for bean
f558050e-f853-40da-baa4-fa9e17c2c629.Comp1777833712:
Container(type=MANAGED, id=Default Managed Container)
Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
createRecipe
INFO: Creating Container(id=Default Managed Container)
Apr 29, 2014 10:47:46 AM org.apache.openejb.core.managed.SimplePassivater
init
INFO: Using directory /tmp for stateful session passivation
Apr 29, 2014 10:47:46 AM org.apache.openejb.config.AppInfoBuilder build
INFO: Enterprise application
"/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629"
loaded.
Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Assembling app:
/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629
Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.CdiBuilder initSingleton
INFO: Existing thread singleton service in SystemInstance():
org.apache.openejb.cdi.ThreadSingletonServiceImpl@138bd16f
Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
startApplication
INFO: OpenWebBeans Container is starting...
Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
Apr 29, 2014 10:47:46 AM org.apache.webbeans.plugins.PluginLoader startUp
INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
Apr 29, 2014 10:47:46 AM org.apache.webbeans.config.BeansDeployer
validateInjectionPoints
INFO: All injection points were validated successfully.
Apr 29, 2014 10:47:46 AM org.apache.openejb.cdi.OpenEJBLifecycle
startApplication
INFO: OpenWebBeans Container has started, it took 66 ms.
Apr 29, 2014 10:47:46 AM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Deployed
Application(path=/tmp/arquillian-tomee-app-working-dir/0/f558050e-f853-40da-baa4-fa9e17c2c629)
Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
INFO: Extracting jar:
/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8.war
Apr 29, 2014 10:47:48 AM org.apache.openejb.util.JarExtractor extract
INFO: Extracted path:
/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
deployWebApps
INFO: using default host: localhost
Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder init
INFO: ------------------------- localhost -> /mockserver-war-2.8
Apr 29, 2014 10:47:48 AM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8/WEB-INF/lib/javax.servlet-api-3.0.1.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
Apr 29, 2014 10:47:48 AM org.apache.openejb.config.ConfigurationFactory
configureApplication
INFO: Configuring enterprise application:
/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
Apr 29, 2014 10:47:48 AM org.apache.openejb.config.AppInfoBuilder build
INFO: Enterprise application
"/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8" loaded.
Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Assembling app:
/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
createApplication
SEVERE: Application cannot be deployed as it contains deployment-ids which
are in use: app: /tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8
Apr 29, 2014 10:47:48 AM org.apache.openejb.assembler.classic.Assembler
createApplication
SEVERE: DeploymentId already used:
org.jboss.arquillian.moco.MocoExtensionTestCase
Apr 29, 2014 10:47:48 AM org.apache.tomee.catalina.TomcatWebAppBuilder
startInternal
SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/mockserver-war-2.8]
org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
deployed as it contains deployment-ids which are in use: app:
/tmp/arquillian-tomee-app-working-dir/1/mockserver-war-2.8


2014-04-29 10:43 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:

> yeah logs would be nice before digging further
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
> > Well both wars have different names I will try with startup event you
> Can see some code, not the latest one on
> github.com/arquillian/arquillian-extension-moco the class
> MockServerDeployer
> >
> > If you want I Can send you the logs
> >
> > Enviat des del meu iPhone
> >
> > El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com>
> va escriure:
> >> Hi
> >>
> >> hmm depends actually how you deploy it. Do you put same names? We can
> >> deploy multiple wars if one is not managed by arquillian more or less.
> >> Typically I used deploy on startup feature a lot for it.
> >>
> >>
> >> Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
> >>> Hello I am developing an arquillian extension that basically deploys
> two
> >>> WAR files, the first one automatically and the second one is created
> by the
> >>> user using @Deployment.
> >>>
> >>> Basically the extensions listens for AfterDeploy annotation and it
> uses the
> >>> current org.jboss.arquillian.container.spi.Container instance to call
> the
> >>> deploy method passing as argument one war file resolved by Shrinkwrap
> Maven
> >>> resolver.
> >>>
> >>> The problem is that when I run the extension with Embedded TomEE next
> >>> exception is thrown: Application cannot be deployed as it contains
> >>> deployment-ids which are in use and points to the WAR deployed by
> >>> extension. If instead of listening AfterDeploy event I listen the
> >>> BeforeDeploy, the WAR that cannot be deployed is the one generated by
> user
> >>> with @Deployment.
> >>>
> >>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
> >>> seems like we couldn't deploy two war files in embed mode, is it
> correct?
> >>>
> >>> Thank you so much.
> >>>
> >>> --
> >>> +----------------------------------------------------------+
> >>>  Alex Soto Bueno
> >>>  www.lordofthejars.com
> >>> +----------------------------------------------------------+
>



-- 
+----------------------------------------------------------+
  Alex Soto Bueno - Computer Engineer
  www.lordofthejars.com
+----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

Posted by Romain Manni-Bucau <rm...@gmail.com>.
yeah logs would be nice before digging further


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


2014-04-29 10:41 GMT+02:00 Àlex Soto <as...@gmail.com>:
> Well both wars have different names I will try with startup event you Can see some code, not the latest one on github.com/arquillian/arquillian-extension-moco the class MockServerDeployer
>
> If you want I Can send you the logs
>
> Enviat des del meu iPhone
>
> El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com> va escriure:
>> Hi
>>
>> hmm depends actually how you deploy it. Do you put same names? We can
>> deploy multiple wars if one is not managed by arquillian more or less.
>> Typically I used deploy on startup feature a lot for it.
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>>> Hello I am developing an arquillian extension that basically deploys two
>>> WAR files, the first one automatically and the second one is created by the
>>> user using @Deployment.
>>>
>>> Basically the extensions listens for AfterDeploy annotation and it uses the
>>> current org.jboss.arquillian.container.spi.Container instance to call the
>>> deploy method passing as argument one war file resolved by Shrinkwrap Maven
>>> resolver.
>>>
>>> The problem is that when I run the extension with Embedded TomEE next
>>> exception is thrown: Application cannot be deployed as it contains
>>> deployment-ids which are in use and points to the WAR deployed by
>>> extension. If instead of listening AfterDeploy event I listen the
>>> BeforeDeploy, the WAR that cannot be deployed is the one generated by user
>>> with @Deployment.
>>>
>>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>>> seems like we couldn't deploy two war files in embed mode, is it correct?
>>>
>>> Thank you so much.
>>>
>>> --
>>> +----------------------------------------------------------+
>>>  Alex Soto Bueno
>>>  www.lordofthejars.com
>>> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

Posted by Àlex Soto <as...@gmail.com>.
Well both wars have different names I will try with startup event you Can see some code, not the latest one on github.com/arquillian/arquillian-extension-moco the class MockServerDeployer

If you want I Can send you the logs

Enviat des del meu iPhone

El 29/04/2014, a les 10.10, Romain Manni-Bucau <rm...@gmail.com> va escriure:
> Hi
> 
> hmm depends actually how you deploy it. Do you put same names? We can
> deploy multiple wars if one is not managed by arquillian more or less.
> Typically I used deploy on startup feature a lot for it.
> 
> 
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
>> Hello I am developing an arquillian extension that basically deploys two
>> WAR files, the first one automatically and the second one is created by the
>> user using @Deployment.
>> 
>> Basically the extensions listens for AfterDeploy annotation and it uses the
>> current org.jboss.arquillian.container.spi.Container instance to call the
>> deploy method passing as argument one war file resolved by Shrinkwrap Maven
>> resolver.
>> 
>> The problem is that when I run the extension with Embedded TomEE next
>> exception is thrown: Application cannot be deployed as it contains
>> deployment-ids which are in use and points to the WAR deployed by
>> extension. If instead of listening AfterDeploy event I listen the
>> BeforeDeploy, the WAR that cannot be deployed is the one generated by user
>> with @Deployment.
>> 
>> But if I run with Remote (Managed) TomEE then it works perfectly, so it
>> seems like we couldn't deploy two war files in embed mode, is it correct?
>> 
>> Thank you so much.
>> 
>> --
>> +----------------------------------------------------------+
>>  Alex Soto Bueno
>>  www.lordofthejars.com
>> +----------------------------------------------------------+

Re: Deploying WAR file from Arquillian Extension

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

hmm depends actually how you deploy it. Do you put same names? We can
deploy multiple wars if one is not managed by arquillian more or less.
Typically I used deploy on startup feature a lot for it.


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


2014-04-29 9:45 GMT+02:00 Alex Soto <as...@gmail.com>:
> Hello I am developing an arquillian extension that basically deploys two
> WAR files, the first one automatically and the second one is created by the
> user using @Deployment.
>
> Basically the extensions listens for AfterDeploy annotation and it uses the
> current org.jboss.arquillian.container.spi.Container instance to call the
> deploy method passing as argument one war file resolved by Shrinkwrap Maven
> resolver.
>
> The problem is that when I run the extension with Embedded TomEE next
> exception is thrown: Application cannot be deployed as it contains
> deployment-ids which are in use and points to the WAR deployed by
> extension. If instead of listening AfterDeploy event I listen the
> BeforeDeploy, the WAR that cannot be deployed is the one generated by user
> with @Deployment.
>
> But if I run with Remote (Managed) TomEE then it works perfectly, so it
> seems like we couldn't deploy two war files in embed mode, is it correct?
>
> Thank you so much.
>
> --
> +----------------------------------------------------------+
>   Alex Soto Bueno
>   www.lordofthejars.com
> +----------------------------------------------------------+