Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XA error in Beta 2 driver

0 views
Skip to first unread message

Craig Cunningham

unread,
Sep 29, 2005, 4:30:02 PM9/29/05
to
I'm test driver on WebLogic 8.1 SP4 on a Windows platform accessing a SQL 2005
server running on a 64 bit platform. When I deploy simple test app I get
the following error (the error message is not complete and the beta
documentation does not yet have an error section):

Unable to deploy EJB: Cec2EntityBean from mbstest2EJB.jar:
Unexpected exception while enlisting XAConnection java.sql.SQLException: XA
error: XA_OK start() failed on resource 'MSSQL2005': XA_O
javax.transaction.xa.XAException: java.sql.SQLException:
DTC_XA_START:Status:0 msg:*** SQLJDBC_XA DTC_ERROR Context: xa_start,
state=1, StatusCode:0 (0x00000000) ***
at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Unknown Source)
at weblogic.jdbc.jta.DataSource.start(DataSource.java:629)
at
weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1140)
at
weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1072)
at
weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:240)
at
weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:463)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1392)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1334)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:396)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:354)
at
weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)

... the rest of the message is omitted.

Any explaination of the error, and what I might do to fix it, would be
appreciated.

Thanks
Craig

Joe Weinstein

unread,
Sep 29, 2005, 4:48:36 PM9/29/05
to

Hi. I don't know but I'll forward
this to some who might.
Joe Weinstein at BEA

Matt Neerincx [MSFT]

unread,
Sep 29, 2005, 6:30:22 PM9/29/05
to
Hi Craig,

If you see the error "xa_start, state=1" this means the initialization of
the XA transaction manager failed completely right at the beginning of the
first call into the XA procedure on the SQL Server side.
So for example the you could have the MSDTC service (Distributed Transaction
Coordinator service) disabled or not running. Also, you may not have XA
transactions enabled for MSDTC, I found this can also cause this error.

So what you need to do is go to the machine that is running SQL Server (the
64-bit machine you mentioned) and go to Control Panel | Adminstrative Tools
| Component Services applet, then drill down to "My Computer", right click
and pull up the property sheet for My Computer.

You should see an MSDTC tab, click this tab and then click on the "Security
Configuration" button and verify that "Enable XA Transactions" checkbox is
checked. This is the bare minimum that needs to be enabled for MSDTC I
found.

After you check this, stop and restart MSDTC service, then you will also
need to stop and restart the SQL Server service.

VIP NOTE! You must always insure that the MSDTC service is started before
starting SQL Server. If SQL Server cannot register with MSDTC during startup
then the SQL 2005 JDBC driver XA support will not work.


--
Matt Neerincx [MSFT]


This posting is provided "AS IS", with no warranties, and confers no rights.

Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

"Joe Weinstein" <joeN...@bea.com> wrote in message
news:433C5324...@bea.com...

Craig Cunningham

unread,
Sep 29, 2005, 6:56:02 PM9/29/05
to
Hi Matt

Thanks for the help. It was stupid of me not to look to see if the DTC was
setup correctly. I had assumed if I could issue a query like

BEGIN DISTRIBUTED TRANSACTION
SELECT * FROM sometable
COMMIT

from the management studio I was in business. You reminded me that a
distributed transaction is not always an XA transaction.

0 new messages