You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by "Fox, Brian" <bf...@soe.ucsd.edu> on 2009/11/04 18:28:54 UTC

Stack trace for Java client

Hi there -

The java client code (downloaded here: http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz) has a number of printStackTrace() calls in the error handling routines.  I'm guessing these are temporary and will disappear as the code matures.  In the meantime, I'm getting a stack dump on a simple failed connect.  This is a plain jane direct connect with a purposefully bad IP address.  

I  would really like to find a way to quiet the stack trace.  Any suggestions?

Here's an example from AMQConnection.java:

    void sendMessage(AMQDestination destination, Message origMessage, AbstractJMSMessage message,
                     UUID messageId, int deliveryMode, int priority, long timeToLive, boolean mandatory,
                     boolean immediate, boolean wait) throws JMSException
    {
        ...
        try
        {
		...
        }
        catch (RuntimeException rte)
        {
            JMSException ex = new JMSException("Exception when sending message");
            rte.printStackTrace();
            ex.setLinkedException(rte);
            throw ex;
        }
    }
  
Thanks,
Brian


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


Re: Stack trace for Java client

Posted by Marnie McCormack <ma...@googlemail.com>.
Hi Brian,

I don't think there's any configurable way to suppress the stack trace, but
you could simply redirect stderr/stdout.

http://blogs.sun.com/nickstephen/entry/java_redirecting_system_out_and

Marnie
On Wed, Nov 4, 2009 at 5:28 PM, Fox, Brian <bf...@soe.ucsd.edu> wrote:

> Hi there -
>
> The java client code (downloaded here:
> http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz) has a number of
> printStackTrace() calls in the error handling routines.  I'm guessing these
> are temporary and will disappear as the code matures.  In the meantime, I'm
> getting a stack dump on a simple failed connect.  This is a plain jane
> direct connect with a purposefully bad IP address.
>
> I  would really like to find a way to quiet the stack trace.  Any
> suggestions?
>
> Here's an example from AMQConnection.java:
>
>    void sendMessage(AMQDestination destination, Message origMessage,
> AbstractJMSMessage message,
>                     UUID messageId, int deliveryMode, int priority, long
> timeToLive, boolean mandatory,
>                     boolean immediate, boolean wait) throws JMSException
>    {
>        ...
>        try
>        {
>                ...
>        }
>        catch (RuntimeException rte)
>        {
>            JMSException ex = new JMSException("Exception when sending
> message");
>            rte.printStackTrace();
>            ex.setLinkedException(rte);
>            throw ex;
>        }
>    }
>
> Thanks,
> Brian
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Stack trace for Java client

Posted by Aidan Skinner <ai...@gmail.com>.
There isn't anyway really to disable these except, as Marnie points
out, to redirect stderr/stdout. I've filed QPID-2192 to track this
issue.

On Wed, Nov 4, 2009 at 5:28 PM, Fox, Brian <bf...@soe.ucsd.edu> wrote:
> Hi there -
>
> The java client code (downloaded here: http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz) has a number of printStackTrace() calls in the error handling routines.  I'm guessing these are temporary and will disappear as the code matures.  In the meantime, I'm getting a stack dump on a simple failed connect.  This is a plain jane direct connect with a purposefully bad IP address.
>
> I  would really like to find a way to quiet the stack trace.  Any suggestions?
>
> Here's an example from AMQConnection.java:
>
>    void sendMessage(AMQDestination destination, Message origMessage, AbstractJMSMessage message,
>                     UUID messageId, int deliveryMode, int priority, long timeToLive, boolean mandatory,
>                     boolean immediate, boolean wait) throws JMSException
>    {
>        ...
>        try
>        {
>                ...
>        }
>        catch (RuntimeException rte)
>        {
>            JMSException ex = new JMSException("Exception when sending message");
>            rte.printStackTrace();
>            ex.setLinkedException(rte);
>            throw ex;
>        }
>    }
>
> Thanks,
> Brian
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Apache Qpid - AMQP, JMS, other messaging love http://qpid.apache.org
"A witty saying proves nothing" - Voltaire

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