From issues-return-25643-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Fri Feb 9 15:16:06 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id EB94A180654 for ; Fri, 9 Feb 2018 15:16:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DB880160C2E; Fri, 9 Feb 2018 14:16:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 06A8B160C4C for ; Fri, 9 Feb 2018 15:16:04 +0100 (CET) Received: (qmail 31836 invoked by uid 500); 9 Feb 2018 14:16:04 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 31827 invoked by uid 99); 9 Feb 2018 14:16:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2018 14:16:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C062EC00E0 for ; Fri, 9 Feb 2018 14:16:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tl_394UJoIIA for ; Fri, 9 Feb 2018 14:16:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C5BF95F27D for ; Fri, 9 Feb 2018 14:16:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F137EE0161 for ; Fri, 9 Feb 2018 14:16:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4BC74240F6 for ; Fri, 9 Feb 2018 14:16:00 +0000 (UTC) Date: Fri, 9 Feb 2018 14:16:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARTEMIS-1670) NPE was found in when dropping durable subscriptions from a topic MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ARTEMIS-1670?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 358443#comment-16358443 ]=20 ASF subversion and git services commented on ARTEMIS-1670: ---------------------------------------------------------- Commit 3e212c09db04e22c76d443bede5ac00a2c86ba6a in activemq-artemis's branc= h refs/heads/1.x from Lin Gao [ https://git-wip-us.apache.org/repos/asf?p=3Dactivemq-artemis.git;h=3D3e21= 2c0 ] [ARTEMIS-1670] NPE was found in when dropping durable subscriptions from a = topic > NPE was found in when dropping durable subscriptions from a topic > ----------------------------------------------------------------- > > Key: ARTEMIS-1670 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1670 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: Broker > Affects Versions: 1.5.5 > Reporter: Lin Gao > Priority: Major > Fix For: 1.5.6 > > > In WildFly, set up a topic by executing following CLI: > {code:java} > /subsystem=3Dmessaging-activemq/server=3Ddefault:write-attribute(name=3Ds= ecurity-enabled,value=3Dfalse) > :reload > /subsystem=3Dmessaging-activemq/server=3Ddefault/jms-topic=3DtestTopic:ad= d(entries=3D[java:/jms/topic/testTopic, java:jboss/exported/jms/topic/testT= opic]) > {code} > Then create a durable subscriber on it using the following test code: > =C2=A0 > {code:java} > public static void main(String[] args) throws Exception { > =09Connection connection =3D null; > Context namingContext =3D null; > try { > final Properties env =3D new Properties(); > env.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.= client.WildFlyInitialContextFactory"); > env.put(Context.PROVIDER_URL, System.getProperty(Context.PROV= IDER_URL, "http-remoting://127.0.0.1:8080")); > namingContext =3D new InitialContext(env); > Topic topic =3D (Topic) namingContext.lookup("/jms/topic/test= Topic"); > ConnectionFactory connectionFactory =3D (ConnectionFactory) n= amingContext.lookup("jms/RemoteConnectionFactory"); > connection =3D connectionFactory.createConnection(); > connection.setClientID("durable-client"); > connection.start(); > Session session =3D connection.createSession(false, Session.A= UTO_ACKNOWLEDGE); > MessageProducer messageProducer =3D session.createProducer(to= pic); > TopicSubscriber subscriber =3D session.createDurableSubscribe= r(topic, "subscriber-1"); > TextMessage message1 =3D session.createTextMessage("This is a= text message 1"); > messageProducer.send(message1); > System.out.println("Sent message: " + message1.getText()); > TextMessage messageReceived =3D (TextMessage) subscriber.rece= ive(); > System.out.println("Received message: " + messageReceived.get= Text()); > try { > =09=09=09=09Thread.sleep(20000); // wait 20 seconds before un-subscribe > =09=09=09} catch (InterruptedException e) { > =09=09=09=09e.printStackTrace(); > =09=09=09} > subscriber.close(); > session.unsubscribe("subscriber-1"); > } finally { > =09=09=09if (connection !=3D null) { > =09=09=09=09connection.close(); > =09=09=09} > if (namingContext !=3D null) { > =09namingContext.close(); > } > } > } > {code} > =C2=A0 > The code above will sleep 20 seconds before un-subscribe, try to execute= the following WildFly CLI within 20 seconds: > {code:java} > /subsystem=3Dmessaging-activemq/server=3Ddefault/jms-topic=3DtestTopic:dr= op-durable-subscription(client-id=3Ddurable-client, subscription-name=3Dsub= scriber-1) > {code} > =C2=A0 > The WildFly CLI succeeded, but there is a NPE in the server log: > {code:java} > 09:10:42,340 ERROR [org.apache.activemq.artemis.core.server] (Thread-3 (A= ctiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerI= mpl$3@7ba46694)) AMQ224065: Failed to remove auto-created queue testSubscri= berClientIdjmsTopicOperations.testSubscriber: java.lang.NullPointerExceptio= n > =09at org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl$JM= SQueueDeleter.delete(JMSServerManagerImpl.java:1669) [artemis-jms-server-1.= 5.5.008-redhat-1.jar:1.5.5.008-redhat-1] > =09at org.apache.activemq.artemis.core.server.impl.AutoCreatedQueueManage= rImpl$1.run(AutoCreatedQueueManagerImpl.java:36) [artemis-server-1.5.5.008-= redhat-1.jar:1.5.5.008-redhat-1] > =09at org.apache.activemq.artemis.utils.ReferenceCounterUtil.decrement(Re= ferenceCounterUtil.java:54) [artemis-commons-1.5.5.008-redhat-1.jar:1.5.5.0= 08-redhat-1] > =09at org.apache.activemq.artemis.core.server.impl.AutoCreatedQueueManage= rImpl.decrement(AutoCreatedQueueManagerImpl.java:58) [artemis-server-1.5.5.= 008-redhat-1.jar:1.5.5.008-redhat-1] > =09at org.apache.activemq.artemis.core.server.impl.QueueImpl.removeConsum= er(QueueImpl.java:786) [artemis-server-1.5.5.008-redhat-1.jar:1.5.5.008-red= hat-1] > =09at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.rem= oveItself(ServerConsumerImpl.java:496) [artemis-server-1.5.5.008-redhat-1.j= ar:1.5.5.008-redhat-1] > =09at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.clo= se(ServerConsumerImpl.java:443) [artemis-server-1.5.5.008-redhat-1.jar:1.5.= 5.008-redhat-1] > =09at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.clos= eConsumer(ServerSessionImpl.java:1174) [artemis-server-1.5.5.008-redhat-1.j= ar:1.5.5.008-redhat-1] > =09at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketH= andler.internalHandlePacket(ServerSessionPacketHandler.java:445) [artemis-s= erver-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1] > =09at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketH= andler.lambda$handlePacket$0(ServerSessionPacketHandler.java:211) [artemis-= server-1.5.5.008-redhat-1.jar:1.5.5.008-redhat-1] > =09at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExe= cutor$ExecutorTask.run(OrderedExecutorFactory.java:122) [artemis-commons-1.= 5.5.008-redhat-1.jar:1.5.5.008-redhat-1] > =09at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto= r.java:1149) [rt.jar:1.8.0_151] > =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut= or.java:624) [rt.jar:1.8.0_151] > =09at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151] > {code} > Despite this error, *subscription is removed* and listing of all subscrip= tions is now empty. Operation works as expected, however there is an Error = logged on server side. -- This message was sent by Atlassian JIRA (v7.6.3#76005)