Menu

#283 WebSphere incorrectly detects transaction in progress

CVS_Head
open
nobody
Core (45)
5
2014-12-30
2006-05-12
Miro Halas
No

When testing Open Core with WebSphere 6.0.2.9 and MS
SQL Database using default embedded connectJDBC
driver, the WebSphere throws an exception that there
is a transaction already in progress and stops us
from starting another transaction. I have
instrumented our code to log all starts and ends of
transactions and the log clearly shows that there is
no transaction in progress.

This might be related to defect #1487670 WebSphere
incorrectly manages autocommit state of connection
since WebSphere might be confused that there is an
active transaction

The log clearly shows that each transaction which is
started is also sucessfully commited. I have though
this is because in TimestampTest we are reusing the
same connection so I modified the code to get new
connection but the same problem occured. I am
attaching both sets of log files (newconnection and
reusedconnection). To test the bevaior you can use
the same files attached to the defect #1487670 with
connectJdbc.

To reproduce this:
1. Configure WebSphere as outlined in our
documentation but using connectJDBC driver
2. Turn on traces and logging.
3. Deploy core-app.war on context core.
4. Go to http://localhost:9080/core/TestServlet
5. Select test
org.opensubsystems.core.persist.db.driver.TimeStampTes
t
and hit Run button. Following exception will be
created, due to
WebSphere 6 incorrectly detecting transaction in
progress

testTimestampNanosSupport
(org.opensubsystems.core.persist.db.driver.TimestampTe
st$TimestampTestInternal)
Cannot start a new UOW. A LocalTransactionContainment
is already active with work.
java.lang.IllegalStateException: Cannot start a new
UOW. A LocalTransactionContainment is already active
with work.
at
com.ibm.ws.LocalTransaction.LTCUOWCallback.uowPreBegin
(LTCUOWCallback.java:237)
at
com.ibm.ws.LocalTransaction.LTCUOWCallback.contextChan
ge(LTCUOWCallback.java:153)
at
com.ibm.ws.uow.UOWScopeCallbackManager.notifyCallbacks
(UOWScopeCallbackManager.java:62)
at
com.ibm.ws.Transaction.JTA.UserTransactionImpl.begin
(UserTransactionImpl.java:161)
at
org.opensubsystems.core.persist.db.transaction.Delegat
ingUserTransaction.begin
(DelegatingUserTransaction.java:86)
at
org.opensubsystems.core.persist.db.driver.TimestampTes
t$TimestampTestInternal.testTimestampNanosSupport
(TimestampTest.java:598)
at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java(Compiled Code))
at junit.framework.TestCase.runTest
(TestCase.java:164)

Discussion

  • Miro Halas

    Miro Halas - 2006-05-12

    Log demonstrating the error while all transactions are correctly closed

     
  • Miro Halas

    Miro Halas - 2006-05-12

    WebSphere logs documenting the problem

     
  • Miro Halas

    Miro Halas - 2006-05-12

    Our logs docummenting the problems

     
  • Miro Halas

    Miro Halas - 2006-05-12

    WebSphere logs documenting the problem

     
  • Miro Halas

    Miro Halas - 2006-05-16

    Logged In: YES
    user_id=166079

    This was submitted to IBM as a problem # 19693 and can be
    tracked here
    https://www-
    304.ibm.com/jct03004c/software/support/trial/cst/genprog/pr
    otected/view/showPMR.jsp?
    pmrid=19693&tname=WasTrial&pname=WasTrial

     
  • Miro Halas

    Miro Halas - 2006-05-23

    Logged In: YES
    user_id=166079

    This is response from IBM. They acknowledged it is most
    likely defect in WebSphere code. Here is complete transcript
    from the conversation:

    Product: IBM WebSphere Application Server, Version 6
    Customer's environment:
    Amount of memory: 1024mb
    Size of hard disk: 30gb
    On a network? : yes

    Description:
    Recreatable? : yes
    How often does the failure occur? : Constantly

    Problem description:

    I am using Websphere as 6.0.2.9 to evaluate it with our
    project OpenSubsystems (www.opensubsystems.org). When we use
    it with embedded connectJDBC driver to access MS SQLServer
    2005, our automated testcases constantly fail. These are
    consistently passing on all other supported application
    servers (WebLogic, JBoss, Jonas, ...). The issue is that
    WebSphere detects that transaction is already in progress
    and throws an exception when we try to start another
    transaction. We have instrumented our code to log starts
    (begin) and ends (commit/rollback) of all transactions and
    from the log it is clear that all transactions are completed
    at the moment when we try to start a new transaction.

    I have documented all the details and attached log files
    from our application, WebSphere at the following URL
    http://sourceforge.net/tracker/index.php?func=detail&aid=1487677&group_id=111437&atid=659213
    ------------------------Customer Tue May 16
    15:51:28 GMT 2006

    This problem may be related to problem #19692 I have
    submitted earlier.
    ------------------------Customer Tue May 16
    15:52:10 GMT 2006
    See some of the general commentary I put in 19692, which
    also applies here.

    Make sure your JDBC driver and datastore helper definition
    match according to this article
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rdat_minreq.html

    If that does not solve anything,

    I need to see detailed information on how the datasource is
    defined.
    Please run the collector tool according to the instructions
    in this article:
    http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/ttrb_runct.html

    Then upload the resultant JAR file via the problem
    submission page upload link.

    Rudy

    ____________ IBM Response Tue May 16 19:27:35 GMT 2006

    Please notice that this defect has nothing to do with jTDS,
    in this scenario WebSphere is configured using the embedded
    connectJDBC driver. The general overview of how I installed
    WebSphere are docummented at
    http://www.opensubsystems.org/userguide/j2eesetup_websphere.html

    I am using the embedded connectJDBC driver and the data
    source and helper classes are configured exactly as in
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rdat_minreq.html

    My application logs are reporting that all transactions are
    completed at the moment when I am trying to start new
    transaction (this is single thread application), but
    WebSphere is complaining that there is transaction in
    progress. Without getting past this point I cannot proceed
    with WebSphere evaluation.

    Thanks you for your assistance, I am going to attach the
    files I have collected with the tool.
    ------------------------Customer Wed May 17
    17:19:10 GMT 2006

    ------------------------Customer file uploaded
    (XXXXXXXXXX-XXXXXXXXXXNode01Cell-ws_server-default-WASenv.jar)
    ------------------------Customer Wed May 17
    17:24:00 GMT 2006
    I have researched your problem by examining all the logs you
    sent. The FFDC logs seem to contradict each other. One
    particularly troubling entry is a traceback of an
    IllegalStateException on the begin method which says that a
    transaction is not active, which does not make sense since
    it is a begin call. The other entries indicate that a
    transaction is already active on the begin call. This
    appears to be for the same method call.

    I also researched the symptoms via Google, and I could find
    nothing that matched your situation closely enough to even
    suggest a work-around.

    I would conclude it is highly likely this is a WebSphere
    defect. And you are already at the latest service level, so
    this is an unreported problem. Research into our defect
    tracking database does not turn up any pending defects.
    Unfortunately , we have no means to fix this for you. The
    free support we provide for WebSphere trials does not
    include defect support.

    The only help avenue I can suggest is to discuss this on the
    WebSphere forums and perhaps someone can offer a workaround
    to the defect. You can access them here:
    http://www-128.ibm.com/developerworks/forums/wsdd_forums.jsp

    Rudy

     

Log in to post a comment.