[jira] [Updated] (QPIDJMS-467) Provide consistent stack trace information in client JMS Exceptions
[ https://issues.apache.org/jira/browse/QPIDJMS-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robbie Gemmell updated QPIDJMS-467: --- Affects Version/s: (was: 0.40.0) 0.44.0 Description: Exceptions created within the clients lower layer were often [re]thrown by the clients upper layer, meaning they lack call stack from the applications perspective. Within the JMS 2 API additions these exceptions are often caught and wrapped in JMSRuntimeException equivalents, as required by the API not allowing for checked exceptions. This means the same general failure did contain application perspective call stack in those cases, creating a behaviour inconsistency depending on the API being used. The client should be updated to consistently ensure application call stack is available in such cases. Original Description: Please investigate about including full stack traces which include calling methods in all AMQ stack traces. We are expecting better and good full stack traces to easily identify the offending code. We are using qpid libs (qpid-jms-client-0.40.0.redhat-1.jar). Below output is 2 tests run by Junit. The first highlighted in RED does not include any com.fedex etc calling method. It does manage to identify the *method name*. The 2^nd^ test shows the desired full stack trace. We are seeing this behavior so many times. It appears that most/any time AMQ hands off a task to a worker thread, the calling method is not included in any failures reported. 1) testSendMessageWithCompletionListener(*junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests*)javax.jms.InvalidDestinationException: AMQ119002: target address does not exist [condition = amqp:not-found] at org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:150) at org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:117) at org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder.handleClosed(AmqpResourceBuilder.java:185) at org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder.processRemoteClose(AmqpResourceBuilder.java:129) at org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:973) at org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:104) at org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:831) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 2) testSendMessageWithOptionsAndWithCompletionListener(junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests)javax.jms.MessageFormatException: Message must not be null at org.apache.qpid.jms.JmsSession.send(JmsSession.java:765) at org.apache.qpid.jms.JmsMessageProducer.sendMessage(JmsMessageProducer.java:246) at org.apache.qpid.jms.JmsMessageProducer.send(JmsMessageProducer.java:214) at com.fedex.mi.decorator.jms.FedexJmsMessageProducer.send(FedexJmsMessageProducer.java:488) {color:#ff} *at junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests.testSendMessageWithOptionsAndWithCompletionListener(JmsMessageProducerTests.java:687)*{color} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at junitTests.com.fedex.mi.decorator.jms.FedexJMSJUnitDispatch.runSelectedTests(FedexJMSJUnitDispatch.java:567) at junitTests.com.fedex.mi.decorator.jms.FedexJMSJUnitDispatch.main(FedexJMSJUnitDispatch.java:709) For all the issues we've encountered, the client catches an exception, prints out the stack trace, and it doesn't include the client stack info The exception is thrown from the specific call. I am not sure how internal AMQ works but If AMQ chooses to run the operation in a separate thread, and then do some sort of block waiting for that call to complete before returning the exception in the original client calling thread, that is fine, but it still would be able to build a complete stack trace before handing back control to the calling client thread. Perhaps a new exception with the cause populated by the back ground thread make sense. Here's another example
[jira] [Updated] (QPIDJMS-467) Provide consistent stack trace information in client JMS Exceptions
[ https://issues.apache.org/jira/browse/QPIDJMS-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish updated QPIDJMS-467: - Summary: Provide consistent stack trace information in client JMS Exceptions (was: Logging Issue) > Provide consistent stack trace information in client JMS Exceptions > --- > > Key: QPIDJMS-467 > URL: https://issues.apache.org/jira/browse/QPIDJMS-467 > Project: Qpid JMS > Issue Type: Bug > Components: qpid-jms-client >Affects Versions: 0.40.0 >Reporter: Ritz >Assignee: Timothy Bish >Priority: Minor > Fix For: 0.40.0 > > > Please investigate about including full stack traces which include calling > methods in all AMQ stack traces. We are expecting better and good full stack > traces to easily identify the offending code. > We are using qpid libs (qpid-jms-client-0.40.0.redhat-1.jar). > > Below output is 2 tests run by Junit. The first highlighted in RED does not > include any com.fedex etc calling method. It does manage to identify the > *method name*. > The 2^nd^ test shows the desired full stack trace. > > We are seeing this behavior so many times. It appears that most/any time AMQ > hands off a task to a worker thread, the calling method is not included in > any failures reported. > > 1) > testSendMessageWithCompletionListener(*junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests*)javax.jms.InvalidDestinationException: > AMQ119002: target address does not exist [condition = amqp:not-found] > at > org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:150) > at > org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:117) > at > org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder.handleClosed(AmqpResourceBuilder.java:185) > at > org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder.processRemoteClose(AmqpResourceBuilder.java:129) > at > org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:973) > at > org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:104) > at > org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:831) > at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) > at java.util.concurrent.FutureTask.run(Unknown Source) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown > Source) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown > Source) > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > > 2) > testSendMessageWithOptionsAndWithCompletionListener(junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests)javax.jms.MessageFormatException: > Message must not be null > at org.apache.qpid.jms.JmsSession.send(JmsSession.java:765) > at > org.apache.qpid.jms.JmsMessageProducer.sendMessage(JmsMessageProducer.java:246) > at > org.apache.qpid.jms.JmsMessageProducer.send(JmsMessageProducer.java:214) > at > com.fedex.mi.decorator.jms.FedexJmsMessageProducer.send(FedexJmsMessageProducer.java:488) > {color:#FF} *at > junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests.testSendMessageWithOptionsAndWithCompletionListener(JmsMessageProducerTests.java:687)*{color} > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at > junitTests.com.fedex.mi.decorator.jms.FedexJMSJUnitDispatch.runSelectedTests(FedexJMSJUnitDispatch.java:567) > at > junitTests.com.fedex.mi.decorator.jms.FedexJMSJUnitDispatch.main(FedexJMSJUnitDispatch.java:709) > > For all the issues we've encountered, the client catches an exception, prints > out the stack trace, and it doesn't include the client stack info > The exception is thrown from the specific call. I am not sure how internal > AMQ works but If AMQ chooses to run the operation in a separate thread, and > then do some sort of block waiting for that call to complete before returning > the exception in the original client calling thread, that is fine, but it > still would be able to build a complete stack trace before handing back > control to the calling client thread. Perhaps a new exception with the cause > populated by the back ground thread make sense. > > Here's another example for connection error with qpid 0.40.0 libs;
[jira] [Updated] (QPIDJMS-467) Provide consistent stack trace information in client JMS Exceptions
[ https://issues.apache.org/jira/browse/QPIDJMS-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish updated QPIDJMS-467: - Fix Version/s: (was: 0.40.0) 0.45.0 > Provide consistent stack trace information in client JMS Exceptions > --- > > Key: QPIDJMS-467 > URL: https://issues.apache.org/jira/browse/QPIDJMS-467 > Project: Qpid JMS > Issue Type: Bug > Components: qpid-jms-client >Affects Versions: 0.40.0 >Reporter: Ritz >Assignee: Timothy Bish >Priority: Minor > Fix For: 0.45.0 > > > Please investigate about including full stack traces which include calling > methods in all AMQ stack traces. We are expecting better and good full stack > traces to easily identify the offending code. > We are using qpid libs (qpid-jms-client-0.40.0.redhat-1.jar). > > Below output is 2 tests run by Junit. The first highlighted in RED does not > include any com.fedex etc calling method. It does manage to identify the > *method name*. > The 2^nd^ test shows the desired full stack trace. > > We are seeing this behavior so many times. It appears that most/any time AMQ > hands off a task to a worker thread, the calling method is not included in > any failures reported. > > 1) > testSendMessageWithCompletionListener(*junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests*)javax.jms.InvalidDestinationException: > AMQ119002: target address does not exist [condition = amqp:not-found] > at > org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:150) > at > org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:117) > at > org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder.handleClosed(AmqpResourceBuilder.java:185) > at > org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder.processRemoteClose(AmqpResourceBuilder.java:129) > at > org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:973) > at > org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:104) > at > org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:831) > at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) > at java.util.concurrent.FutureTask.run(Unknown Source) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown > Source) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown > Source) > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > > 2) > testSendMessageWithOptionsAndWithCompletionListener(junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests)javax.jms.MessageFormatException: > Message must not be null > at org.apache.qpid.jms.JmsSession.send(JmsSession.java:765) > at > org.apache.qpid.jms.JmsMessageProducer.sendMessage(JmsMessageProducer.java:246) > at > org.apache.qpid.jms.JmsMessageProducer.send(JmsMessageProducer.java:214) > at > com.fedex.mi.decorator.jms.FedexJmsMessageProducer.send(FedexJmsMessageProducer.java:488) > {color:#FF} *at > junitTests.com.fedex.mi.decorator.jms.JmsMessageProducerTests.testSendMessageWithOptionsAndWithCompletionListener(JmsMessageProducerTests.java:687)*{color} > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at > junitTests.com.fedex.mi.decorator.jms.FedexJMSJUnitDispatch.runSelectedTests(FedexJMSJUnitDispatch.java:567) > at > junitTests.com.fedex.mi.decorator.jms.FedexJMSJUnitDispatch.main(FedexJMSJUnitDispatch.java:709) > > For all the issues we've encountered, the client catches an exception, prints > out the stack trace, and it doesn't include the client stack info > The exception is thrown from the specific call. I am not sure how internal > AMQ works but If AMQ chooses to run the operation in a separate thread, and > then do some sort of block waiting for that call to complete before returning > the exception in the original client calling thread, that is fine, but it > still would be able to build a complete stack trace before handing back > control to the calling client thread. Perhaps a new exception with the cause > populated by the back ground thread make sense. > > Here's another example for connection error with qpid 0.40.0 libs; no client > thread info!! > The client