Bug 648776 - JON241: AS plugin: NPE after ConcurrentModificationException in ManagementViewImpl.getDeploymentNamesForType
Summary: JON241: AS plugin: NPE after ConcurrentModificationException in ManagementVie...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 1.3.1
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Filip Drabek
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: jon241-bugs
TreeView+ depends on / blocked
 
Reported: 2010-11-02 04:42 UTC by Charles Crouch
Modified: 2015-02-01 23:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 590953
Environment:
Last Closed: 2011-05-24 01:10:21 UTC
Embargoed:


Attachments (Terms of Use)
screenshot (21.36 KB, image/png)
2010-11-10 09:41 UTC, Rajan Timaniya
no flags Details
Error stack trace on UI (98.85 KB, image/png)
2010-11-10 09:42 UTC, Rajan Timaniya
no flags Details
server log (1.51 MB, application/octet-stream)
2010-11-10 09:42 UTC, Rajan Timaniya
no flags Details
Server log (437.43 KB, text/x-log)
2010-12-20 11:53 UTC, Rajan Timaniya
no flags Details
test ear (jboss-seam-booking.ear) (7.40 MB, application/octet-stream)
2010-12-20 16:08 UTC, Rajan Timaniya
no flags Details
EAR deploy failure error (14.63 KB, text/x-log)
2010-12-22 09:03 UTC, Rajan Timaniya
no flags Details
screenshot (128.14 KB, image/png)
2010-12-22 09:07 UTC, Rajan Timaniya
no flags Details

Description Charles Crouch 2010-11-02 04:42:38 UTC
+++ This bug was initially created as a clone of Bug #590953 +++

See the stacktrace bellow and https://jira.jboss.org/jira/browse/JBPROFILE-6.

From the nature of the bug, it's not easy to reproduce, but this is how it happened:
1) Start the default profile
2) Log in to the AS console
3) Deploy some Ear with embedded war
4) When AS console page is rendering (and RHQ is scanning the ProfileService), this CMEx occurs.



05:26:29,016 ERROR [StandaloneManagedDeploymentDiscoveryComponent] Unable to get deployment for type ejb2x
java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
        at java.util.HashMap$ValueIterator.next(HashMap.java:822)
        at org.jboss.profileservice.management.ManagementViewImpl.getDeploymentNamesForType(ManagementViewImpl.java:1104)
        at org.rhq.plugins.jbossas5.AbstractManagedDeploymentDiscoveryComponent.discoverResources(AbstractManagedDeploymentDiscoveryComponent.java:69)
        at sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:266)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        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:619)
05:26:29,017 WARN [InventoryManager] Failure during discovery for [EJB2 JAR] Resources - failed after 2809 ms.
java.lang.Exception: Discovery component invocation failed.
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:270)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        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:619)
Caused by: java.lang.NullPointerException
        at org.rhq.plugins.jbossas5.AbstractManagedDeploymentDiscoveryComponent.discoverResources(AbstractManagedDeploymentDiscoveryComponent.java:76)
        at sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:266)
        ... 5 more

--- Additional comment from ccrouch on 2010-05-19 16:47:36 EDT ---

Ozizka
We need to get to the bottom of the java.util.ConcurrentModificationException
 from AS, please raise a JBAS jira for this and assign to Scott.

Thanks
Charles

--- Additional comment from ian.springer on 2010-07-30 11:56:44 EDT ---

The NPE has been fixed in RHQ w/ commit f5bf932 which has been pushed to the release-3.0.0 branch. A JBAS JIRA still needs to be opened for the underlying CME.

--- Additional comment from ozizka on 2010-07-30 12:40:16 EDT ---

Done:  https://jira.jboss.org/browse/JBAS-8271

--- Additional comment from ozizka on 2010-09-27 14:36:14 EDT ---

So far, no work done on JBAS-8271.

Comment 1 Charles Crouch 2010-11-02 04:43:49 UTC
Tracking bug for fix going into JON2.4.1

Comment 2 Charles Crouch 2010-11-02 04:52:56 UTC
Remove jon24-eap blocker since this was fixed after JON2.4 was out. 

From a JON perspective we just need to test that 
1) Start the default profile
2) Log in to the JON  console
3) Deploy some Ear with embedded war
still works and no exceptions are observed. 

