[ https://issues.apache.org/jira/browse/ARTEMIS-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15257683#comment-15257683 ]
Bartosz Baranowski commented on ARTEMIS-459: -------------------------------------------- IIRc https://github.com/apache/activemq-artemis/blob/master/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java#L115 is null. at org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.teardown(ActiveMQActivation.java:388) at org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.stop(ActiveMQActivation.java:293) at org.apache.activemq.artemis.ra.ActiveMQResourceAdapter.endpointDeactivation(ActiveMQResourceAdapter.java:195) at org.jboss.jca.core.rar.EndpointImpl.deactivate(EndpointImpl.java:255) at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.deactivate(MessageDrivenComponent.java:278) at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.access$100(MessageDrivenComponent.java:63) at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent$1.preSuspend(MessageDrivenComponent.java:92) at org.jboss.as.server.suspend.SuspendController.suspend(SuspendController.java:72) at org.jboss.as.server.operations.ServerShutdownHandler$1$1.handleResult(ServerShutdownHandler.java:144) at org.jboss.as.controller.AbstractOperationContext$Step.invokeResultHandler(AbstractOperationContext.java:1384) at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1366) at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1328) at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1301) at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1185) at org.jboss.as.controller.AbstractOperationContext.executeResultHandlerPhase(AbstractOperationContext.java:767) at org.jboss.as.controller.AbstractOperationContext.executeDoneStage(AbstractOperationContext.java:753) at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:680) at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370) at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1344) at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:392) at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:217) at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:208) at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:130) at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:152) at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:148) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92) at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:148) at org.jboss.as.protocol.mgmt.AbstractMessageHandler$ManagementRequestContextImpl$1.doExecute(AbstractMessageHandler.java:363) at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:472) 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:320) > ActiveMQActivation start/shutdown sequence may cause NPE > -------------------------------------------------------- > > Key: ARTEMIS-459 > URL: https://issues.apache.org/jira/browse/ARTEMIS-459 > Project: ActiveMQ Artemis > Issue Type: Bug > Affects Versions: 1.1.0 > Reporter: Bartosz Baranowski > Assignee: Justin Bertram > Attachments: ARTEMIS-459.patch > > > It is possible to trigger NPE with resource activation. > If MDB is deployed without proper queue, AMQ dumps: > {quote} > 15:12:22,474 INFO [org.apache.activemq.artemis.ra] (default-threads - 6) > AMQ151000: awaiting topic/queue creation queue/HELLOWORLDMDBQueue123 > 15:12:24,480 INFO [org.apache.activemq.artemis.ra] (default-threads - 6) > AMQ151001: Attempting to reconnect > org.apache.activemq.artemis.ra.inflow.ActiveMQActiv > ationSpec(ra=org.apache.activemq.artemis.ra.ActiveMQResourceAdapter@78712571 > destination=queue/HELLOWORLDMDBQueue123 destinationType=javax.jms.Queue > ack=Auto-ac > knowledge durable=false clientID=null user=null maxSession=15) > {quote} > and starts retry cycle - in which it set up everything and than calls > "teardown" on connection failure(iirc). > If some other entity call "teardown" it will cause NPE, since instance > variables are not initialized due to previous teardown call from retry > section: > {quote} > ava.lang.NullPointerException > at > org.jboss.as.server.suspend.SuspendController.suspend(SuspendController.java:72) > at > org.jboss.as.server.operations.ServerSuspendHandler$1.execute(ServerSuspendHandler.java:117) > at > org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890) > at > org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659) > at > org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370) > at > org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1344) > at > org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:392) > at > org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:217) > at > org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:208) > at > org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:130) > at > org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:152) > at > org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:148) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92) > at > org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:148) > at > org.jboss.as.protocol.mgmt.AbstractMessageHandler$ManagementRequestContextImpl$1.doExecute(AbstractMessageHandler.java:363) > at > org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:472) > 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:320) > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)