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
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...
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.