Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F86510CF0 for ; Thu, 2 May 2013 13:00:17 +0000 (UTC) Received: (qmail 34306 invoked by uid 500); 2 May 2013 13:00:17 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 34012 invoked by uid 500); 2 May 2013 13:00:17 -0000 Mailing-List: contact dev-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 dev@activemq.apache.org Received: (qmail 33990 invoked by uid 99); 2 May 2013 13:00:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2013 13:00:16 +0000 Date: Thu, 2 May 2013 13:00:16 +0000 (UTC) From: =?utf-8?Q?Thomas_G=C3=BCnter_=28JIRA=29?= To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQ-4507) FailoverTransport throws NullPointerException 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/AMQ-4507?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas G=C3=BCnter updated AMQ-4507: ------------------------------- Description:=20 The Failovertransport throws NullPointer Exceptions in case of a failover t= o another primary host for the following broker url: {{failover:(tcp://primary_1:61616,tcp://primary_2:61616,tcp://secondary_1:6= 1616,tcp://secondary_2:61616)?randomize=3Dfalse&priorityBackup=3Dtrue&prior= ityURIs=3Dtcp://primary_1:61616,tcp://primary_2:61616&jms.alwaysSyncSend=3D= true}} Stack trace: Exception in thread "ActiveMQ Task-2" java.lang.NullPointerException =09at org.apache.activemq.transport.failover.FailoverTransport.disposeTrans= port(FailoverTransport.java:231) =09at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(= FailoverTransport.java:954) =09at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(Fa= iloverTransport.java:143) =09at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.= java:129) =09at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.ja= va:47) =09at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.= java:1110) =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor= .java:603) =09at java.lang.Thread.run(Thread.java:722) I assume that this is a copy-paste bug, since in the current revision (1478= 184, see link below) of the FailoverTransport on line #966, the variable 'o= ld' should be checked for null instead of 'transport'. However, I have no c= lue why 'old' is null even though the transport was handling messages befor= e the failover. [http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/java/= org/apache/activemq/transport/failover/FailoverTransport.java?revision=3D14= 78184&view=3Dmarkup] Current code: 955 Transport old =3D this.connectedTransport.getAndSet(null); 966 if (transport !=3D null) \{ 967 disposeTransport(old); 968 \} Corrected code: 955 Transport old =3D this.connectedTransport.getAndSet(null); 966 if (old!=3D null) \{ 967 disposeTransport(old); 968 \} was: The Failovertransport throws NullPointer Exceptions in case of a failover t= o another primary host for the following broker url: failover:(tcp://primary_1:61616,tcp://primary_2:61616,tcp://secondary_1:616= 16,tcp://secondary_2:61616)?randomize=3Dfalse&priorityBackup=3Dtrue&priorit= yURIs=3Dtcp://primary_1:61616,tcp://primary_2:61616&jms.alwaysSyncSend=3Dtr= ue Stack trace: Exception in thread "ActiveMQ Task-2" java.lang.NullPointerException =09at org.apache.activemq.transport.failover.FailoverTransport.disposeTrans= port(FailoverTransport.java:231) =09at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(= FailoverTransport.java:954) =09at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(Fa= iloverTransport.java:143) =09at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.= java:129) =09at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.ja= va:47) =09at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.= java:1110) =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor= .java:603) =09at java.lang.Thread.run(Thread.java:722) I assume that this is a copy-paste bug, since in the current revision (1478= 184, see link below) of the FailoverTransport on line #966, the variable 'o= ld' should be checked for null instead of 'transport'. However, I have no c= lue why 'old' is null even though the transport was handling messages befor= e the failover. http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/java/o= rg/apache/activemq/transport/failover/FailoverTransport.java?revision=3D147= 8184&view=3Dmarkup Current code: 955 Transport old =3D this.connectedTransport.getAndSet(null); 966 if (transport !=3D null) { 967 disposeTransport(old); 968 } Corrected code: 955 Transport old =3D this.connectedTransport.getAndSet(null); 966 if (old!=3D null) { 967 disposeTransport(old); 968 } Patch Info: (was: Patch Available) =20 > FailoverTransport throws NullPointerException > --------------------------------------------- > > Key: AMQ-4507 > URL: https://issues.apache.org/jira/browse/AMQ-4507 > Project: ActiveMQ > Issue Type: Bug > Components: Transport > Affects Versions: 5.8.0 > Environment: Win 7, java 7 > Reporter: Thomas G=C3=BCnter > Priority: Minor > Labels: patch > > The Failovertransport throws NullPointer Exceptions in case of a failover= to another primary host for the following broker url: > {{failover:(tcp://primary_1:61616,tcp://primary_2:61616,tcp://secondary_1= :61616,tcp://secondary_2:61616)?randomize=3Dfalse&priorityBackup=3Dtrue&pri= orityURIs=3Dtcp://primary_1:61616,tcp://primary_2:61616&jms.alwaysSyncSend= =3Dtrue}} > Stack trace: > Exception in thread "ActiveMQ Task-2" java.lang.NullPointerException > =09at org.apache.activemq.transport.failover.FailoverTransport.disposeTra= nsport(FailoverTransport.java:231) > =09at org.apache.activemq.transport.failover.FailoverTransport.doReconnec= t(FailoverTransport.java:954) > =09at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(= FailoverTransport.java:143) > =09at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunne= r.java:129) > =09at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.= java:47) > =09at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto= r.java:1110) > =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut= or.java:603) > =09at java.lang.Thread.run(Thread.java:722) > I assume that this is a copy-paste bug, since in the current revision (14= 78184, see link below) of the FailoverTransport on line #966, the variable = 'old' should be checked for null instead of 'transport'. However, I have no= clue why 'old' is null even though the transport was handling messages bef= ore the failover. > [http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/jav= a/org/apache/activemq/transport/failover/FailoverTransport.java?revision=3D= 1478184&view=3Dmarkup] > Current code: > 955 Transport old =3D this.connectedTransport.getAndSet(null); > 966 if (transport !=3D null) \{ > 967 disposeTransport(old); > 968 \} > Corrected code: > 955 Transport old =3D this.connectedTransport.getAndSet(null); > 966 if (old!=3D null) \{ > 967 disposeTransport(old); > 968 \} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira