Philippe Marschall created JBJCA-941:
----------------------------------------
Summary: NPE in ResourceAdapter1516Impl for invalid RAR
Key: JBJCA-941
URL:
https://issues.jboss.org/browse/JBJCA-941
Project: IronJacamar
Issue Type: Bug
Components: Common
Affects Versions: 1.0.13.Final
Reporter: Philippe Marschall
Assignee: Jesper Pedersen
In case of an invalid RAR (JCA 1.6 but not adapter class) you get the following deployment
error in JBoss AS.
{code}
15:38:22,236 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed
to start service
jboss.deployment.subunit."sample-application-1.0.0-SNAPSHOT.ear"."sample-adapter-1.0.0-SNAPSHOT.rar".INSTALL:
org.jboss.msc.service.StartException in service
jboss.deployment.subunit."sample-application-1.0.0-SNAPSHOT.ear"."sample-adapter-1.0.0-SNAPSHOT.rar".INSTALL:
JBAS018733: Failed to process phase INSTALL of subdeployment
"sample-adapter-1.0.0-SNAPSHOT.rar" of deployment
"sample-application-1.0.0-SNAPSHOT.ear"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127)
[jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.8.0-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.8.0-ea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.8.0-ea]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
java.lang.NullPointerException
at
org.jboss.as.connector.deployers.ra.processors.ParsedRaDeploymentProcessor.deploy(ParsedRaDeploymentProcessor.java:185)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)
[jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
... 5 more
Caused by: java.lang.NullPointerException
at
org.jboss.jca.common.metadata.ra.common.ResourceAdapter1516Impl.validate(ResourceAdapter1516Impl.java:351)
at
org.jboss.jca.common.metadata.ra.common.ConnectorAbstractmpl.validate(ConnectorAbstractmpl.java:332)
at
org.jboss.as.connector.deployers.ra.processors.ParsedRaDeploymentProcessor.deploy(ParsedRaDeploymentProcessor.java:142)
... 6 more
{code}
It should be a {code}org.jboss.jca.common.api.validator.ValidateException{code} but ends
up being a {code}java.lang.NullPointerException{code}. The problem is that
{code}ResourceAdapter1516Impl#validate(){code} uses
{code}
this.resourceadapterClass == null
{code}
instead of
{code}
XsdString.isNull(this.resourceadapterClass)
{code}
like {code}#getResourceadapterClass(){code} or the constructor.
{code}
this.resourceadapterClass.getValue()
{code}
then returns {code}null{code} so
{code}
this.resourceadapterClass.getValue().trim()
{code}
throws a {code}NullPointerException{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira