[jboss-user] [Beginners Corner] - Re: Could not enlist in transaction on entering meta-aware o
As a work-around, I have put | @TransactionAttribute(TransactionAttributeType.NEVER) | on the timer. This seems to stop the exception from being thrown. In this case it's not a problem for me as I can ensure the data integrity by hand quite easily. But I'm not really sure what I've done wrong, as I think you should be able to call a session bean from a timer. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129692#4129692 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129692 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Could not enlist in transaction on entering meta-aware objec
Hi I am having a little trouble, and would appreciate any assistance. I have a timer bean calling stateless session bean. Both of them are annotated with | @TransactionAttribute(TransactionAttributeType.REQUIRED) | When the timer calls the session bean, I get this in the logs (the stdout stuff is some sql from the session bean) - it's quite long, so I'll post the important bits first, and post the whole thing below - I'm clearly doing something wrong, but I'm a bit new to this EJB stuff, so please forgive my ignorance. Any help is much appreciated. Many thanks, Ed | 2008-02-15 09:51:45,011 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null | 2008-02-15 09:51:45,011 ERROR [JDBCExceptionReporter] Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >)) | 2008-02-15 09:51:45,012 INFO [STDOUT] SELECT f.* FROM Flight f INNER JOIN Airport ap ON ap.id = f.destinationAirportId WHERE f.icaoCarrierCode = :icaoCarrierCode OR f.icaoFlightCode = :flightIcaoCode OR ap.icaoId = :destinationAirportIcao ORDER BY f.icaoCarrierCode = :icaoCarrierCode, f.icaoFlightCode = :flightIcaoCode, ap.icaoId = :destinationAirportIcao, 1 | 2008-02-15 09:51:45,019 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection | 2008-02-15 09:51:45,020 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629) | 2008-02-15 09:51:45,020 ERROR [STDERR] at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73) | 2008-02-15 09:51:45,020 ERROR [STDERR] at net.rockshore.cdm.service.FlightServiceImpl.findFlight(FlightServiceImpl.java:251) | | ... snip ... | | 2008-02-15 09:51:45,027 ERROR [STDERR] Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >)) | | ... snip ... | | 2008-02-15 09:51:45,027 ERROR [STDERR] Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >) | | ... snip ... | | 2008-02-15 09:51:45,032 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null | 2008-02-15 09:51:45,032 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >) | 2008-02-15 09:51:45,032 INFO [DefaultLoadEventListener] Error performing load command | org.hibernate.exception.GenericJDBCException: Cannot open connection | at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) | | ... snip ... | | Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY >) | | ... snip ... | | Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:d7b4:47b55ac3:781 status: ActionStatus.ABORT_ONLY > | | ... snip ... | | 2008-02-15 09:51:45,063 ERROR [TimerImpl] Error invo
[jboss-user] [Messaging, JMS & JBossMQ] - Re: JBossMQ ThreadPoolFullException
Solved The external app was creating a new connection for every message (DOH!). I'd copied and pasted the jms message sending code from somewhere that was running inside JBoss. That was expecting JBoss to manage a jms connection pool, whereas the external app was creating a new connection every time it sent a message. So I was running out of threads pretty quickly (even when I had the max number set at 2000). Properly synchonized access to the connection and shared it between the messages, and everything's back under control. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079788#4079788 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079788 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Messaging, JMS & JBossMQ] - Re: JBossMQ ThreadPoolFullException
Solved The external app was creating a new connection for every message (DOH!). I'd copied and pasted the jms message sending code from somewhere that was running inside JBoss. That was expecting JBoss to manage a jms connection pool, whereas the external app was creating a new connection every time it sent a message. So I was running out of threads pretty quickly (even when I had the max number set at 2000). Properly synchonized access to the connection and shared it between the messages, and everything's back under control. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079766#4079766 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079766 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Messaging, JMS & JBossMQ] - JBossMQ ThreadPoolFullException
Hi, I'm running JBoss 4.2.1, with an external program delivering JMS messages to and MDB. The whole setup seems to run for a little while, but pretty soon, I start getting exceptions thrown, and after a few mins get the exceptions below. In the MDB I have a try / catch (Throwable) around the contents of onMessage in an attempt to stop any problems with my code stopping the Thread from being returned to the pool. I've tried upping the size of the threadpool, to no avail. I guess I'd like to know what circumstances would stop a thread from being returned to the pool. But mostly I just want to fix my problem ... any ideas ? Many Thanks Ed | 2007-08-29 15:15:04,662 WARN [BasicQueue] Caught unusual exception sending message to receiver. | org.jboss.util.threadpool.ThreadPoolFullException: java.lang.InterruptedException | at org.jboss.util.threadpool.BasicThreadPool.execute(BasicThreadPool.java:417) | at org.jboss.util.threadpool.BasicThreadPool.runTaskWrapper(BasicThreadPool.java:192) | at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:212) | at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:206) | at org.jboss.mq.server.ClientConsumer.queueMessageForSending(ClientConsumer.java:125) | at org.jboss.mq.server.BasicQueue.queueMessageForSending(BasicQueue.java:1140) | at org.jboss.mq.server.BasicQueue.internalAddMessage(BasicQueue.java:) | at org.jboss.mq.server.BasicQueue.access$000(BasicQueue.java:76) | at org.jboss.mq.server.BasicQueue$AddMessagePostCommitTask.run(BasicQueue.java:1359) | at org.jboss.mq.pm.TxManager.addPostCommitTask(TxManager.java:162) | at org.jboss.mq.server.BasicQueue.performOrPrepareAddMessage(BasicQueue.java:411) | at org.jboss.mq.server.BasicQueue.addMessage(BasicQueue.java:383) | at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:76) | at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:180) | at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:415) | at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:399) | at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:106) | at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:168) | at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:226) | at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:112) | at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:114) | at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:395) | at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398) | at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748) | at java.lang.Thread.run(Thread.java:619) | | 2007-08-29 15:32:11,663 ERROR [BasicQueue] Caught unusual exception in nackMessage for 2379 msg=2378 hard STORED PERSISTENT queue=QUEUE.ASMGCSFlightUpdate priority=4 lateClone=false hashCode=32408976 | org.jboss.mq.SpyJMSException: Could not update the message in the database: update affected 0 rows | at org.jboss.mq.pm.jdbc2.PersistenceManager.update(PersistenceManager.java:1298) | at org.jboss.mq.server.BasicQueue.nackMessage(BasicQueue.java:482) | at org.jboss.mq.server.BasicQueue$RestoreMessageTask.run(BasicQueue.java:1383) | at org.jboss.mq.pm.TxManager.addPostCommitTask(TxManager.java:162) | at org.jboss.mq.server.BasicQueue.acknowledge(BasicQueue.java:742) | at org.jboss.mq.server.BasicQueue.nackMessages(BasicQueue.java:820) | at org.jboss.mq.server.JMSQueue.nackMessages(JMSQueue.java:117) | at org.jboss.mq.server.ClientConsumer.close(ClientConsumer.java:202) | at org.jboss.mq.server.JMSDestinationManager.connectionClosing(JMSDestinationManager.java:525) | at org.jboss.mq.server.JMSServerInterceptorSupport.connectionClosing(JMSServerInterceptorSupport.java:96) | at org.jboss.mq.security.ServerSecurityInterceptor.connectionClosing(ServerSecurityInterceptor.java:77) | at org.jboss.mq.server.TracingInterceptor.connectionClosing(TracingInterceptor.java:161) | at org.jboss.mq.server.JMSServerInvoker.connectionClosing(JMSServerInvoker.java:102) | at org.jboss.mq.il.jvm.JVMServerIL.connectionClosing(JVMServerIL.java:126) | at org.jboss.mq.Connection.close(Connection.java:601) | ..SNIP | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079280#4079280 Reply to the post : http://www.jboss.com/index.html?module=bb&op=postin