You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2006/01/31 21:22:33 UTC
[jira] Created: (DERBY-899) Cannot rollback to savepoint when using
ClientXADataSource
Cannot rollback to savepoint when using ClientXADataSource
----------------------------------------------------------
Key: DERBY-899
URL: http://issues.apache.org/jira/browse/DERBY-899
Project: Derby
Type: Bug
Components: Network Client, Network Server
Versions: 10.1.1.0, 10.1.1.1
Reporter: Kathey Marsden
Fix For: 10.2.0.0
save points don't seem to be working with DerbyClient using
XA.
levels i am on:
10.1.2.2
Apache Derby
Exception thrown is:
Exception in thread "main"
org.apache.derby.client.am.SqlException: SAVEPOINT, MyPoint
does not exist or is not active in the current transaction.
at org.apache.derby.client.am.Statement.completeSqlca(Unknown
Source)
at
org.apache.derby.client.am.Statement.completeExecuteImmediate(Un
known Source)
at
org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMrepl
y(Unknown Source)
at
org.apache.derby.client.net.NetStatementReply.readExecuteImmedia
te(Unknown Source)
at
org.apache.derby.client.net.StatementReply.readExecuteImmediate(
Unknown Source)
at
org.apache.derby.client.net.NetStatement.readExecuteImmediate_(U
nknown Source)
at
org.apache.derby.client.am.Statement.readExecuteImmediate(Unknow
n Source)
at org.apache.derby.client.am.Statement.flowExecute(Unknown
Source)
at org.apache.derby.client.am.Statement.executeX(Unknown
Source)
at org.apache.derby.client.am.Connection.rollback(Unknown
Source)
at
org.apache.derby.client.am.LogicalConnection.rollback(Unknown
Source)
at
Derby.networkServer.NSConnection.main(NSConnection.java:103)
Test case below
class SavePointProblem337977
{
public static void main (String args [])throws Exception {
//org.apache.derby.jdbc.ClientConnectionPoolDataSource ds
= new org.apache.derby.jdbc.ClientConnectionPoolDataSource();
org.apache.derby.jdbc.ClientXADataSource ds = new
org.apache.derby.jdbc.ClientXADataSource();
Connection conn = null;
ds.setDatabaseName("e:\\temp\\sampl127;create=true");
XAConnection xaCon = ds.getXAConnection() ;
//PooledConnection xaCon = ds.getPooledConnection() ;
conn = xaCon.getConnection();
DatabaseMetaData md = conn.getMetaData() ;
System.out.println(md.getDatabaseProductVersion());
System.out.println(md.getDatabaseProductName());
Statement st = null;
PreparedStatement ps1 = null;
try
{
st = conn.createStatement ();
try
{
st.executeUpdate ("drop table TAB1");
}catch (SQLException x)
{
System.out.println ("no table exists");
}
ps1 = conn.prepareStatement("CREATE TABLE
TAB1(COL1 INT NOT NULL)");
ps1.executeUpdate();
conn.commit ();
} catch (SQLException x)
{
System.out.println ("table already exists");
}
conn.setAutoCommit(false);
conn.createStatement().execute("update tab1 set col1 =
-1 where col1 = 9");
Savepoint savepoint1 = conn.setSavepoint("MyPoint");
conn.rollback(savepoint1);
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-899) Cannot rollback to savepoint when using
ClientXADataSource
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-899?page=all ]
Kathey Marsden updated DERBY-899:
---------------------------------
Fix Version: 10.1.3.0
10.1.2.3
Description:
>From a user using client XA.
save points don't seem to be working with DerbyClient using
XA.
levels i am on:
10.1.2.2
Apache Derby
Exception thrown is:
Exception in thread "main"
org.apache.derby.client.am.SqlException: SAVEPOINT, MyPoint
does not exist or is not active in the current transaction.
at org.apache.derby.client.am.Statement.completeSqlca(Unknown
Source)
at
org.apache.derby.client.am.Statement.completeExecuteImmediate(Un
known Source)
at
org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMrepl
y(Unknown Source)
at
org.apache.derby.client.net.NetStatementReply.readExecuteImmedia
te(Unknown Source)
at
org.apache.derby.client.net.StatementReply.readExecuteImmediate(
Unknown Source)
at
org.apache.derby.client.net.NetStatement.readExecuteImmediate_(U
nknown Source)
at
org.apache.derby.client.am.Statement.readExecuteImmediate(Unknow
n Source)
at org.apache.derby.client.am.Statement.flowExecute(Unknown
Source)
at org.apache.derby.client.am.Statement.executeX(Unknown
Source)
at org.apache.derby.client.am.Connection.rollback(Unknown
Source)
at
org.apache.derby.client.am.LogicalConnection.rollback(Unknown
Source)
at
Derby.networkServer.NSConnection.main(NSConnection.java:103)
Test case below
class SavePointProblem337977
{
public static void main (String args [])throws Exception {
//org.apache.derby.jdbc.ClientConnectionPoolDataSource ds
= new org.apache.derby.jdbc.ClientConnectionPoolDataSource();
org.apache.derby.jdbc.ClientXADataSource ds = new
org.apache.derby.jdbc.ClientXADataSource();
Connection conn = null;
ds.setDatabaseName("e:\\temp\\sampl127;create=true");
XAConnection xaCon = ds.getXAConnection() ;
//PooledConnection xaCon = ds.getPooledConnection() ;
conn = xaCon.getConnection();
DatabaseMetaData md = conn.getMetaData() ;
System.out.println(md.getDatabaseProductVersion());
System.out.println(md.getDatabaseProductName());
Statement st = null;
PreparedStatement ps1 = null;
try
{
st = conn.createStatement ();
try
{
st.executeUpdate ("drop table TAB1");
}catch (SQLException x)
{
System.out.println ("no table exists");
}
ps1 = conn.prepareStatement("CREATE TABLE
TAB1(COL1 INT NOT NULL)");
ps1.executeUpdate();
conn.commit ();
} catch (SQLException x)
{
System.out.println ("table already exists");
}
conn.setAutoCommit(false);
conn.createStatement().execute("update tab1 set col1 =
-1 where col1 = 9");
Savepoint savepoint1 = conn.setSavepoint("MyPoint");
conn.rollback(savepoint1);
}
}
was:
save points don't seem to be working with DerbyClient using
XA.
levels i am on:
10.1.2.2
Apache Derby
Exception thrown is:
Exception in thread "main"
org.apache.derby.client.am.SqlException: SAVEPOINT, MyPoint
does not exist or is not active in the current transaction.
at org.apache.derby.client.am.Statement.completeSqlca(Unknown
Source)
at
org.apache.derby.client.am.Statement.completeExecuteImmediate(Un
known Source)
at
org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMrepl
y(Unknown Source)
at
org.apache.derby.client.net.NetStatementReply.readExecuteImmedia
te(Unknown Source)
at
org.apache.derby.client.net.StatementReply.readExecuteImmediate(
Unknown Source)
at
org.apache.derby.client.net.NetStatement.readExecuteImmediate_(U
nknown Source)
at
org.apache.derby.client.am.Statement.readExecuteImmediate(Unknow
n Source)
at org.apache.derby.client.am.Statement.flowExecute(Unknown
Source)
at org.apache.derby.client.am.Statement.executeX(Unknown
Source)
at org.apache.derby.client.am.Connection.rollback(Unknown
Source)
at
org.apache.derby.client.am.LogicalConnection.rollback(Unknown
Source)
at
Derby.networkServer.NSConnection.main(NSConnection.java:103)
Test case below
class SavePointProblem337977
{
public static void main (String args [])throws Exception {
//org.apache.derby.jdbc.ClientConnectionPoolDataSource ds
= new org.apache.derby.jdbc.ClientConnectionPoolDataSource();
org.apache.derby.jdbc.ClientXADataSource ds = new
org.apache.derby.jdbc.ClientXADataSource();
Connection conn = null;
ds.setDatabaseName("e:\\temp\\sampl127;create=true");
XAConnection xaCon = ds.getXAConnection() ;
//PooledConnection xaCon = ds.getPooledConnection() ;
conn = xaCon.getConnection();
DatabaseMetaData md = conn.getMetaData() ;
System.out.println(md.getDatabaseProductVersion());
System.out.println(md.getDatabaseProductName());
Statement st = null;
PreparedStatement ps1 = null;
try
{
st = conn.createStatement ();
try
{
st.executeUpdate ("drop table TAB1");
}catch (SQLException x)
{
System.out.println ("no table exists");
}
ps1 = conn.prepareStatement("CREATE TABLE
TAB1(COL1 INT NOT NULL)");
ps1.executeUpdate();
conn.commit ();
} catch (SQLException x)
{
System.out.println ("table already exists");
}
conn.setAutoCommit(false);
conn.createStatement().execute("update tab1 set col1 =
-1 where col1 = 9");
Savepoint savepoint1 = conn.setSavepoint("MyPoint");
conn.rollback(savepoint1);
}
}
I have not actually looked at this issue yet but am keen to get it fixed quickly in 10.1. I plan to look it at right after DERBY-898. Any input is appreciated.
> Cannot rollback to savepoint when using ClientXADataSource
> ----------------------------------------------------------
>
> Key: DERBY-899
> URL: http://issues.apache.org/jira/browse/DERBY-899
> Project: Derby
> Type: Bug
> Components: Network Client, Network Server
> Versions: 10.1.1.0, 10.1.1.1
> Reporter: Kathey Marsden
> Fix For: 10.2.0.0, 10.1.3.0, 10.1.2.3
>
> From a user using client XA.
> save points don't seem to be working with DerbyClient using
> XA.
> levels i am on:
> 10.1.2.2
> Apache Derby
> Exception thrown is:
> Exception in thread "main"
> org.apache.derby.client.am.SqlException: SAVEPOINT, MyPoint
> does not exist or is not active in the current transaction.
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown
> Source)
> at
> org.apache.derby.client.am.Statement.completeExecuteImmediate(Un
> known Source)
> at
> org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMrepl
> y(Unknown Source)
> at
> org.apache.derby.client.net.NetStatementReply.readExecuteImmedia
> te(Unknown Source)
> at
> org.apache.derby.client.net.StatementReply.readExecuteImmediate(
> Unknown Source)
> at
> org.apache.derby.client.net.NetStatement.readExecuteImmediate_(U
> nknown Source)
> at
> org.apache.derby.client.am.Statement.readExecuteImmediate(Unknow
> n Source)
> at org.apache.derby.client.am.Statement.flowExecute(Unknown
> Source)
> at org.apache.derby.client.am.Statement.executeX(Unknown
> Source)
> at org.apache.derby.client.am.Connection.rollback(Unknown
> Source)
> at
> org.apache.derby.client.am.LogicalConnection.rollback(Unknown
> Source)
> at
> Derby.networkServer.NSConnection.main(NSConnection.java:103)
> Test case below
> class SavePointProblem337977
> {
>
> public static void main (String args [])throws Exception {
> //org.apache.derby.jdbc.ClientConnectionPoolDataSource ds
> = new org.apache.derby.jdbc.ClientConnectionPoolDataSource();
> org.apache.derby.jdbc.ClientXADataSource ds = new
> org.apache.derby.jdbc.ClientXADataSource();
>
> Connection conn = null;
> ds.setDatabaseName("e:\\temp\\sampl127;create=true");
> XAConnection xaCon = ds.getXAConnection() ;
> //PooledConnection xaCon = ds.getPooledConnection() ;
>
>
> conn = xaCon.getConnection();
>
>
> DatabaseMetaData md = conn.getMetaData() ;
> System.out.println(md.getDatabaseProductVersion());
> System.out.println(md.getDatabaseProductName());
> Statement st = null;
> PreparedStatement ps1 = null;
> try
> {
> st = conn.createStatement ();
> try
> {
> st.executeUpdate ("drop table TAB1");
> }catch (SQLException x)
> {
> System.out.println ("no table exists");
> }
>
> ps1 = conn.prepareStatement("CREATE TABLE
> TAB1(COL1 INT NOT NULL)");
> ps1.executeUpdate();
> conn.commit ();
> } catch (SQLException x)
> {
> System.out.println ("table already exists");
> }
>
>
> conn.setAutoCommit(false);
> conn.createStatement().execute("update tab1 set col1 =
> -1 where col1 = 9");
> Savepoint savepoint1 = conn.setSavepoint("MyPoint");
> conn.rollback(savepoint1);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-899) Cannot rollback to savepoint when
using ClientXADataSource
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-899?page=comments#action_12364833 ]
Kathey Marsden commented on DERBY-899:
--------------------------------------
This issue actually seems to be the same issue as DERBY-899. It does not occur with my DERBY-898 fix.
> Cannot rollback to savepoint when using ClientXADataSource
> ----------------------------------------------------------
>
> Key: DERBY-899
> URL: http://issues.apache.org/jira/browse/DERBY-899
> Project: Derby
> Type: Bug
> Components: Network Client, Network Server
> Versions: 10.1.1.0, 10.1.1.1
> Reporter: Kathey Marsden
> Assignee: Kathey Marsden
> Fix For: 10.2.0.0, 10.1.3.0, 10.1.2.3
>
> From a user using client XA.
> save points don't seem to be working with DerbyClient using
> XA.
> levels i am on:
> 10.1.2.2
> Apache Derby
> Exception thrown is:
> Exception in thread "main"
> org.apache.derby.client.am.SqlException: SAVEPOINT, MyPoint
> does not exist or is not active in the current transaction.
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown
> Source)
> at
> org.apache.derby.client.am.Statement.completeExecuteImmediate(Un
> known Source)
> at
> org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMrepl
> y(Unknown Source)
> at
> org.apache.derby.client.net.NetStatementReply.readExecuteImmedia
> te(Unknown Source)
> at
> org.apache.derby.client.net.StatementReply.readExecuteImmediate(
> Unknown Source)
> at
> org.apache.derby.client.net.NetStatement.readExecuteImmediate_(U
> nknown Source)
> at
> org.apache.derby.client.am.Statement.readExecuteImmediate(Unknow
> n Source)
> at org.apache.derby.client.am.Statement.flowExecute(Unknown
> Source)
> at org.apache.derby.client.am.Statement.executeX(Unknown
> Source)
> at org.apache.derby.client.am.Connection.rollback(Unknown
> Source)
> at
> org.apache.derby.client.am.LogicalConnection.rollback(Unknown
> Source)
> at
> Derby.networkServer.NSConnection.main(NSConnection.java:103)
> Test case below
> class SavePointProblem337977
> {
>
> public static void main (String args [])throws Exception {
> //org.apache.derby.jdbc.ClientConnectionPoolDataSource ds
> = new org.apache.derby.jdbc.ClientConnectionPoolDataSource();
> org.apache.derby.jdbc.ClientXADataSource ds = new
> org.apache.derby.jdbc.ClientXADataSource();
>
> Connection conn = null;
> ds.setDatabaseName("e:\\temp\\sampl127;create=true");
> XAConnection xaCon = ds.getXAConnection() ;
> //PooledConnection xaCon = ds.getPooledConnection() ;
>
>
> conn = xaCon.getConnection();
>
>
> DatabaseMetaData md = conn.getMetaData() ;
> System.out.println(md.getDatabaseProductVersion());
> System.out.println(md.getDatabaseProductName());
> Statement st = null;
> PreparedStatement ps1 = null;
> try
> {
> st = conn.createStatement ();
> try
> {
> st.executeUpdate ("drop table TAB1");
> }catch (SQLException x)
> {
> System.out.println ("no table exists");
> }
>
> ps1 = conn.prepareStatement("CREATE TABLE
> TAB1(COL1 INT NOT NULL)");
> ps1.executeUpdate();
> conn.commit ();
> } catch (SQLException x)
> {
> System.out.println ("table already exists");
> }
>
>
> conn.setAutoCommit(false);
> conn.createStatement().execute("update tab1 set col1 =
> -1 where col1 = 9");
> Savepoint savepoint1 = conn.setSavepoint("MyPoint");
> conn.rollback(savepoint1);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-899) Cannot rollback to savepoint when using
ClientXADataSource
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-899?page=all ]
Kathey Marsden closed DERBY-899:
--------------------------------
> Cannot rollback to savepoint when using ClientXADataSource
> ----------------------------------------------------------
>
> Key: DERBY-899
> URL: http://issues.apache.org/jira/browse/DERBY-899
> Project: Derby
> Type: Bug
> Components: Network Client, Network Server
> Versions: 10.1.1.0, 10.1.1.1
> Reporter: Kathey Marsden
> Assignee: Kathey Marsden
> Fix For: 10.2.0.0, 10.1.3.0, 10.1.2.3
>
> From a user using client XA.
> save points don't seem to be working with DerbyClient using
> XA.
> levels i am on:
> 10.1.2.2
> Apache Derby
> Exception thrown is:
> Exception in thread "main"
> org.apache.derby.client.am.SqlException: SAVEPOINT, MyPoint
> does not exist or is not active in the current transaction.
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown
> Source)
> at
> org.apache.derby.client.am.Statement.completeExecuteImmediate(Un
> known Source)
> at
> org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMrepl
> y(Unknown Source)
> at
> org.apache.derby.client.net.NetStatementReply.readExecuteImmedia
> te(Unknown Source)
> at
> org.apache.derby.client.net.StatementReply.readExecuteImmediate(
> Unknown Source)
> at
> org.apache.derby.client.net.NetStatement.readExecuteImmediate_(U
> nknown Source)
> at
> org.apache.derby.client.am.Statement.readExecuteImmediate(Unknow
> n Source)
> at org.apache.derby.client.am.Statement.flowExecute(Unknown
> Source)
> at org.apache.derby.client.am.Statement.executeX(Unknown
> Source)
> at org.apache.derby.client.am.Connection.rollback(Unknown
> Source)
> at
> org.apache.derby.client.am.LogicalConnection.rollback(Unknown
> Source)
> at
> Derby.networkServer.NSConnection.main(NSConnection.java:103)
> Test case below
> class SavePointProblem337977
> {
>
> public static void main (String args [])throws Exception {
> //org.apache.derby.jdbc.ClientConnectionPoolDataSource ds
> = new org.apache.derby.jdbc.ClientConnectionPoolDataSource();
> org.apache.derby.jdbc.ClientXADataSource ds = new
> org.apache.derby.jdbc.ClientXADataSource();
>
> Connection conn = null;
> ds.setDatabaseName("e:\\temp\\sampl127;create=true");
> XAConnection xaCon = ds.getXAConnection() ;
> //PooledConnection xaCon = ds.getPooledConnection() ;
>
>
> conn = xaCon.getConnection();
>
>
> DatabaseMetaData md = conn.getMetaData() ;
> System.out.println(md.getDatabaseProductVersion());
> System.out.println(md.getDatabaseProductName());
> Statement st = null;
> PreparedStatement ps1 = null;
> try
> {
> st = conn.createStatement ();
> try
> {
> st.executeUpdate ("drop table TAB1");
> }catch (SQLException x)
> {
> System.out.println ("no table exists");
> }
>
> ps1 = conn.prepareStatement("CREATE TABLE
> TAB1(COL1 INT NOT NULL)");
> ps1.executeUpdate();
> conn.commit ();
> } catch (SQLException x)
> {
> System.out.println ("table already exists");
> }
>
>
> conn.setAutoCommit(false);
> conn.createStatement().execute("update tab1 set col1 =
> -1 where col1 = 9");
> Savepoint savepoint1 = conn.setSavepoint("MyPoint");
> conn.rollback(savepoint1);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (DERBY-899) Cannot rollback to savepoint when
using ClientXADataSource
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-899?page=all ]
Kathey Marsden resolved DERBY-899:
----------------------------------
Resolution: Duplicate
This is a duplicate of DERBY-898. Submitted a test with that issue to verify savepoint rollabck.
> Cannot rollback to savepoint when using ClientXADataSource
> ----------------------------------------------------------
>
> Key: DERBY-899
> URL: http://issues.apache.org/jira/browse/DERBY-899
> Project: Derby
> Type: Bug
> Components: Network Client, Network Server
> Versions: 10.1.1.0, 10.1.1.1
> Reporter: Kathey Marsden
> Assignee: Kathey Marsden
> Fix For: 10.2.0.0, 10.1.3.0, 10.1.2.3
>
> From a user using client XA.
> save points don't seem to be working with DerbyClient using
> XA.
> levels i am on:
> 10.1.2.2
> Apache Derby
> Exception thrown is:
> Exception in thread "main"
> org.apache.derby.client.am.SqlException: SAVEPOINT, MyPoint
> does not exist or is not active in the current transaction.
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown
> Source)
> at
> org.apache.derby.client.am.Statement.completeExecuteImmediate(Un
> known Source)
> at
> org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMrepl
> y(Unknown Source)
> at
> org.apache.derby.client.net.NetStatementReply.readExecuteImmedia
> te(Unknown Source)
> at
> org.apache.derby.client.net.StatementReply.readExecuteImmediate(
> Unknown Source)
> at
> org.apache.derby.client.net.NetStatement.readExecuteImmediate_(U
> nknown Source)
> at
> org.apache.derby.client.am.Statement.readExecuteImmediate(Unknow
> n Source)
> at org.apache.derby.client.am.Statement.flowExecute(Unknown
> Source)
> at org.apache.derby.client.am.Statement.executeX(Unknown
> Source)
> at org.apache.derby.client.am.Connection.rollback(Unknown
> Source)
> at
> org.apache.derby.client.am.LogicalConnection.rollback(Unknown
> Source)
> at
> Derby.networkServer.NSConnection.main(NSConnection.java:103)
> Test case below
> class SavePointProblem337977
> {
>
> public static void main (String args [])throws Exception {
> //org.apache.derby.jdbc.ClientConnectionPoolDataSource ds
> = new org.apache.derby.jdbc.ClientConnectionPoolDataSource();
> org.apache.derby.jdbc.ClientXADataSource ds = new
> org.apache.derby.jdbc.ClientXADataSource();
>
> Connection conn = null;
> ds.setDatabaseName("e:\\temp\\sampl127;create=true");
> XAConnection xaCon = ds.getXAConnection() ;
> //PooledConnection xaCon = ds.getPooledConnection() ;
>
>
> conn = xaCon.getConnection();
>
>
> DatabaseMetaData md = conn.getMetaData() ;
> System.out.println(md.getDatabaseProductVersion());
> System.out.println(md.getDatabaseProductName());
> Statement st = null;
> PreparedStatement ps1 = null;
> try
> {
> st = conn.createStatement ();
> try
> {
> st.executeUpdate ("drop table TAB1");
> }catch (SQLException x)
> {
> System.out.println ("no table exists");
> }
>
> ps1 = conn.prepareStatement("CREATE TABLE
> TAB1(COL1 INT NOT NULL)");
> ps1.executeUpdate();
> conn.commit ();
> } catch (SQLException x)
> {
> System.out.println ("table already exists");
> }
>
>
> conn.setAutoCommit(false);
> conn.createStatement().execute("update tab1 set col1 =
> -1 where col1 = 9");
> Savepoint savepoint1 = conn.setSavepoint("MyPoint");
> conn.rollback(savepoint1);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (DERBY-899) Cannot rollback to savepoint when
using ClientXADataSource
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-899?page=all ]
Kathey Marsden reassigned DERBY-899:
------------------------------------
Assign To: Kathey Marsden
> Cannot rollback to savepoint when using ClientXADataSource
> ----------------------------------------------------------
>
> Key: DERBY-899
> URL: http://issues.apache.org/jira/browse/DERBY-899
> Project: Derby
> Type: Bug
> Components: Network Client, Network Server
> Versions: 10.1.1.0, 10.1.1.1
> Reporter: Kathey Marsden
> Assignee: Kathey Marsden
> Fix For: 10.2.0.0, 10.1.3.0, 10.1.2.3
>
> From a user using client XA.
> save points don't seem to be working with DerbyClient using
> XA.
> levels i am on:
> 10.1.2.2
> Apache Derby
> Exception thrown is:
> Exception in thread "main"
> org.apache.derby.client.am.SqlException: SAVEPOINT, MyPoint
> does not exist or is not active in the current transaction.
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown
> Source)
> at
> org.apache.derby.client.am.Statement.completeExecuteImmediate(Un
> known Source)
> at
> org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMrepl
> y(Unknown Source)
> at
> org.apache.derby.client.net.NetStatementReply.readExecuteImmedia
> te(Unknown Source)
> at
> org.apache.derby.client.net.StatementReply.readExecuteImmediate(
> Unknown Source)
> at
> org.apache.derby.client.net.NetStatement.readExecuteImmediate_(U
> nknown Source)
> at
> org.apache.derby.client.am.Statement.readExecuteImmediate(Unknow
> n Source)
> at org.apache.derby.client.am.Statement.flowExecute(Unknown
> Source)
> at org.apache.derby.client.am.Statement.executeX(Unknown
> Source)
> at org.apache.derby.client.am.Connection.rollback(Unknown
> Source)
> at
> org.apache.derby.client.am.LogicalConnection.rollback(Unknown
> Source)
> at
> Derby.networkServer.NSConnection.main(NSConnection.java:103)
> Test case below
> class SavePointProblem337977
> {
>
> public static void main (String args [])throws Exception {
> //org.apache.derby.jdbc.ClientConnectionPoolDataSource ds
> = new org.apache.derby.jdbc.ClientConnectionPoolDataSource();
> org.apache.derby.jdbc.ClientXADataSource ds = new
> org.apache.derby.jdbc.ClientXADataSource();
>
> Connection conn = null;
> ds.setDatabaseName("e:\\temp\\sampl127;create=true");
> XAConnection xaCon = ds.getXAConnection() ;
> //PooledConnection xaCon = ds.getPooledConnection() ;
>
>
> conn = xaCon.getConnection();
>
>
> DatabaseMetaData md = conn.getMetaData() ;
> System.out.println(md.getDatabaseProductVersion());
> System.out.println(md.getDatabaseProductName());
> Statement st = null;
> PreparedStatement ps1 = null;
> try
> {
> st = conn.createStatement ();
> try
> {
> st.executeUpdate ("drop table TAB1");
> }catch (SQLException x)
> {
> System.out.println ("no table exists");
> }
>
> ps1 = conn.prepareStatement("CREATE TABLE
> TAB1(COL1 INT NOT NULL)");
> ps1.executeUpdate();
> conn.commit ();
> } catch (SQLException x)
> {
> System.out.println ("table already exists");
> }
>
>
> conn.setAutoCommit(false);
> conn.createStatement().execute("update tab1 set col1 =
> -1 where col1 = 9");
> Savepoint savepoint1 = conn.setSavepoint("MyPoint");
> conn.rollback(savepoint1);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira