|
Home > Archive > SQL Server JDBC > April 2005 > Microsoft JDBC Driver XA Problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Microsoft JDBC Driver XA Problem
|
|
| Jay Shen 2005-04-11, 7:23 am |
| Hi,
I have applied XA support via the dll and script...but now I got the
following error. Anyone can point me a direction to fix this?
Thanks,
j-
20:44:06 [tyrex.resource.n3-db] [main] [transaction server is recovering] []
[] ERROR - Failed to create connection for default user
java.sql.SQLException: [Microsoft][SQLServe
r 2000 Driver for
JDBC][SQLServer]xa_o
pen (0) returns -3
at com.microsoft.jdbc.base.BaseExceptions. createException(Unkn
own
Source)
at com.microsoft.jdbc.base.BaseExceptions. getException(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest. processErrorToken(Un
known
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest. processReplyToken(Un
known
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest. processReplyToken(Un
known
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest. processReply(Unknown
Source)
at
com.microsoft.jdbc.sqlserver. SQLServerImplStateme
nt. getNextResultType(Un
known
Source)
at
com.microsoft.jdbc.base.BaseStatement. commonTransitionToSt
ate(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement. postImplExecute(Unkn
own
Source)
at
com.microsoft.jdbc.base. BasePreparedStatemen
t. postImplExecute(Unkn
own
Source)
at com.microsoft.jdbc.base.BaseStatement. commonExecute(Unknow
n
Source)
at
com.microsoft.jdbc.base.BaseStatement. executeUpdateInterna
l(Unknown Source)
at
com.microsoft.jdbc.base. BasePreparedStatemen
t. executeUpdate(Unknow
n Source)
at
com.microsoft.jdbcx.sqlserver. SQLServerImplXAResou
rce. executeXaRpc(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver. SQLServerImplXAResou
rce. executeXaRpc(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver. SQLServerImplXAResou
rce.open(Unknown Source)
at com.microsoft.jdbcx.base.BaseXAConnection.<init>(Unknown Source)
at com.microsoft.jdbcx.base.BaseXADataSource. getXAConnection(Unkn
own
Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerDataSource. getXAConnection(Unkn
own
Source)
at
tyrex.resource.jdbc.ConnectionPool. createPooledConnecti
on(ConnectionPool.java:841)
at
tyrex.resource.jdbc.ConnectionPool. completeInit(Connect
ionPool.java:256)
at
tyrex.resource.jdbc.ConnectionPool.<init>(ConnectionPool.java:222)
at
tyrex.resource.jdbc.DataSourceConfig. createResource_(Data
SourceConfig.java:237)
at
tyrex.resource.ResourceConfig. createResource(Resou
rceConfig.java:390)
at tyrex.resource.Resources. getResource(Resource
s.java:235)
at
tyrex.tm.impl. TransactionServerImp
l. recover(TransactionS
erverImpl.java:582)
at
com.intalio.n3.common.tyrex.TyrexModule. initialize(TyrexModu
le.java:130)
at
com.intalio.n3.common.module.ModulesManager. initializeModule(Mod
ulesManager.java:373)
at
com.intalio.n3.common.module.ModulesManager. initializeAllModules
(ModulesManager.java:263)
at com.intalio.n3.Main.start(Main.java:454)
at com.intalio.n3.Main.main(Main.java:239)
20:44:09 [tyrex.resource.n3-db] [main] [null] [] [] ERROR - Failed to create
connection for default user java.sql.SQLException: [Microsoft][SQLServe
r
2000 Driver for JDBC][SQLServer]xa_o
pen (0) returns -3
at com.microsoft.jdbc.base.BaseExceptions. createException(Unkn
own
Source)
at com.microsoft.jdbc.base.BaseExceptions. getException(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest. processErrorToken(Un
known
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest. processReplyToken(Un
known
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest. processReplyToken(Un
known
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest. processReply(Unknown
Source)
at
com.microsoft.jdbc.sqlserver. SQLServerImplStateme
nt. getNextResultType(Un
known
Source)
at
com.microsoft.jdbc.base.BaseStatement. commonTransitionToSt
ate(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement. postImplExecute(Unkn
own
Source)
at
com.microsoft.jdbc.base. BasePreparedStatemen
t. postImplExecute(Unkn
own
Source)
at com.microsoft.jdbc.base.BaseStatement. commonExecute(Unknow
n
Source)
at
com.microsoft.jdbc.base.BaseStatement. executeUpdateInterna
l(Unknown Source)
at
com.microsoft.jdbc.base. BasePreparedStatemen
t. executeUpdate(Unknow
n Source)
at
com.microsoft.jdbcx.sqlserver. SQLServerImplXAResou
rce. executeXaRpc(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver. SQLServerImplXAResou
rce. executeXaRpc(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver. SQLServerImplXAResou
rce.open(Unknown Source)
at com.microsoft.jdbcx.base.BaseXAConnection.<init>(Unknown Source)
at com.microsoft.jdbcx.base.BaseXADataSource. getXAConnection(Unkn
own
Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerDataSource. getXAConnection(Unkn
own
Source)
at
tyrex.resource.jdbc.ConnectionPool. createPooledConnecti
on(ConnectionPool.java:841)
at
tyrex.resource.jdbc.ConnectionPool. completeInit(Connect
ionPool.java:256)
at
tyrex.resource.jdbc.ConnectionPool.<init>(ConnectionPool.java:222)
at
tyrex.resource.jdbc.DataSourceConfig. createResource_(Data
SourceConfig.java:237)
at
tyrex.resource.ResourceConfig. createResource(Resou
rceConfig.java:390)
at tyrex.resource.Resources. getResource(Resource
s.java:235)
at
tyrex.tm.impl. TransactionServerImp
l. recover(TransactionS
erverImpl.java:626)
at
com.intalio.n3.common.tyrex.TyrexModule. initialize(TyrexModu
le.java:130)
at
com.intalio.n3.common.module.ModulesManager. initializeModule(Mod
ulesManager.java:373)
at
com.intalio.n3.common.module.ModulesManager. initializeAllModules
(ModulesManager.java:263)
at com.intalio.n3.Main.start(Main.java:454)
at com.intalio.n3.Main.main(Main.java:239)
20:44:10 [n3.common.module] [main] [null] [] [] WARN - Failed the initialize
module 'TransactionManager'
20:44:10 [n3.common.module] [main] [null] [] [] FATAL - ModulesManager
tyrex.resource.ResourceException: java.sql.SQLException:
[Microsoft][SQLServe
r 2000 Driver for JDBC][SQLServer]xa_o
pen (0) returns -3
at
tyrex.resource.jdbc.ConnectionPool.<init>(ConnectionPool.java:225)
at
tyrex.resource.jdbc.DataSourceConfig. createResource_(Data
SourceConfig.java:237)
at
tyrex.resource.ResourceConfig. createResource(Resou
rceConfig.java:390)
at tyrex.resource.Resources. getResource(Resource
s.java:235)
at
tyrex.tm.impl. TransactionServerImp
l. recover(TransactionS
erverImpl.java:582)
at
com.intalio.n3.common.tyrex.TyrexModule. initialize(TyrexModu
le.java:130)
at
com.intalio.n3.common.module.ModulesManager. initializeModule(Mod
ulesManager.java:373)
at
com.intalio.n3.common.module.ModulesManager. initializeAllModules
(ModulesManager.java:263)
at com.intalio.n3.Main.start(Main.java:454)
at com.intalio.n3.Main.main(Main.java:239)
| |
| Manfred Rosenboom 2005-04-11, 7:23 am |
| Jay Shen wrote:
> Hi,
>
> I have applied XA support via the dll and script...but now I got the
> following error. Anyone can point me a direction to fix this?
> Thanks,
>
> j-
>
> 20:44:06 [tyrex.resource.n3-db] [main] [transaction server is recovering] []
> [] ERROR - Failed to create connection for default user
> java.sql.SQLException: [Microsoft][SQLServe
r 2000 Driver for
> JDBC][SQLServer]xa_o
pen (0) returns -3
> at com.microsoft.jdbc.base.BaseExceptions. createException(Unkn
own
Hi Jay,
Seems, that you haven't started the DTC (Distributed Transaction
Coordinator) service. This service is installed during the
MS SQL Server 2000 installation but with start type 'manual'.
BTW: which user do you use to connetc to the database ? If you don't
use sa (which would be a good idea) have in mind, that XA recovery is
only allowed for a system administrator. To allow all users to perform
XA recovery, you have to add the EXEC permission to PUBLIC for the
stored procedure xp_jdbc_recover (part of extended stored procedures) in
the master database.
Best,
Manfred
| |
| Jay Shen 2005-04-11, 8:23 pm |
| Thanks a lot, Manfred.
I did apply the suggestion to grant the rights. But for some reason, I am
still getting the same errors...weird...
"Manfred Rosenboom" <marochess@gmx.de> wrote in message
news:d3dpcu$d6c$1@nn
tp.fujitsu-siemens.com...
> Jay Shen wrote:
> Hi Jay,
>
> Seems, that you haven't started the DTC (Distributed Transaction
> Coordinator) service. This service is installed during the
> MS SQL Server 2000 installation but with start type 'manual'.
>
> BTW: which user do you use to connetc to the database ? If you don't
> use sa (which would be a good idea) have in mind, that XA recovery is
> only allowed for a system administrator. To allow all users to perform
> XA recovery, you have to add the EXEC permission to PUBLIC for the stored
> procedure xp_jdbc_recover (part of extended stored procedures) in the
> master database.
>
> Best,
> Manfred
| |
| Carb Simien [MSFT] 2005-04-12, 8:23 pm |
|
--------------------
| From: "Jay Shen" <jay_shen@msn.com>
| References: <eGLZClkPFHA.248@TK2MSFTNGP15.phx.gbl>
<d3dpcu$d6c$1@nntp.fujitsu-siemens.com>
| Subject: Re: Microsoft JDBC Driver XA Problem
| Date: Mon, 11 Apr 2005 14:13:59 -0700
| Lines: 38
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Response
| Message-ID: <eTZJittPFHA.4004@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: adsl-67-113-30-33.snfc21.pacbell.net 67.113.30.33
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.jdbcdriver:1029
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| Thanks a lot, Manfred.
|
| I did apply the suggestion to grant the rights. But for some reason, I am
| still getting the same errors...weird...
|
| "Manfred Rosenboom" <marochess@gmx.de> wrote in message
| news:d3dpcu$d6c$1@nn
tp.fujitsu-siemens.com...
| > Jay Shen wrote:
| >> Hi,
| >>
| >> I have applied XA support via the dll and script...but now I got the
| >> following error. Anyone can point me a direction to fix this?
| >> Thanks,
| >>
| >> j-
| >>
| >> 20:44:06 [tyrex.resource.n3-db] [main] [transaction server is
recovering]
| >> [] [] ERROR - Failed to create connection for default user
| >> java.sql.SQLException: [Microsoft][SQLServe
r 2000 Driver for
| >> JDBC][SQLServer]xa_o
pen (0) returns -3
| >> at
com.microsoft.jdbc.base.BaseExceptions. createException(Unkn
own
| > Hi Jay,
| >
| > Seems, that you haven't started the DTC (Distributed Transaction
| > Coordinator) service. This service is installed during the
| > MS SQL Server 2000 installation but with start type 'manual'.
| >
| > BTW: which user do you use to connetc to the database ? If you don't
| > use sa (which would be a good idea) have in mind, that XA recovery is
| > only allowed for a system administrator. To allow all users to perform
| > XA recovery, you have to add the EXEC permission to PUBLIC for the
stored
| > procedure xp_jdbc_recover (part of extended stored procedures) in the
| > master database.
| >
| > Best,
| > Manfred
|
|
|
Are you using the sqljdbc.dll and driver .jar files that come with JDBC
SP3? Did you test with the actual SA account and see the same problem?
You can capture a SQL Profiler trace (with all Errors and Warnings events
and all data columns) and see if you are truly getting a permissions issue
on the execution of the extended stored procedures.
Aside from that, ensure that MSDTC is started and that XA is enabled.
Check the registry key HKLM\Software\Micros
oft\MSDTC\Security. The Value
name is XATransactions, and it is a REG_DWORD value. A value of 0 means XA
transactions are disabled. A non-zero value means they are enabled. If
you have to change this from 0 to 1, restart the SQL Server service and
MSDTC service.
If the above information does not resolve the issue, post the Java code and
table definition that you use to reproduce the problem.
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
|
|
|
|
|