Problem doing one phase commit with JConnect 5.2

Problem doing one phase commit with JConnect 5.2

Post by Bala Du » Fri, 05 Oct 2001 23:29:38

    I was using JConnect 5.2 to connect to sybase server 12.0. I was
able to commit a transaction with two phase commit. But same thing
when i tried with single phase commit it failed. Following is part of
the code,

                   ds = new com.sybase.jdbc2.jdbc.SybXADataSource();
                   ds.setResourceManagerType(2); // 2 for 12.x; 1 for

                   xacon =ds.getXAConnection();
                   xares = xacon.getXAResource();
                   xares.start(xid, XAResource.TMNOFLAGS);
                   java.sql.Connection con=xacon.getConnection();

                   Statement stmt=con.createStatement();
                   int i = stmt.executeUpdate("insert into test_table

I get an XAException on commit(last but one line), with error code -6

The exact stack trace is,
       at com.sybase.jdbc2.jdbc.SybXAResource.verifyReturnCode(
        at com.sybase.jdbc2.jdbc.SybXAResource.sendRPC(
        at com.sybase.jdbc2.jdbc.SybXAResource.sendRPC(
        at com.sybase.jdbc2.jdbc.SybXAResource.prepare(
        at ConnTest.test1(
        at ConnTest.main(

Note that this works absolutely fine when i use 2pc, i.e. replace last
but one line with

Can anyone help me?

Thanks and regards,
Bala Dutt


1. jConnect 5.2: Locales for OSG


I am running Sybase SQL Anywhere 5.5 (maintenance release 5.5.4.) with
Open Server Gateway on Windows NT 4.0 (German).
Only the english locales were installed with the gateway
(SYBASE_HOME\locales\) and I could not figure out where to find the
German ones.

When I connect to the database using jConnect 5.2, OSG issues the error
"CS library error: 33620270/1/0: cs_locale: cslib user api layer:
external error: Can not access localization file
... Error Code #16323, Severity 10 CS error :Could not load localization
information for character set <NULL> language german"



2. Help: 9i multi cache buffer

3. jConnect 5.2 and LOCK TABLE command

4. No TimeSeries Datablade module for Linux?

5. Two phase commit between Oracle8i and MSSQL 7.0 Problem

6. 3704 RunTime Errors

7. JTA (2-phase commit) problem: XAER_RMERR

8. harddisk upgrade

9. two phase commit problem

10. Problem with 2-phase commit service

11. sybase/redhat linux 5.2 install problem- port 7100 definition - sybase-problem.doc (0/1)

12. 2 phase commit or similar solution

13. two phase commit