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

Bug 1191485

Summary: SarMXPojoHelloWorld mbean not present in JConsole when helloworld-mbean QS deployed using JBDS
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Nikoleta Hlavickova <nziakova>
Component: QuickstartsAssignee: jboss-set
Status: CLOSED CURRENTRELEASE QA Contact: Nikoleta Hlavickova <nziakova>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: bsutter, fbricon, jkudrnac, manderse, nziakova
Target Milestone: ER3Flags: fbricon: needinfo+
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:40:50 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 Nikoleta Hlavickova 2015-02-11 11:37:45 UTC
When helloorld-mbean quickstart is deployed using JBDS, there are only 3 mbeans in JConsole, not 4 as when deployed using Maven:

* AnnotatedComponentHelloWorld
* MXComponentHelloWorld
* MXPojoHelloWorld

There are no further instructions how to deploy the quickstart using JBDS. I tried Run on Server on jboss-helloworld-mbean-helloworld-mbean-webapp because this is the only one with that option.

Comment 1 sgilda 2015-02-13 18:32:03 UTC
In JBDS, you can only deploy the helloworld-mbean-webapp project, which contains the 3 beans that display. You can not deploy the helloworld-mbean-service project which contains the SarMXPojoHelloWorld bean. This is why it doesn't appear. 

I need to look at the packaging for this quickstart to see how to work around this.

Comment 2 Fred Bricon 2015-02-13 18:34:53 UTC
Only war,ear and ejb type projects can be deployed on a JBoss server using Run As > Run on Server

Comment 3 Fred Bricon 2015-02-13 18:38:28 UTC
I see helloworld-mbean-service is a jboss-sar type https://github.com/jboss-developer/jboss-eap-quickstarts/blob/6.4.x-develop/helloworld-mbean/helloworld-mbean-service/pom.xml#L27

There's a sar project configurator for m2e that adds the Sar Facet that should make it deployable. I need to investigate what happens.

Comment 4 Fred Bricon 2015-02-13 18:42:38 UTC
Please open a ticket in JIRA

also try installing the JBoss Tools Maven Packaging configurator from JBoss Central>Software/Updates. Then update the Maven project configuration.

Chances are I need to add that configurator to the M2e discovery catalog

Comment 5 sgilda 2015-02-13 20:22:55 UTC
Created this JIRA: https://issues.jboss.org/browse/JBIDE-19265.

I now see 'Run As` --> `Run on Server` for the service, but I get differing results. It's not clear that I am deploying it correctly.

This is what I'm doing:

1. Right-click on the `helloworld-mbean-helloworld-mbean-service` project and choose `Run As` --> `Run on Server`. 
2. Right-click on the `helloworld-mbean-helloworld-mbean-webapp` project and choose `Run As` --> `Run on Server`. 
3. Start JConsole and test.

The first time I did this, I only saw the SarMXPojoHelloworld bean. I started with a fresh server and now I see nothing. I don't see any log messages in the console when I deploy either archive.

Comment 6 sgilda 2015-02-13 20:48:14 UTC
Fred, I can now do the `Run As` --> `Run on Server` for the service, but I can't figure out how to get this to deploy all the MBeans. 

Now, deployment of the SAR seem to work and I see the SarMXPojoHelloWorld MBean.
Deployment of the WAR no longer deploys the other 3 MBeans.

Comment 7 sgilda 2015-02-13 22:53:20 UTC
I tried this with a new workspace and it worked.

Updated the instructions in this commit:
https://github.com/jboss-developer/jboss-eap-quickstarts/commit/78f1b070aa746cdccff029bb754823ad39ee07ba

Comment 8 Nikoleta Hlavickova 2015-02-27 09:45:48 UTC
Just a minor issue:
An EAP server must be added before step "Right-click on the helloworld-mbean-helloworld-mbean-service project and choose Run As –> Run on Server. " can be performed.

The rest works fine, thank you.

Comment 9 sgilda 2015-02-27 14:06:50 UTC
Nikoleta, I don't believe I specify that step in any of the README file. Instead, I point them to the the shared JBDS page [1] for the common instructions and only provided details where it varies. I don't want to repeat those common instructions over and over. That's the purpose of the shard page.

Can you please confirm?



[1] https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_JBDS.md#use-jboss-developer-studio-or-eclipse-to-run-the-quickstarts

Comment 16 sgilda 2015-03-04 15:59:26 UTC
Nikoleta, since this change impacts all the quickstart README files, I propose we leave this one to ON_QA and create a new bug to track the changes to the JBDS instructions. Does that work for you?