[jboss-dev-forums] [JBoss Transactions Development] - JBoss Transaction Not Active - EJB 2.1 in JBOSS EAP 5.1.2

Rodel Talampas do-not-reply at jboss.com
Thu Aug 16 05:30:09 EDT 2012


Rodel Talampas [https://community.jboss.org/people/limacon] created the discussion

"JBoss Transaction Not Active - EJB 2.1 in JBOSS EAP 5.1.2"

To view the discussion, visit: https://community.jboss.org/message/753972#753972

--------------------------------------------------------------
Hi,

I am hoping someone can help me on this transaction management problem.  Our application is working fine when it is running in Jboss EAP 4.3. But I am tasked to migrate this to JBoss 5.1.  I both tried JBoss EAP 5.1.1 and JBoss EAP 5.1.2 and I am having the same problem always.

2012-08-16 17:02:57,268 ERROR [STDERR] (Thread-33) org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a410865:d86e:502cb72d:fc status: ActionStatus.COMMITTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a410865:d86e:502cb72d:fc status: ActionStatus.COMMITTED >)
2012-08-16 17:02:57,268 ERROR [STDERR] (Thread-33) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at com.xxx.cx.base.JDBCPersistenceManagerBase.getConnection(JDBCPersistenceManagerBase.java:218)
2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at com.xxx.cx.job.JobJDBCMgr.updateWithActiveJob(JobJDBCMgr.java:318)
2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at com.xxx.cx.job.Job_Bean.ejbPassivate(Job_Bean.java:86)
2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2012-08-16 17:02:57,270 ERROR [STDERR] (Thread-33) at java.lang.reflect.Method.invoke(Method.java:597)
2012-08-16 17:02:57,270 ERROR [STDERR] (Thread-33) at org.jboss.ejb.plugins.BMPPersistenceManager.passivateEntity(BMPPersistenceManager.java:538)
2012-08-16 17:02:57,270 ERROR [STDERR] (Thread-33) at 

2012-08-16 17:02:57,275 ERROR [STDERR] (Thread-33)           ... 33 more

I placed in console outputs and it is having error on the following code:

DataSource datasource = null;
                    if (m_connection == null)
                    {
                              try
                              {
                                        System.out.println(">>>> Get DataSource here ...");
                                        datasource = getDataSource();
                                        System.out.println(">>>> Get Connection here ...");
*                                        m_connection = datasource.getConnection();*
                                        System.out.println(">>>> No Exception here ...");
                              }
                              catch(SQLException sqlExc)
                              {
                                        m_connection = null;
                                        System.out.println(">>>> Get connection failed ...");
                                        trace.message("Get connection failed");
                                        sqlExc.printStackTrace();
                                        throw new EJBException(sqlExc);
                              }
                              catch(EJBException ejbExc)
                              {
                                        m_connection = null;
                                        // getDataSource() failed: EJBException has already been constructed, so rethrow
                                        throw ejbExc;
                              }
                    }
                    return          m_connection;

I've already read lots post regarding this transaction not active issue: changing timeout, NullPointerException, etc.. but answers did not work for me.
Any idea or resolutions will be much grateful.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/753972#753972]

Start a new discussion in JBoss Transactions Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2041]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120816/43abefef/attachment.html 


More information about the jboss-dev-forums mailing list