Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 881017

Summary: Arquillian AS7 adaptor does not work with jmx protocol with EAP
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Karel Piwko <kpiwko>
Component: ArquillianAssignee: Rodney Russ <rruss>
Status: CLOSED INSUFFICIENT_DATA QA Contact: thradec
Severity: medium Docs Contact:
Priority: high    
Version: 2.1.0CC: kpiwko, myarboro, ppenicka
Target Milestone: ---   
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
The OSGi layer, which was present but disabled in JBoss Enterprise Application Platform 6.0.0, has been completely removed in JBoss Enterprise Application Platform 6.0.1 and later versions. Consequently, the Arquillian AS7 JMX protocol is not functional due to missing classes. To work around the issue, force Arquilllian to use the Servlet protocol instead by adding <defaultProtocol type="Servlet 3.0"/> under the <arquillian> element in the arquillian.xml file. Then add the following servlet dependency to your project's pom.xml file: <dependency> <groupId>org.jboss.arquillian.protocol</groupId> <artifactId>arquillian-protocol-servlet</artifactId> <scope>test</scope> </dependency>
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 18:31:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Piwko 2012-11-28 12:29:21 UTC
Description of problem:

If you are using Arquillian AS7.1.1 adaptor to connect/start an EAP 6.0.1 instance, after you apply workaround (bug #871413), you might get a following exception if you're using jmx-protocol, which is the default:

java.lang.NoClassDefFoundError: org/jboss/as/osgi/deployment/OSGiDeploymentAttachment
	at org.jboss.as.arquillian.service.ArquillianConfig.loadClass(ArquillianConfig.java:118)
	at org.jboss.as.arquillian.service.ArquillianService$ExtendedTestClassLoader.loadTestClass(ArquillianService.java:259)
	at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:125)
	at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:108)
	at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:226)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
	at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
	at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
	at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
	at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:498)
	at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:246)
	at org.jboss.remotingjmx.protocol.v1.ServerProxy$InvokeHandler.handle(ServerProxy.java:1034)
	at org.jboss.remotingjmx.protocol.v1.ServerProxy$MessageReciever$1.run(ServerProxy.java:215)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)


Version-Release number of selected component (if applicable):

Arquillian AS 7.1.1.Final + EAP 6.0.1

How reproducible:

Always.

Steps to Reproduce:
1. Have an arquillian tests using jmx protocol with EAP 6.0.1
  
Actual results:

It fails with an exception.

Expected results:

It works.

Additional info:

Works with Servlet protocol.

Comment 2 Karel Piwko 2013-02-19 09:28:24 UTC
Note: Workaround here does not work in case that you deploy RAR deployment. You need JMX protocol for that.

Comment 5 Karel Piwko 2013-03-05 13:38:14 UTC
Marek, can you remove JMX protocol from -with-tools BOM?

Comment 7 JBoss JIRA Server 2013-03-05 14:33:17 UTC
Pete Muir <pmuir.uk> made a comment on jira JDF-231

Karel, how do we do this? https://github.com/jboss-jdf/jboss-bom/blob/master/jboss-javaee-6.0-with-tools/pom.xml - it's not in the BOM, it's coming in transitively.

Comment 8 JBoss JIRA Server 2013-03-06 10:27:18 UTC
Karel Piwko <kpiwko> made a comment on jira JDF-231

After short research it seams that <exclusions> are not propagated from dependencyManagament neither if a BOM is imported or inherited.

So, if we want achieve that, we would need to remove JMX from both AS7 adaptor and ARQ BOM. This is out of scope of JDF. JDF can provide a documentation that JMX protocol should not be used at best effort. 

Note, this means we can't completely exclude neither in WFK.

Comment 9 JBoss JIRA Server 2013-03-06 12:03:50 UTC
Pete Muir <pmuir.uk> made a comment on jira JDF-231

Thanks for looking at this. We already use the servlet adaptor already but we've lost the comments about why we have to explicitly specify it.

Comment 10 Marek Novotny 2013-03-06 13:48:54 UTC
I won't remove the jmx protocol from jboss-javaee-6.0-with-tools BOM as it would pull different version anyway from dependency hierarchy.

Comment 15 Petr Penicka 2013-07-09 14:07:15 UTC
Edited doc text to explicitly say that newer EAP than 6.0.1 are affected too.

Comment 17 Rodney Russ 2013-08-01 18:31:49 UTC
Migrated to Jira

Comment 20 JBoss JIRA Server 2015-02-20 18:05:56 UTC
Rodney Russ <rruss> updated the status of jira WFK2-131 to Closed