[jira] [Commented] (QPID-3760) Unable to use address strings with java client due to NPE

2013-05-13 Thread Pavel Moravec (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13656830#comment-13656830
 ] 

Pavel Moravec commented on QPID-3760:
-

This is a duplicate of https://issues.apache.org/jira/browse/QPID-3769, fixed 
in 0.22.

> Unable to use address strings with java client due to NPE
> -
>
> Key: QPID-3760
> URL: https://issues.apache.org/jira/browse/QPID-3760
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Client
>Affects Versions: 0.10
>Reporter: Sergey Zhemzhitsky
>  Labels: addressing
>
> Stacktrace:
> {code}
> Exception in thread "Thread-5" java.lang.NullPointerException
>   at org.apache.qpid.client.AMQDestination.equals(AMQDestination.java:577)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.destinationEquals(CachingConnectionFactory.java:467)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.equals(CachingConnectionFactory.java:474)
>   at java.util.HashMap.get(HashMap.java:385)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.getCachedProducer(CachingConnectionFactory.java:353)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:320)
>   at $Proxy1.createProducer(Unknown Source)
> {code}
> Exception happens for the following address:
> {code}
> JbenchQueue;{create: always, node: {type:queue}}
> {code}
> It seems the qpid java client tries to obtain exchangeClass property in 
> AMQDestination.equals method, but this property is not set when using address 
> strings.

--
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

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3760) Unable to use address strings with java client due to NPE

2012-08-20 Thread Azim Fatehi (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438229#comment-13438229
 ] 

Azim Fatehi commented on QPID-3760:
---

This bug renders it very difficult to use Apache Camel, as address strings and 
the spring CachingConnectionFactory are a must. Following the style of the 
existing _queueName check, I tried the patch which I've pasted below. I don't 
have any answer to Lar's comment about null versus "" strings, but this patch 
seems to work for me.

--- 
/original/qpid-0.16/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java
2012-01-29 10:38:29.0 -0600
+++ 
/modified/qpid-0.16/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java
2012-08-16 15:29:27.329126287 -0500
@@ -600,11 +600,13 @@
 
 final AMQDestination that = (AMQDestination) o;
 
-if (!_exchangeClass.equals(that._exchangeClass))
+if ((_exchangeClass == null && that._exchangeClass != null) ||
+(_exchangeClass != null && 
!_exchangeClass.equals(that._exchangeClass)))
 {
 return false;
 }
-if (!_exchangeName.equals(that._exchangeName))
+if ((_exchangeName == null && that._exchangeName != null) ||
+(_exchangeName != null && 
!_exchangeName.equals(that._exchangeName)))
 {
 return false;
 }


> Unable to use address strings with java client due to NPE
> -
>
> Key: QPID-3760
> URL: https://issues.apache.org/jira/browse/QPID-3760
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Client
>Affects Versions: 0.10
>Reporter: Sergey Zhemzhitsky
>  Labels: addressing
>
> Stacktrace:
> {code}
> Exception in thread "Thread-5" java.lang.NullPointerException
>   at org.apache.qpid.client.AMQDestination.equals(AMQDestination.java:577)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.destinationEquals(CachingConnectionFactory.java:467)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.equals(CachingConnectionFactory.java:474)
>   at java.util.HashMap.get(HashMap.java:385)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.getCachedProducer(CachingConnectionFactory.java:353)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:320)
>   at $Proxy1.createProducer(Unknown Source)
> {code}
> Exception happens for the following address:
> {code}
> JbenchQueue;{create: always, node: {type:queue}}
> {code}
> It seems the qpid java client tries to obtain exchangeClass property in 
> AMQDestination.equals method, but this property is not set when using address 
> strings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3760) Unable to use address strings with java client due to NPE

2012-08-09 Thread Lars-Erik Helander (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432134#comment-13432134
 ] 

Lars-Erik Helander commented on QPID-3760:
--

I have seen cases where one is null and the other is a zero-sized string. I am 
not sure if they should be regarded as equal or not (I do not know enough about 
qpid internals in order know the proper semantics of the equals() function).

> Unable to use address strings with java client due to NPE
> -
>
> Key: QPID-3760
> URL: https://issues.apache.org/jira/browse/QPID-3760
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Client
>Affects Versions: 0.10
>Reporter: Sergey Zhemzhitsky
>  Labels: addressing
>
> Stacktrace:
> {code}
> Exception in thread "Thread-5" java.lang.NullPointerException
>   at org.apache.qpid.client.AMQDestination.equals(AMQDestination.java:577)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.destinationEquals(CachingConnectionFactory.java:467)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.equals(CachingConnectionFactory.java:474)
>   at java.util.HashMap.get(HashMap.java:385)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.getCachedProducer(CachingConnectionFactory.java:353)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:320)
>   at $Proxy1.createProducer(Unknown Source)
> {code}
> Exception happens for the following address:
> {code}
> JbenchQueue;{create: always, node: {type:queue}}
> {code}
> It seems the qpid java client tries to obtain exchangeClass property in 
> AMQDestination.equals method, but this property is not set when using address 
> strings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3760) Unable to use address strings with java client due to NPE

