|
View:
New views
15 Messages
—
Rating Filter:
Alert me
|
|
|
HSQLDB 1.9 - invalid transaction stateHi at all,
I have a small application with a hsqldb version 1.8. Now I wanted to switch to version 1.9.0.RC6. I only changed the library and the driverclass from "org.hsqldb.jdbcDriver" to "org.hsqldb.jdbc.JDBCDriver". But now I get the following Exception, when I try to update (insert/update/delete) some data in the db: java.sql.SQLException: invalid transaction state: read-only SQL-transaction at org.hsqldb.jdbc.Util.sqlException(Util.java:208) at org.hsqldb.jdbc.JDBCStatement.fetchResult(JDBCStatement.java:1817) at org.hsqldb.jdbc.JDBCStatement.executeUpdate(JDBCStatement.java:205) ......[myClasses] I recompiled the hsqldb-source with jsdk 1.5, because my application using this jdk. If I switch back to hsqldb-1.8.0.7 everything is fine. Is this a bug in the new version or did I forget some parameters for the connection => => connection = DriverManager.getConnection(url + ";shutdown=true;user=" + user + ";password=" + password); Please help. Greets Hardie PS: the value of connection.isReadOnly() => false |
|
|
Re: HSQLDB 1.9 - invalid transaction stateThis is not expected at all.
Please try with a new database first (instead of using existing database files), and if there is a problem, let us know about the statements that return this message. Fred On Thu, 22 Oct 2009 07:09 -0700, "Hardie82" <thomas.hartthaler@...> wrote: > > Hi at all, > > I have a small application with a hsqldb version 1.8. Now I wanted to > switch > to version 1.9.0.RC6. I only changed the library and the driverclass from > "org.hsqldb.jdbcDriver" to "org.hsqldb.jdbc.JDBCDriver". But now I get > the > following Exception, when I try to update (insert/update/delete) some > data > in the db: > > java.sql.SQLException: invalid transaction state: read-only > SQL-transaction > at org.hsqldb.jdbc.Util.sqlException(Util.java:208) > at org.hsqldb.jdbc.JDBCStatement.fetchResult(JDBCStatement.java:1817) > at org.hsqldb.jdbc.JDBCStatement.executeUpdate(JDBCStatement.java:205) > ......[myClasses] > > I recomiled the hsqldb-source with jsdk 1.5, because my application using > this jdk. f I switch back to hsqldb-1.8.0.7 everything is fine. Is this a > bug in the new version or did I forget some parameters for the connection > => > > => connection = DriverManager.getConnection(url + ";shutdown=true;user=" > + > user + > ";password=" + password); > > Please help. > > Greets > Hardie > -- > View this message in context: > http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26010491.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hsqldb-user mailing list > Hsqldb-user@... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: HSQLDB 1.9 - invalid transaction stateHi Fred,
at first thanks for the fast reply. The application deletes everytime the databasefolder and creates a new database, so the error still appears. I think I have to explain the complete programflow of the application. I have a unittestsuite which first creates the db and some tables and then shutdown the db. Next step is calling a testcase that starts itself a plain-java-application. This application gets the hsqldb-url and creates a new connection. Then the application does some action with the db (select,delete,inserts...). While doing updateaction the error occurs. Here is an example-statement: 2009-10-23 09:23:29,890 [ERROR|[classname]] Fehler bei doDelete: delete from [table] where monat =9 and jahr =2009 - 25006 : -3706 java.sql.SQLException: invalid transaction state: read-only SQL-transaction at org.hsqldb.jdbc.Util.sqlException(Util.java:208) at org.hsqldb.jdbc.JDBCStatement.fetchResult(JDBCStatement.java:1817) at org.hsqldb.jdbc.JDBCStatement.executeUpdate(JDBCStatement.java:205) My assumption is now, that there is a transactionlock, which blocks the writing to the db. Next step I want to do is logging all action from hsqldb to the sysout to analyse the actions of the db. Is this possible an how can I do it?
|
|
|
Re: HSQLDB 1.9 - invalid transaction stateIt should work.
Our test suite does this repeatedly and so such problem occurs. After the first shutdown, check the .properties file and make sure it has modified=no and does not have a readonly=true or similar and also check there is no .lck file. Also check the the same hsqldb jar is used by the two parts of the application. Fred On Fri, 23 Oct 2009 01:54 -0700, "Hardie82" <thomas.hartthaler@...> wrote: > > Hi Fred, > > at first thanks for the fast reply. The application deletes everytime the > databasefolder and creates a new database, so the error still appears. I > think I have to explain the complete programflow of the application. > > I have a unittestsuite which first creates the db and some tables and > then > shutdown the db. Next step is calling a testcase that starts itself a > plain-java-application. This application gets the hsqldb-url and creates > a > new connection. Then the application does some action with the db > (select,delete,inserts...). While doing updateaction the error occurs. > Here > is an example-statement: > > 2009-10-23 09:23:29,890 [ERROR|[classname]] Fehler bei doDelete: delete > from > [table] where monat =9 and jahr =2009 - 25006 : -3706 > java.sql.SQLException: invalid transaction state: read-only > SQL-transaction > at org.hsqldb.jdbc.Util.sqlException(Util.java:208) > at org.hsqldb.jdbc.JDBCStatement.fetchResult(JDBCStatement.java:1817) > at org.hsqldb.jdbc.JDBCStatement.executeUpdate(JDBCStatement.java:205) > > My assumption is now, that there is a transactionlock, which blocks the > writing to the db. Next step I want to do is logging all action from > hsqldb > to the sysout to analyse the actions of the db. Is this possible an how > can > I do it? > > > fredt wrote: > > > > This is not expected at all. > > > > Please try with a new database first (instead of using existing database > > files), and if there is a problem, let us know about the statements that > > return this message. > > > > Fred > > > > > > -- > View this message in context: > http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26022880.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hsqldb-user mailing list > Hsqldb-user@... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: HSQLDB 1.9 - invalid transaction stateNow I have check your introduction with the following results:
1. After first connect-disconnect there is no read-only in .properties and modified=no. Also there is no .ick file. 2. now there is a step I forgotten to tell you. The testcase also connects to the database before running the application. It generates some additional tables for the application. Now I checked your introduction to this case too: the result is the same as after the first stop. 3. the application starts and connects with the db again with "jdbc:hsqldb:file:resources/hsqldb/mydb;user=myuser;password=mypsw" The connection is open for the whole time the application runs. Is there a need for an argument to the connection?
|
|
|
Re: HSQLDB 1.9 - invalid transaction stateSo the next test, after step 2, is to connect to the database with our
DatabaseManager and see if you can query and update the database. If this succeeds, it means there must be a change to session settings in your application. Applications with a single connection would not return this error, unless the session is in readonly mode. Fred On Fri, 23 Oct 2009 05:05 -0700, "Hardie82" <thomas.hartthaler@...> wrote: > > Now I have check your introduction with the following results: > > 1. After first connect-disconnect there is no read-only in .properties > and > modified=no. Also there is no .ick file. > 2. now there is a step I forgotten to tell you. The testcase also > connects > to the database before running the application. It generates some > additional > tables for the application. Now I checked your introduction to this case > too: the result is the same as after the first stop. > 3. the application starts and connects with the db again with > "jdbc:hsqldb:file:resources/hsqldb/mydb;user=myuser;password=mypsw" > > The connection is open for the whole time the application runs. Is there > a > need for an argument to the connection? > > > Fred Toussi-2 wrote: > > > > It should work. > > > > Our test suite does this repeatedly and so such problem occurs. > > > > After the first shutdown, check the .properties file and make sure it > > has modified=no and does not have a readonly=true or similar and also > > check there is no .lck file. > > > > Also check the the same hsqldb jar is used by the two parts of the > > application. > > > > Fred > > > > -- > View this message in context: > http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26025107.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hsqldb-user mailing list > Hsqldb-user@... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: HSQLDB 1.9 - invalid transaction stateHi Fred,
I tried to connect to the database with an external tool during the second stop and the applicationstart. It was successful and I was able to do an update to some tables. But the error still occurs. I again checked the application source for two connection-objects but there is only one connection to the database.
|
|
|
Re: HSQLDB 1.9 - invalid transaction stateI don't know the reason. The only thing that might be related (now
fixed), and has been an issue with upgrading database with some RC and snapshot jars is that the starting schema for a connection was switched to INFORMATION_SCHEMA, therefore you needed to execute SET SCHEMA PUBLIC. However, this issue shouldn't throw a readonly transaction error. Regarding two connections to the database, when I thought about it further, even this wouldn't put a session in read-only mode. It would be better to compile and use the current SVN /base/trunk/ HEAD, to make sure. I will try to release a new snapshot jar in the next few days. Fred On Mon, 26 Oct 2009 04:47 -0700, "Hardie82" <thomas.hartthaler@...> wrote: > > Hi Fred, > > I tried to connect to the database with an external tool during the > second > stop and the applicationstart. It was successful and I was able to do an > update to some tables. But the error still occurs. I again checked the > application source for two connection-objects but there is only one > connection to the database. > > > Fred Toussi-2 wrote: > > > > So the next test, after step 2, is to connect to the database with our > > DatabaseManager and see if you can query and update the database. > > > > If this succeeds, it means there must be a change to session settings in > > your application. Applications with a single connection would not return > > this error, unless the session is in readonly mode. > > > > Fred > > > > On Fri, 23 Oct 2009 05:05 -0700, "Hardie82" <thomas.hartthaler@...> > > wrote: > >> > >> Now I have check your introduction with the following results: > >> > >> 1. After first connect-disconnect there is no read-only in .properties > >> and > >> modified=no. Also there is no .ick file. > >> 2. now there is a step I forgotten to tell you. The testcase also > >> connects > >> to the database before running the application. It generates some > >> additional > >> tables for the application. Now I checked your introduction to this case > >> too: the result is the same as after the first stop. > >> 3. the application starts and connects with the db again with > >> "jdbc:hsqldb:file:resources/hsqldb/mydb;user=myuser;password=mypsw" > >> > >> The connection is open for the whole time the application runs. Is there > >> a > >> need for an argument to the connection? > >> > >> > >> Fred Toussi-2 wrote: > >> > > >> > It should work. > >> > > >> > Our test suite does this repeatedly and so such problem occurs. > >> > > >> > After the first shutdown, check the .properties file and make sure it > >> > has modified=no and does not have a readonly=true or similar and also > >> > check there is no .lck file. > >> > > >> > Also check the the same hsqldb jar is used by the two parts of the > >> > application. > >> > > >> > Fred > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26025107.html > >> Sent from the HSQLDB - User mailing list archive at Nabble.com. > >> > >> > >> ------------------------------------------------------------------------------ > >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA > >> is the only developer event you need to attend this year. Jumpstart your > >> developing skills, take BlackBerry mobile applications to market and stay > >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! > >> http://p.sf.net/sfu/devconference > >> _______________________________________________ > >> Hsqldb-user mailing list > >> Hsqldb-user@... > >> https://lists.sourceforge.net/lists/listinfo/hsqldb-user > > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > > http://p.sf.net/sfu/devconference > > _______________________________________________ > > Hsqldb-user mailing list > > Hsqldb-user@... > > https://lists.sourceforge.net/lists/listinfo/hsqldb-user > > > > > > -- > View this message in context: > http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26058293.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hsqldb-user mailing list > Hsqldb-user@... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: HSQLDB 1.9 - invalid transaction stateHi Fred,
thank you for your efforts. I will try out the current SVN-HEAD. Furthermore I will check my source again. Maybe I overlooked a fault in the application. Greetings Hardie
|
|
|
Re: HSQLDB 1.9 - invalid transaction stateHi Fred,
I now tried to use the server-mode of hsqldb because I think that the problem is the transaction-mode in 1.9. Now I have a shutdown-problem. After calling the stop()-method of my server-object, the *.Ick-file still exists. I think this isn't correct, is it? I used the following testprogram: public class Main { private Logger logger = Logger.getLogger(Main.class); private Server server; private Properties props; /** * @param args */ public static void main(String[] args) { try { PropertyConfigurator.configure("resources/log4j.properties"); Main main = new Main(); main.init(); main.run(); } catch(Exception e) { logger.error(e.toString()); } } private void init() throws Exception { props = new Properties(); InputStream is = Main.class.getResourceAsStream("hsqldb.properties"); props.load(is); server = new HSQLDBServer(props); } private void run() throws Exception { server.start(); Class.forName("org.hsqldb.jdbc.JDBCDriver"); Connection conn = DriverManager.getConnection( "jdbc:hsqldb:hsql://localhost:9001/hsqldb/mydb;user=sa;password="); HSQLDBHelper.init(props, conn); HSQLDBHelper.createTablesViewsFromSQLSources(true, "table1"); // class for generating a table server.stop(); } } Propertyfile: server.address=localhost server.port=9001 server.root=. server.trace=true server.restart_on_shutdown=true server.no_system_exit=true server.silent=false # database 0 config server.database.0=file:./resources/hsqldb/mydb server.dbname.0=mydb Is there an error by shutdown the server? |
|
|
Re: HSQLDB 1.9 - invalid transaction stateYou should shutdown the database using the SQL command "SHUTDOWN". This
will shutdown the server if it is not serveing any other database. Fred On Thu, 29 Oct 2009 05:34 -0700, "Hardie82" <thomas.hartthaler@...> wrote: > > Hi Fred, > > I now tried to use the server-mode of hsqldb because I think that the > problem is the transaction-mode in 1.9. Now I have a shutdown-problem. > After > calling the stop()-method of my server-object, the *.Ick-file still > exists. > I think this isn't correct, is it? I used the following testprogram: > > public class Main > { > private Logger logger = Logger.getLogger(Main.class); > private Server server; > private Properties props; > > /** > * @param args > */ > public static void main(String[] args) > { > try > { > PropertyConfigurator.configure("resources/log4j.properties"); > Main main = new Main(); > main.init(); > main.run(); > } > catch(Exception e) > { > logger.error(e.toString()); > } > } > > private void init() throws Exception > { > props = new Properties(); > InputStream is = Main.class.getResourceAsStream("hsqldb.properties"); > props.load(is); > server = new HSQLDBServer(props); > } > > private void run() throws Exception > { > server.start(); > > Class.forName("org.hsqldb.jdbc.JDBCDriver"); > Connection conn = DriverManager.getConnection( > "jdbc:hsqldb:hsql://localhost:9001/hsqldb/mydb;user=sa;password="); > HSQLDBHelper.init(props, conn); > HSQLDBHelper.createTablesViewsFromSQLSources(true, "table1"); // > class > for generating a table > server.stop(); > } > } > > Propertyfile: > server.address=localhost > server.port=9001 > server.root=. > server.trace=true > server.restart_on_shutdown=true > server.no_system_exit=true > server.silent=false > > # database 0 config > server.database.0=file:./resources/hsqldb/mydb > server.dbname.0=mydb > > Is there an error by shutdown the server? > > -- > View this message in context: > http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26112143.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hsqldb-user mailing list > Hsqldb-user@... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: HSQLDB 1.9 - invalid transaction stateSo what are the shutdown- and close-method of server for?
In the szenario explained earlier in this thread I want to open the server, connect to the database with more then one connections and after all doings shutdown the server. Is this possible?
|
|
|
Re: HSQLDB 1.9 - invalid transaction stateThose methods of the Server are not for your use-case.
What you want to do is simple and possible. Simply issue "SHUTDOWN" as an SQL command and all will be closed. Fred On Thu, 29 Oct 2009 08:54 -0700, "Hardie82" <thomas.hartthaler@...> wrote: > > So what are the shutdown- and close-method of server for? > > In the szenario explained earlier in this thread I want to open the > server, > connect to the database with more then one connections and after all > doings > shutdown the server. Is this possible? > > > Fred Toussi-2 wrote: > > > > You should shutdown the database using the SQL command "SHUTDOWN". This > > will shutdown the server if it is not serveing any other database. > > > > Fred > > > > On Thu, 29 Oct 2009 05:34 -0700, "Hardie82" <thomas.hartthaler@...> > > wrote: > >> > >> Hi Fred, > >> > >> I now tried to use the server-mode of hsqldb because I think that the > >> problem is the transaction-mode in 1.9. Now I have a shutdown-problem. > >> After > >> calling the stop()-method of my server-object, the *.Ick-file still > >> exists. > >> I think this isn't correct, is it? I used the following testprogram: > >> > >> public class Main > >> { > >> private Logger logger = Logger.getLogger(Main.class); > >> private Server server; > >> private Properties props; > >> > >> /** > >> * @param args > >> */ > >> public static void main(String[] args) > >> { > >> try > >> { > >> PropertyConfigurator.configure("resources/log4j.properties"); > >> Main main = new Main(); > >> main.init(); > >> main.run(); > >> } > >> catch(Exception e) > >> { > >> logger.error(e.toString()); > >> } > >> } > >> > >> private void init() throws Exception > >> { > >> props = new Properties(); > >> InputStream is = Main.class.getResourceAsStream("hsqldb.properties"); > >> props.load(is); > >> server = new HSQLDBServer(props); > >> } > >> > >> private void run() throws Exception > >> { > >> server.start(); > >> > >> Class.forName("org.hsqldb.jdbc.JDBCDriver"); > >> Connection conn = DriverManager.getConnection( > >> > >> "jdbc:hsqldb:hsql://localhost:9001/hsqldb/mydb;user=sa;password="); > >> HSQLDBHelper.init(props, conn); > >> HSQLDBHelper.createTablesViewsFromSQLSources(true, "table1"); // > >> class > >> for generating a table > >> server.stop(); > >> } > >> } > >> > >> Propertyfile: > >> server.address=localhost > >> server.port=9001 > >> server.root=. > >> server.trace=true > >> server.restart_on_shutdown=true > >> server.no_system_exit=true > >> server.silent=false > >> > >> # database 0 config > >> server.database.0=file:./resources/hsqldb/mydb > >> server.dbname.0=mydb > >> > >> Is there an error by shutdown the server? > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26112143.html > >> Sent from the HSQLDB - User mailing list archive at Nabble.com. > >> > >> > >> ------------------------------------------------------------------------------ > >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA > >> is the only developer event you need to attend this year. Jumpstart your > >> developing skills, take BlackBerry mobile applications to market and stay > >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! > >> http://p.sf.net/sfu/devconference > >> _______________________________________________ > >> Hsqldb-user mailing list > >> Hsqldb-user@... > >> https://lists.sourceforge.net/lists/listinfo/hsqldb-user > > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > > http://p.sf.net/sfu/devconference > > _______________________________________________ > > Hsqldb-user mailing list > > Hsqldb-user@... > > https://lists.sourceforge.net/lists/listinfo/hsqldb-user > > > > > > -- > View this message in context: > http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26115744.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hsqldb-user mailing list > Hsqldb-user@... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: HSQLDB 1.9 - invalid transaction stateHi Fred,
I have some new information relating to my read-only-problem. I studied the application and found the following code: hsqldbConnection.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED); If I comment out this row, the exception disappears. What's the meaning of that? Do you know? Greetings
|
|
|
Re: HSQLDB 1.9 - invalid transaction stateThis is covered in the new Guide. Basically this mode means readonly.
Just remove that line. The default isolation mode will be either READ_COMMITTED or REPEATABLE_READS, and will work fine without explicitly specifying the isolation mode . Fred On Fri, 30 Oct 2009 03:53 -0700, "Hardie82" <thomas.hartthaler@...> wrote: > > Hi Fred, > > I have some new information relating to my read-only-problem. I studied > the > application and found the following code: > > hsqldbConnection.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED); > > If I comment out this row, the exception disappears. What's the meaning > of > that? Do you know? > > Greetings > > > Fred Toussi-2 wrote: > > > > Those methods of the Server are not for your use-case. > > What you want to do is simple and possible. > > Simply issue "SHUTDOWN" as an SQL command and all will be closed. > > Fred > > > > On Thu, 29 Oct 2009 08:54 -0700, "Hardie82" <thomas.hartthaler@...> > > wrote: > >> > >> So what are the shutdown- and close-method of server for? > >> > >> In the szenario explained earlier in this thread I want to open the > >> server, > >> connect to the database with more then one connections and after all > >> doings > >> shutdown the server. Is this possible? > >> > >> > >> Fred Toussi-2 wrote: > >> > > >> > You should shutdown the database using the SQL command "SHUTDOWN". This > >> > will shutdown the server if it is not serveing any other database. > >> > > >> > Fred > >> > > >> > On Thu, 29 Oct 2009 05:34 -0700, "Hardie82" > >> <thomas.hartthaler@...> > >> > wrote: > >> >> > >> >> Hi Fred, > >> >> > >> >> I now tried to use the server-mode of hsqldb because I think that the > >> >> problem is the transaction-mode in 1.9. Now I have a shutdown-problem. > >> >> After > >> >> calling the stop()-method of my server-object, the *.Ick-file still > >> >> exists. > >> >> I think this isn't correct, is it? I used the following testprogram: > >> >> > >> >> public class Main > >> >> { > >> >> private Logger logger = Logger.getLogger(Main.class); > >> >> private Server server; > >> >> private Properties props; > >> >> > >> >> /** > >> >> * @param args > >> >> */ > >> >> public static void main(String[] args) > >> >> { > >> >> try > >> >> { > >> >> PropertyConfigurator.configure("resources/log4j.properties"); > >> >> Main main = new Main(); > >> >> main.init(); > >> >> main.run(); > >> >> } > >> >> catch(Exception e) > >> >> { > >> >> logger.error(e.toString()); > >> >> } > >> >> } > >> >> > >> >> private void init() throws Exception > >> >> { > >> >> props = new Properties(); > >> >> InputStream is = > >> Main.class.getResourceAsStream("hsqldb.properties"); > >> >> props.load(is); > >> >> server = new HSQLDBServer(props); > >> >> } > >> >> > >> >> private void run() throws Exception > >> >> { > >> >> server.start(); > >> >> > >> >> Class.forName("org.hsqldb.jdbc.JDBCDriver"); > >> >> Connection conn = DriverManager.getConnection( > >> >> > >> >> "jdbc:hsqldb:hsql://localhost:9001/hsqldb/mydb;user=sa;password="); > >> >> HSQLDBHelper.init(props, conn); > >> >> HSQLDBHelper.createTablesViewsFromSQLSources(true, "table1"); // > >> >> class > >> >> for generating a table > >> >> server.stop(); > >> >> } > >> >> } > >> >> > >> >> Propertyfile: > >> >> server.address=localhost > >> >> server.port=9001 > >> >> server.root=. > >> >> server.trace=true > >> >> server.restart_on_shutdown=true > >> >> server.no_system_exit=true > >> >> server.silent=false > >> >> > >> >> # database 0 config > >> >> server.database.0=file:./resources/hsqldb/mydb > >> >> server.dbname.0=mydb > >> >> > >> >> Is there an error by shutdown the server? > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26112143.html > >> >> Sent from the HSQLDB - User mailing list archive at Nabble.com. > >> >> > >> >> > >> >> > >> ------------------------------------------------------------------------------ > >> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA > >> >> is the only developer event you need to attend this year. Jumpstart > >> your > >> >> developing skills, take BlackBerry mobile applications to market and > >> stay > >> >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! > >> >> http://p.sf.net/sfu/devconference > >> >> _______________________________________________ > >> >> Hsqldb-user mailing list > >> >> Hsqldb-user@... > >> >> https://lists.sourceforge.net/lists/listinfo/hsqldb-user > >> > > >> > > >> ------------------------------------------------------------------------------ > >> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > >> > is the only developer event you need to attend this year. Jumpstart > >> your > >> > developing skills, take BlackBerry mobile applications to market and > >> stay > >> > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > >> > http://p.sf.net/sfu/devconference > >> > _______________________________________________ > >> > Hsqldb-user mailing list > >> > Hsqldb-user@... > >> > https://lists.sourceforge.net/lists/listinfo/hsqldb-user > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26115744.html > >> Sent from the HSQLDB - User mailing list archive at Nabble.com. > >> > >> > >> ------------------------------------------------------------------------------ > >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA > >> is the only developer event you need to attend this year. Jumpstart your > >> developing skills, take BlackBerry mobile applications to market and stay > >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! > >> http://p.sf.net/sfu/devconference > >> _______________________________________________ > >> Hsqldb-user mailing list > >> Hsqldb-user@... > >> https://lists.sourceforge.net/lists/listinfo/hsqldb-user > > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > > http://p.sf.net/sfu/devconference > > _______________________________________________ > > Hsqldb-user mailing list > > Hsqldb-user@... > > https://lists.sourceforge.net/lists/listinfo/hsqldb-user > > > > > > -- > View this message in context: > http://old.nabble.com/HSQLDB-1.9---invalid-transaction-state-tp26010491p26128075.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hsqldb-user mailing list > Hsqldb-user@... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
| Free embeddable forum powered by Nabble | Forum Help |