Hi there,
we just experienced some strange problem with transaction handling using BEA Weblogic 6.1 SP2.
In order to ensure that there would be no inconsistencies in our application after a database crash, we implemented a test which includes a hard (manual) database shutdown.
Test behavior:
1.) activate breakpoint in TX method
2.) call to SLSB method with TX=Required with break point in source code right before the leaving the TX metohd, which causes the method to wait.
3.) shutdown (abort) oracle dbms
4.) deactivate break point
The Entity Bean which is used in this test is running in exclusive lock mode.
We expected the transaction to be rolled back, since the AppServer is not able to commit the transaction in the dbms, i.e., the database and the Entity Bean within the AppServer Cache would contain the "old" values.
Unfortunately that's not what happens ...
This test produces an HeuristicMixedException, which does neither cause the transaction to be rolled back, nor the Entity Bean in cache to be invalidated. This is exactly one of the inconsistencies we want to avoid 8-((.
We've already tried to find some ideas in the weblogic Documentation, but it contains not very much about HeuristicMixedException.
Here's a stack trace of the occured Exception, which might be useful:
####<17.07.2003 10:30:30 CEST> <Error> <JTA> <PC33360.eg.deutsche-boerse.de> <myserver> <
ExecuteThread: '68' for queue: 'default'> <Doerr> <14799:b59a46407f28edb9> <000000> <Name
=[EJB com.entory.bondserver.server.facade.BondServerAdminServerBean.changeBondTx(com.ento
ry.bondserver.common.valueobject.BondVOC)],Xid=14799:b59a46407f28edb9(830902),Status=Comm
itted,HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds sin
ce begin=42,seconds left=120,activeThread=Thread[ExecuteThread: '68' for queue: 'default'
,5,Thread Group for Queue: 'default'],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(s
tate=committed,assigned=myserver),SCInfo[mydomain+myserver]=(state=committed),properties=
({ISOLATION LEVEL=2, weblogic.transaction.name=[EJB com.entory.bondserver.server.facade.B
ondServerAdminServerBean.changeBondTx(com.entory.bondserver.common.valueobject.BondVOC)],
weblogic.jdbc=t3://127.0.0.2:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDe
scriptor=(CoordinatorURL=myserver+127.0.0.2:7001+mydomain+, Resources={})],CoordinatorURL
=myserver+127.0.0.2:7001+mydomain+) completed heuristically:
(weblogic.jdbc.jts.Connection, HeuristicHazard, (javax.transaction.xa.XAException: Keine
weiteren Daten aus Socket zu lesen)) >
####<17.07.2003 10:30:30 CEST> <Error> <EJB> <PC33360.eg.deutsche-boerse.de> <myserver> <
ExecuteThread: '68' for queue: 'default'> <Doerr> <> <010026> <Exception during commit of
transaction Name=[EJB com.entory.bondserver.server.facade.BondServerAdminServerBean.chan
geBondTx(com.entory.bondserver.common.valueobject.BondVOC)],Xid=14799:b59a46407f28edb9(83
0902),Status=Committed,HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOth
ers=0,seconds since begin=42,seconds left=120,ServerResourceInfo[weblogic.jdbc.jts.Connec
tion]=(state=committed,assigned=myserver),SCInfo[mydomain+myserver]=(state=committed),pro
perties=({ISOLATION LEVEL=2, weblogic.transaction.name=[EJB com.entory.bondserver.server.
facade.BondServerAdminServerBean.changeBondTx(com.entory.bondserver.common.valueobject.Bo
ndVOC)], weblogic.jdbc=t3://127.0.0.2:7001}),OwnerTransactionManager=ServerTM[ServerCoord
inatorDescriptor=(CoordinatorURL=myserver+127.0.0.2:7001+mydomain+, Resources={})],Coordi
natorURL=myserver+127.0.0.2:7001+mydomain+): javax.transaction.HeuristicMixedException: (
weblogic.jdbc.jts.Connection, HeuristicHazard, (javax.transaction.xa.XAException: Keine w
eiteren Daten aus Socket zu lesen))
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTrans
actionImpl.java:237)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionIm
pl.java:190)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
at com.entory.bondserver.server.facade.BondServerAdminServerBean_jb10eq_EOImpl.ch
angeBondTx(BondServerAdminServerBean_jb10eq_EOImpl.java:1521)
at com.entory.bondserver.server.facade.BondServerAdminServerBean.changeBond(BondS
erverAdminServerBean.java:306)
I would much appreciate some help 8-)
cheers,
Jochen
Discussions
EJB programming & troubleshooting: Weblogic 6.1 Heuristic Mixed Exception if database commit failes
-
Weblogic 6.1 Heuristic Mixed Exception if database commit failes (3 messages)
- Posted by: Jochen Kohler
- Posted on: July 18 2003 05:31 EDT
Threaded Messages (3)
- Weblogic 6.1 Heuristic Mixed Exception if database commit failes by Sean Sullivan on July 19 2003 18:43 EDT
- Weblogic 6.1 Heuristic Mixed Exception if database commit failes by Jochen Kohler on July 21 2003 04:45 EDT
- Solved: Weblogic 6.1 Heuristic Mixed Exception if database commi by Jochen Kohler on July 21 2003 11:06 EDT
- Weblogic 6.1 Heuristic Mixed Exception if database commit failes by Jochen Kohler on July 21 2003 04:45 EDT
-
Weblogic 6.1 Heuristic Mixed Exception if database commit failes[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: July 19 2003 18:43 EDT
- in response to Jochen Kohler
Are you using Oracle's JDBC driver?
Or are you using BEA's Oracle JDBC driver?
Did you read this FAQ?
http://edocs.bea.com/wls/docs61/faq/JTA.html -
Weblogic 6.1 Heuristic Mixed Exception if database commit failes[ Go to top ]
- Posted by: Jochen Kohler
- Posted on: July 21 2003 04:45 EDT
- in response to Sean Sullivan
Hi Sean,
we're using Oracle JDBC Thin Driver (V8.1.7).
I've partially read this FAQ, but to be honest, I don't fully understand it. I found the comment, which says that 8.1.6 driver has a bug, and "we" (bea?) build a workaround for 8.1.7 which could be avoided by using XA Connection pool.
But we don't use distributed transactions explicitly. As described in example, we just amend some values in the entity bean, and ensure that the changes could not be committed to the database. From my point of view, the resources involved, are the database and the entity cache of the ejb container, so I don't know what could be wrong. -
Solved: Weblogic 6.1 Heuristic Mixed Exception if database commi[ Go to top ]
- Posted by: Jochen Kohler
- Posted on: July 21 2003 11:06 EDT
- in response to Jochen Kohler
we just found the cause of the problem.
We had set <delay-updates-until-end-of-tx>true</delay-updates-until-end-of-tx> in weblogic-ejb-jar.xml for this entity bean.
Setting this parameter to false (which is the default value) solves the problem.
Why this results in an HeuristicMixedException is not really clear to me, but I'm glad it works now.
Thanks a lot for your help anyway !
Btw.: If there is anyone with an explanation for this behavior, I'd really appreciate to hear it 8-).