Bug 1283249 - (6.4.z) Possible NPE on RA deployment during AS startup
Summary: (6.4.z) Possible NPE on RA deployment during AS startup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: jbossas
Version: 6.4.4
Hardware: All
OS: All
unspecified
low
Target Milestone: CR1
: EAP 6.4.17
Assignee: Radovan Netuka
QA Contact: Peter Mackay
URL:
Whiteboard:
Depends On:
Blocks: eap6417-payload
TreeView+ depends on / blocked
 
Reported: 2015-11-18 14:15 UTC by Michal P
Modified: 2017-09-06 13:37 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-09-06 13:37:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
proposed fix (1.08 KB, patch)
2015-11-18 14:29 UTC, Michal P
no flags Details | Diff

Description Michal P 2015-11-18 14:15:42 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Michal P 2015-11-18 14:26:38 UTC
Description of problem: during application server startup there is race condition between internal connector services which can end in NullPointerException:

15:19:59,963 ERROR [org.jboss.msc.service.fail] (ResourceAdapterDeploymentService Thread Pool -- 1) MSC000001: Failed to start service jboss.ra.deployment."X.rar:main_X-ra": org.jboss.msc.service.StartException in service jboss.ra.deployment."X.rar:main_X": JBAS010446: Failed to start RA deployment [X]
	at org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$1.run(AbstractResourceAdapterDeploymentService.java:279)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
	at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020051: Unable to start org.jboss.resource.adapter.jms.JmsResourceAdapter
	at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.startContext(AbstractResourceAdapterDeployer.java:360)
	at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2470)
	at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService$AS7RaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:185)
	at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:106)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.startContext(AbstractResourceAdapterDeployer.java:347)
	... 8 more


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

How reproducible: hard to reproduce since most of the times services start in correct order

Steps to Reproduce:
1. configure any RA
2. start application server

Actual results: sometimes NPE occurs.

Expected results: no NPE, as starts without ERRORs.

Additional info: proposed solution attached as diff. It fixes this bug occurance but I'm not sure it covers all cases.

Comment 2 Michal P 2015-11-18 14:29:35 UTC
Created attachment 1096104 [details]
proposed fix

Comment 3 Michal P 2015-11-18 15:27:25 UTC
Comment on attachment 1096104 [details]
proposed fix

Let me clarify. The patch fixes only requests for default context. I haven't investigated the case when raxml or iron jacamar descriptor requests non default context. In such a case possibly new dependency is needed - a dynamically created one.

Comment 4 Carlo de Wolf 2015-11-18 15:41:41 UTC
Hi Michal,

Thanks for the patch. I'm looking at WildFly and seeing a construct which should allow for differently named default contexts.

https://github.com/wildfly/wildfly/commit/5b1a2c51961dbf723a82dbb27a1cbbd68e756992#diff-f6120489a40c27419b57a24fa0994c8a

Be advised that we normally do not process Bugzilla's filed directly, without having an associated filing at the Customer Portal. [1]

I'll pass this BZ on to support and see how they wish to proceed.

[1] https://access.redhat.com/products/red-hat-jboss-enterprise-application-platform/support-information

Comment 8 Peter Mackay 2017-08-25 14:21:39 UTC
Verified with EAP 6.4.17.CP.CR4

Comment 9 Petr Penicka 2017-09-06 13:37:02 UTC
Released on 2017-09-05 as part of the EAP 6.4.17 release.


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