<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBoss Transaction Not Active - EJB 2.1 in JBOSS EAP 5.1.2
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/limacon">Rodel Talampas</a> in <i>JBoss Transactions Development</i> - <a href="https://community.jboss.org/message/753972#753972">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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 >)</p><p>2012-08-16 17:02:57,268 ERROR [STDERR] (Thread-33) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)</p><p>2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at com.xxx.cx.base.JDBCPersistenceManagerBase.getConnection(JDBCPersistenceManagerBase.java:218)</p><p>2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at com.xxx.cx.job.JobJDBCMgr.updateWithActiveJob(JobJDBCMgr.java:318)</p><p>2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at com.xxx.cx.job.Job_Bean.ejbPassivate(Job_Bean.java:86)</p><p>2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</p><p>2012-08-16 17:02:57,269 ERROR [STDERR] (Thread-33) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</p><p>2012-08-16 17:02:57,270 ERROR [STDERR] (Thread-33) at java.lang.reflect.Method.invoke(Method.java:597)</p><p>2012-08-16 17:02:57,270 ERROR [STDERR] (Thread-33) at org.jboss.ejb.plugins.BMPPersistenceManager.passivateEntity(BMPPersistenceManager.java:538)</p><p>2012-08-16 17:02:57,270 ERROR [STDERR] (Thread-33) at </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2012-08-16 17:02:57,275 ERROR [STDERR] (Thread-33)           ... 33 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I placed in console outputs and it is having error on the following code:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>DataSource datasource = null;</p><p>                    if (m_connection == null)</p><p>                    {</p><p>                              try</p><p>                              {</p><p>                                        System.out.println(">>>> Get DataSource here ...");</p><p>                                        datasource = getDataSource();</p><p>                                        System.out.println(">>>> Get Connection here ...");</p><p><span style="color: #ff0000;"><strong>                                        m_connection = datasource.getConnection();</strong></span></p><p>                                        System.out.println(">>>> No Exception here ...");</p><p>                              }</p><p>                              catch(SQLException sqlExc)</p><p>                              {</p><p>                                        m_connection = null;</p><p>                                        System.out.println(">>>> Get connection failed ...");</p><p>                                        trace.message("Get connection failed");</p><p>                                        sqlExc.printStackTrace();</p><p>                                        throw new EJBException(sqlExc);</p><p>                              }</p><p>                              catch(EJBException ejbExc)</p><p>                              {</p><p>                                        m_connection = null;</p><p>                                        // getDataSource() failed: EJBException has already been constructed, so rethrow</p><p>                                        throw ejbExc;</p><p>                              }</p><p>                    }</p><p>                    return          m_connection;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I've already read lots post regarding this transaction not active issue: changing timeout, NullPointerException, etc.. but answers did not work for me.</p><p>Any idea or resolutions will be much grateful.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/753972#753972">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Transactions Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2041">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>