[rabbitmq-discuss] Java API methods don't return nor throw exceptions

Jonatan Kallus jonatan at heysan.com
Sat Dec 13 00:01:27 GMT 2008


Thank you!, the key combo is ctrl+\ and this is what I get. I do not really
understand this, so I am very thankful for anything that makes me understand
it a little further. I few other threads are running in the application, but
they have no interaction with rabbitmq so I wont paste them here, unless
they are needed.

This is when execution stops at basicCancel:

"Thread-1" prio=10 tid=0x00002aaad8001c00 nid=0x7e62 in Object.wait()
[0x0000000041017000..0x0000000041017a90]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00002aaac931de50> (a
com.rabbitmq.utility.BlockingValueOrException)
    at java.lang.Object.wait(Object.java:485)
    at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:58)
    - locked <0x00002aaac931de50> (a
com.rabbitmq.utility.BlockingValueOrException)
    at
com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:95)
    - locked <0x00002aaac931de50> (a
com.rabbitmq.utility.BlockingValueOrException)
    at
com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:41)
    at
com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:274)
    at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:697)
    at com.heysan.analyticsproxy_mq.Consumer.disconnect(Consumer.java:81)
    at com.heysan.analyticsproxy_mq.Controller.exit(Controller.java:109)
    at com.heysan.analyticsproxy_mq.Controller.update(Controller.java:57)
    at java.util.Observable.notifyObservers(Observable.java:142)
    at java.util.Observable.notifyObservers(Observable.java:98)
    at com.heysan.analyticsproxy_mq.Consumer.setExitFlag(Consumer.java:101)
    at com.heysan.analyticsproxy_mq.Consumer.access$200(Consumer.java:18)
    at
com.heysan.analyticsproxy_mq.Consumer$2.handleDelivery(Consumer.java:137)
    at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:188)
    at
com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:143)
    at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:94)
    at
com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:445)

This is when execution stops at addShutdownListener:

"Thread-4" prio=10 tid=0x000000005cbdf000 nid=0x7f36 runnable
[0x0000000040f16000..0x0000000040f16d10]
   java.lang.Thread.State: RUNNABLE
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    - locked <0x00002aaac93076a8> (a java.io.BufferedInputStream)
    at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:271)
    at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:111)
    at
com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:143)
    - locked <0x00002aaac9307670> (a java.io.DataInputStream)
    at
com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:284)
    at
com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:427)


On Thu, Dec 11, 2008 at 10:06 AM, Holger Hoffstätte <holger at wizards.de>wrote:

> Jonatan Kallus wrote:
> > I am trying to write a java application that can handle the rabbitmq
> > server going down and coming back up (or losing the connection to the
> > server and getting it back).
> [..]
> > ConnectionFactory factory = new ConnectionFactory(params);
> > connection = factory.newConnection(host, AMQP.PROTOCOL.PORT);
> > channel = connection.createChannel();
> > channel.accessRequest(this.realm);
> >
> > Code above gets run through without any exceptions. But, when
> > reconnecting, the execution stops at this line, the method seems to
> > never return:
> >
> > connection.addShutdownListener(shutdownListener);
>
> Try to dump a stack trace so we can see who's calling what.
> Easiest to do with jconsole or visualvm, or with the magic key combo that
> I cannot remember right now..
>
> > I have once seen addShutdownListener throw a
> > ConcurrentModificationException, but the rabbitmq connection is not
> > running in a multithreaded environment.
>
> CME has nothing to do with threading and can also occur e.g. in recursive
> code that improperly modifies the iterated collection.
>
> -h
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081212/445f48b9/attachment.htm 


More information about the rabbitmq-discuss mailing list