2012-08-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/QPID-3760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431680#comment-13431680
 ] 

MichaƂ Warecki commented on QPID-3760:
--

I think this doesn't resolve problem when _exchangeClass or _exchangeName in 
one class is null and in other is not. There is a need to check this before 
above comparision. 

Something like this:


if(_exchangeClass == null && that._exchangeClass != null)
{
return false;
}

if(_exchangeClass != null && that._exchangeClass == null)
{
return false;
}

if(_exchangeClass != null && that._exchangeClass != null) {
if (!_exchangeClass.equals(that._exchangeClass))
{
return false;
}
}

if(_exchangeName == null && that._exchangeName != null)
{
return false;
}

if(_exchangeName != null && that._exchangeName == null)
{
return false;
}

if(_exchangeName != null && that._exchangeName != null) {
if (!_exchangeName.equals(that._exchangeName))
{

return false;
}
}

> Unable to use address strings with java client due to NPE
> -
>
> Key: QPID-3760
> URL: https://issues.apache.org/jira/browse/QPID-3760
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Client
>Affects Versions: 0.10
>Reporter: Sergey Zhemzhitsky
>  Labels: addressing
>
> Stacktrace:
> {code}
> Exception in thread "Thread-5" java.lang.NullPointerException
>   at org.apache.qpid.client.AMQDestination.equals(AMQDestination.java:577)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.destinationEquals(CachingConnectionFactory.java:467)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.equals(CachingConnectionFactory.java:474)
>   at java.util.HashMap.get(HashMap.java:385)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.getCachedProducer(CachingConnectionFactory.java:353)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:320)
>   at $Proxy1.createProducer(Unknown Source)
> {code}
> Exception happens for the following address:
> {code}
> JbenchQueue;{create: always, node: {type:queue}}
> {code}
> It seems the qpid java client tries to obtain exchangeClass property in 
> AMQDestination.equals method, but this property is not set when using address 
> strings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3760) Unable to use address strings with java client due to NPE

2012-08-09 Thread Lars-Erik Helander (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431632#comment-13431632
 ] 

Lars-Erik Helander commented on QPID-3760:
--

Since I experienced the same problem, I tried the following "fix" (only check 
equality if non-null values):


if (_exchangeClass != null && that._exchangeClass != null) {
if (!_exchangeClass.equals(that._exchangeClass))
{
return false;
}
}


if (_exchangeName != null && that._exchangeName != null) {
if (!_exchangeName.equals(that._exchangeName))
{
return false;
}
}

and that solved my problem.


> Unable to use address strings with java client due to NPE
> -
>
> Key: QPID-3760
> URL: https://issues.apache.org/jira/browse/QPID-3760
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Client
>Affects Versions: 0.10
>Reporter: Sergey Zhemzhitsky
>  Labels: addressing
>
> Stacktrace:
> {code}
> Exception in thread "Thread-5" java.lang.NullPointerException
>   at org.apache.qpid.client.AMQDestination.equals(AMQDestination.java:577)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.destinationEquals(CachingConnectionFactory.java:467)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.equals(CachingConnectionFactory.java:474)
>   at java.util.HashMap.get(HashMap.java:385)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.getCachedProducer(CachingConnectionFactory.java:353)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:320)
>   at $Proxy1.createProducer(Unknown Source)
> {code}
> Exception happens for the following address:
> {code}
> JbenchQueue;{create: always, node: {type:queue}}
> {code}
> It seems the qpid java client tries to obtain exchangeClass property in 
> AMQDestination.equals method, but this property is not set when using address 
> strings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3760) Unable to use address strings with java client due to NPE

2012-01-16 Thread Weston M. Price (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186903#comment-13186903
 ] 

Weston M. Price commented on QPID-3760:
---

Looks like this entire method could use a good review and a patch.

> Unable to use address strings with java client due to NPE
> -
>
> Key: QPID-3760
> URL: https://issues.apache.org/jira/browse/QPID-3760
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Client
>Affects Versions: 0.10
>Reporter: Sergey Zhemzhitsky
>
> Stacktrace:
> {code}
> Exception in thread "Thread-5" java.lang.NullPointerException
>   at org.apache.qpid.client.AMQDestination.equals(AMQDestination.java:577)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.destinationEquals(CachingConnectionFactory.java:467)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$DestinationCacheKey.equals(CachingConnectionFactory.java:474)
>   at java.util.HashMap.get(HashMap.java:385)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.getCachedProducer(CachingConnectionFactory.java:353)
>   at 
> org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:320)
>   at $Proxy1.createProducer(Unknown Source)
> {code}
> Exception happens for the following address:
> {code}
> JbenchQueue;{create: always, node: {type:queue}}
> {code}
> It seems the qpid java client tries to obtain exchangeClass property in 
> AMQDestination.equals method, but this property is not set when using address 
> strings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
Apache Qpid - AMQP Messaging Implementation
Project:  http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org