ozizka can confirm whether this is fixed in embedded console deployments based off of the RHQ3 branch

Comment 3 Charles Crouch 2010-11-10 00:49:03 UTC
Ondrej can you test the NPE no longer appears in the EAP5.1 console and we'll test that it is not a problem with the same steps from the JON side

Comment 4 Rajan Timaniya 2010-11-10 09:39:11 UTC
Tested on RHQ-Rel 3.0.1 (build #422)

Observation:
Deploy ear with embedded war gives InstantiationException on UI and server log.

2010-11-10 13:18:00,259 INFO  [org.rhq.enterprise.gui.common.upload.FileUploadUIBean] A file named [rhq.ear.ear] with a size of [118758990] has been uploaded to [/tmp/61efe933-12c34794330--525e5669628785717061295.upload]
2010-11-10 13:18:01,196 ERROR [org.rhq.enterprise.gui.common.error.GenericErrorUIBean] Error processing user request
org.jboss.seam.InstantiationException: Could not instantiate Seam component: ResourceUIBean
	at org.jboss.seam.Component.newInstance(Component.java:2096)
	at org.jboss.seam.Component.getInstance(Component.java:1978)
	at org.jboss.seam.Component.getInstance(Component.java:1940)
	at org.jboss.seam.Component.getInstance(Component.java:1934)
	at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
	at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
	at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
	at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
        . . .

Please refer attachment for screenshot and server log.

Comment 5 Rajan Timaniya 2010-11-10 09:41:06 UTC
Created attachment 459380 [details]
screenshot

Comment 6 Rajan Timaniya 2010-11-10 09:42:02 UTC
Created attachment 459382 [details]
Error stack trace on UI

Comment 7 Rajan Timaniya 2010-11-10 09:42:35 UTC
Created attachment 459383 [details]
server log

Comment 8 Ondřej Žižka 2010-11-11 11:58:17 UTC
Does not happen in EAP 5.1.0 Admin Console.

Comment 9 Charles Crouch 2010-12-02 01:39:28 UTC
Lukas
So this issue appears to have been addressed in the embedded console. But Rajan seems to have found a new problem in JON241, can you investigate and try to reproduce.

Comment 10 Lukas Krejci 2010-12-17 13:17:33 UTC
I could not reproduce this (with jboss-seam-jee5-booking.ear deployed to EAP 5.1.0)

Comment 11 Charles Crouch 2010-12-17 15:22:32 UTC
Pushing back to QE as could not reproduce.

Comment 12 Rajan Timaniya 2010-12-20 11:52:48 UTC
Tested on JON-2.4.1 build #47 (build number: 10963:e45ddc8)

Steps:
1) Installed JON-241
2) Discover JBoss-EAP-5.1
3) Goto inventory of JBoss-EAP-5.1 and create new EAR
4) Upload ear with embedded war (jboss-seam-booking.ear)
5) Observe server log and JON UI

Observation:
Deploy ear with embedded war gives InstantiationException on UI and server log.

Exception:
2010-12-20 17:01:13,841 INFO  [org.rhq.enterprise.gui.common.upload.FileUploadUIBean] A file named [jboss-seam-booking.war] with a size of [6061503] has been uploaded to [/tmp/24b7f34f-12d02a62e62--125e8511837515861487016.upload]
2010-12-20 17:01:14,594 ERROR [org.rhq.enterprise.gui.common.error.GenericErrorUIBean] Error processing user request
org.jboss.seam.InstantiationException: Could not instantiate Seam component: ResourceUIBean
	at org.jboss.seam.Component.newInstance(Component.java:2170)
	at org.jboss.seam.Component.getInstance(Component.java:2024)
	at org.jboss.seam.Component.getInstance(Component.java:1986)
	at org.jboss.seam.Component.getInstance(Component.java:1980)
         . . .
Caused by: java.lang.IllegalStateException: Required request parameter 'id' is missing.
	at org.rhq.core.gui.util.FacesContextUtility.getRequiredRequestParameter(FacesContextUtility.java:106)
	at org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility.getResource(EnterpriseFacesContextUtility.java:75)
	at org.rhq.enterprise.gui.inventory.resource.ResourceUIBean.<init>(ResourceUIBean.java:100)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)


Please refer attached server log.

Comment 13 Rajan Timaniya 2010-12-20 11:53:28 UTC
Created attachment 469735 [details]
Server log

Comment 14 Charles Crouch 2010-12-20 15:50:23 UTC
Rajan, can you attach the .ear file you are using to test with to this bug so we can make sure we're using the same thing

Comment 15 Rajan Timaniya 2010-12-20 16:08:17 UTC
Created attachment 469803 [details]
test ear (jboss-seam-booking.ear)

Comment 16 Filip Drabek 2010-12-21 20:02:48 UTC
Which browser was used for testing? Was it supported browser? Upload of files to RHQ server is not working in Chrome browser, it throws exception "java.lang.IllegalStateException: Required request parameter 'id' is missing."

Comment 17 Rajan Timaniya 2010-12-22 09:01:22 UTC
Tested on JON-2.4.1 build #55 (build number: 10970:3cea406)

Test environment:
RHEL 5.4
Postgres 8.4
IE-8 and Mozilla-3.6.3

Steps:
1) Installed JON-241
2) Discover JBoss-EAP-5.1
3) Goto inventory of JBoss-EAP-5.1 and create new EAR
4) Upload ear with embedded war (jboss-seam-booking.ear)
5) Observe server log and JON UI

Observation:
EAR deployment failed and click on 'Failure' it gives failure error message in pop-up.

Note: Tested on IE-8 and Mozilla-3.6.3 browsers, both have same EAR deployment failure.

Failure error (please refer attached file for complete failure error):
java.lang.Exception:Failed to start deployment [vfszip:/data/package/jboss-eap-5.1/jboss-as/server/default/deploy/jboss-seam-booking.ear/] during deployment of 'jboss-seam-booking.ear' - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=AuthenticatorAction,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=AuthenticatorAction,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=jboss-seam-booking.ear/jboss-seam-booking.jar#bookingDatabase' **")
  Deployment "jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=AuthenticatorAction,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=AuthenticatorAction,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
...

Server log:
2010-12-22 13:48:56,451 INFO  [org.rhq.enterprise.gui.common.upload.FileUploadUIBean] A file named [C:\Users\Administrator\Desktop\jboss-seam-booking.ear] with a size of [7758345] has been uploaded to [/tmp/6e9d50ca-12d0ce44dda--39bd2238560141306330135.upload]
2010-12-22 13:48:58,224 WARN  [org.jboss.seam.ui.renderkit.DefaultActionRendererBase] Must set an id for the default action source
2010-12-22 13:49:11,635 INFO  [org.rhq.enterprise.server.scheduler.jobs.AsyncResourceDeleteJob] Async resource deletion - 79 successful, 0 failed, took [4145] ms
2010-12-22 13:49:32,550 INFO  [org.rhq.enterprise.server.resource.ResourceFactoryManagerBean] Received call to create package backed resource under parent [10781]
2010-12-22 13:50:04,444 INFO  [org.rhq.enterprise.server.resource.ResourceFactoryServerServiceImpl] Received create resource response: CreateResourceResponse[RequestId=10021, Status=Failure]
2010-12-22 13:52:50,744 INFO  [org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl] Processed AV:[10.65.193.1][673][full] - need full=[false] in (179)ms

Comment 18 Rajan Timaniya 2010-12-22 09:03:30 UTC
Created attachment 470154 [details]
EAR deploy failure error

Comment 19 Rajan Timaniya 2010-12-22 09:07:43 UTC
Created attachment 470157 [details]
screenshot

Comment 20 Rajan Timaniya 2010-12-22 09:59:34 UTC
Verified on JON-2.4.1 build #55 (build number: 10970:3cea406)

Looks like there is some issue with jboss-seam-booking.ear, it also give exception in manual deployment.

Build new EAR - jboss-seam-itext.ear and tested with it on IE-8 and FF-3.6.3. JON deployed EAR successfully, there isn't any failure/exception found.

Comment 21 Corey Welton 2011-05-24 01:10:21 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 22 Corey Welton 2011-05-24 01:10:41 UTC
Bookkeeping - closing bug - fixed in recent release.


Note You need to log in before you can comment on or make changes to this bug.