jms.IllegalStateException: The producer is closed error.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

jms.IllegalStateException: The producer is closed error.

Porag
Hi

Any idea why this happened?

org.springframework.jms.IllegalStateException: The producer is closed; nested ex
ception is javax.jms.IllegalStateException: The producer is closed
        at org.springframework.jms.support.JmsUtils.convertJmsAccessException(Jm
sUtils.java:279)
        at org.springframework.jms.support.JmsAccessor.convertJmsAccessException
(JmsAccessor.java:169)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:487
)
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:570)
        at org.powertac.samplebroker.core.MessageDispatcher.sendMessage(MessageD
ispatcher.java:122)
        at org.powertac.samplebroker.core.PowerTacBroker.sendMessage(PowerTacBro
ker.java:397)
        at org.powertac.samplebroker.wholesaleMarket.WholesaleBidding.submit
Order(WholesaleBidding.java:207)
        at org.powertac.samplebroker.MarketManagerService.activate(MarketManager
Service.java:639)
        at org.powertac.samplebroker.core.PowerTacBroker$AgentRunner.activateSer
vices(PowerTacBroker.java:679)
        at org.powertac.samplebroker.core.PowerTacBroker$AgentRunner.run(PowerTa
cBroker.java:665)
Caused by: javax.jms.IllegalStateException: The producer is closed
        at org.apache.activemq.ActiveMQMessageProducer.checkClosed(ActiveMQMessa
geProducer.java:195)
        at org.apache.activemq.ActiveMQMessageProducerSupport.getDeliveryMode(Ac
tiveMQMessageProducerSupport.java:148)
        at org.springframework.jms.connection.CachedMessageProducer.<init>(Cache
dMessageProducer.java:91)
        at org.springframework.jms.connection.CachingConnectionFactory$CachedSes
sionInvocationHandler.getCachedProducer(CachingConnectionFactory.java:408)
        at org.springframework.jms.connection.CachingConnectionFactory$CachedSes
sionInvocationHandler.invoke(CachingConnectionFactory.java:338)
        at com.sun.proxy.$Proxy41.createProducer(Unknown Source)
        at org.springframework.jms.core.JmsTemplate.doCreateProducer(JmsTemplate
.java:1114)
        at org.springframework.jms.core.JmsTemplate.createProducer(JmsTemplate.j
ava:1095)
        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:591)

        at org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:5
74)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:484
)
        ... 7 more

Thanks in advance
Porag
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jms.IllegalStateException: The producer is closed error.

gbuijs
Hi Porag,

Is this happening at the end of the game?
There's a race condition when a game finishes.
The server sends the SimEnd message and closes the channel.
Your broker might send bids before processing the SimEnd message.
But the channel is already closed, resulting in the exception.

It's quite difficult to fix and harmless other than scary log messages.

Cheers,

Govert
Loading...