Re: H2 DB issues

2011-10-31 Thread aruna.koodipudi
Can anyone please respond to this thread...

--
View this message in context: 
http://h2-database.66688.n3.nabble.com/H2-DB-issues-tp3447334p3467197.html
Sent from the H2 Database mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



H2 DB issues

2011-10-31 Thread Sri Sudha
Hi,

In our project we are using H2 DB version : h2-1.1.114. We are using
h2db to store the active session information, to store the data only
for 2days and the data will be expire after that.

We are facing multiple issues with h2DB.

Issue 1:   Sequence not found  (Sequence
SYSTEM_SEQUENCE_39CBE124_6F9A_44A9_981C_7E56D83420B2 not found)

Issue2:  org.h2.jdbc.JdbcSQLException: Unique index or primary key
violation: SYS_ID ON PUBLIC.SYS(ID)

Issue3: org.h2.jdbc.JdbcSQLException: Error opening database: Lock
file modification time is in the future; if required please delete the
file /XXX/X//data/h2/_session.lock.db manually and retry

From your earlier forum topics I understood that the problem might be
either DB corrupted or restarting the OS, or need to upgrade h2db  to
the latest version.

If the issue is really related to upgrade the H2DB, please suggest me
which version providing the solution for all the above issues. It
would be more helpful, if you can provide me the root cause for the
above issues for better understanding.

Thanks,
Aruna.

-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Re: order of SQL operations

2011-10-31 Thread Noel Grandin
see
http://www.h2database.com/html/features.html#multiple_connections

Adam McMahon wrote:
 Hi,

 Quick question.  As I understand it, H2 handles the synchronization of
 SQL commands.  If a number of SQL commands hit the database from a
 variety of connections, do they execute in the order that H2 receives
 them?  If not, can a brief explanation be provided?

 Thanks,

 -Adam


-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Re: H2 DB issues

2011-10-31 Thread Noel Grandin
you'd have to provide more information, preferably a test-case.

issue 3 looks like you have multiple machines accessing the same file, and 
those machines do not have synchronised clocks.

Sri Sudha wrote:
 Hi,

 In our project we are using H2 DB version : h2-1.1.114. We are using
 h2db to store the active session information, to store the data only
 for 2days and the data will be expire after that.

 We are facing multiple issues with h2DB.

 Issue 1:   Sequence not found  (Sequence
 SYSTEM_SEQUENCE_39CBE124_6F9A_44A9_981C_7E56D83420B2 not found)

 Issue2:  org.h2.jdbc.JdbcSQLException: Unique index or primary key
 violation: SYS_ID ON PUBLIC.SYS(ID)

 Issue3: org.h2.jdbc.JdbcSQLException: Error opening database: Lock
 file modification time is in the future; if required please delete the
 file /XXX/X//data/h2/_session.lock.db manually and retry

 From your earlier forum topics I understood that the problem might be
 either DB corrupted or restarting the OS, or need to upgrade h2db  to
 the latest version.

 If the issue is really related to upgrade the H2DB, please suggest me
 which version providing the solution for all the above issues. It
 would be more helpful, if you can provide me the root cause for the
 above issues for better understanding.

 Thanks,
 Aruna.


-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Issue with c3p0 when using h2-1.3.161.

2011-10-31 Thread steve
Hello
Firstly , thank you for this awesome database. I've upgraded to the
current release and noticed that the application wasn't functioning as
expected. Turns out a database connection could be established by
hibernate.

I've attached a stacktrace.


java.sql.SQLException: Connections could not be acquired from the
underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:
529)
at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:
128)
at
org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:
78)
at
org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:
51)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:
168)
at
org.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:
375)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
1872)
at
com.callidus.db.HibernateSessionFactory.clinit(HibernateSessionFactory.java:
68)
at com.callidus.db.dao.BaseDAO.getSession(BaseDAO.java:12)
at
com.callidus.db.dao.EmbeddedAppsDAO.getAllActiveApplications(EmbeddedAppsDAO.java:
16)
at
com.callidus.agents.local.WebServerSetupAgent.getAllHandlers(WebServerSetupAgent.java:
160)
at
com.callidus.agents.local.WebServerSetupAgent.configureHttpServer(WebServerSetupAgent.java:
39)
at
com.callidus.agents.local.WebServerSetupAgent.execute(WebServerSetupAgent.java:
63)
at com.callidus.agents.CallidusAgent.call(CallidusAgent.java:27)
at com.callidus.agents.CallidusAgent.runAgent(CallidusAgent.java:79)
at com.callidus.server.Server.startUpServer(Server.java:143)
at com.callidus.Callidus.main(Callidus.java:18)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException:
A ResourcePool could not acquire a resource from its primary factory
or source.
at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:
1319)
at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:
557)
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:
477)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:
525)
... 16 more
61949 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not
complete schema update
java.sql.SQLException: Connections could not be acquired from the
underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:
529)
at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:
128)
at
org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:
78)
at
org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:
51)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:
168)
at
org.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:
375)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
1872)
at
com.callidus.db.HibernateSessionFactory.clinit(HibernateSessionFactory.java:
68)
at com.callidus.db.dao.BaseDAO.getSession(BaseDAO.java:12)
at
com.callidus.db.dao.EmbeddedAppsDAO.getAllActiveApplications(EmbeddedAppsDAO.java:
16)
at
com.callidus.agents.local.WebServerSetupAgent.getAllHandlers(WebServerSetupAgent.java:
160)
at
com.callidus.agents.local.WebServerSetupAgent.configureHttpServer(WebServerSetupAgent.java:
39)
at
com.callidus.agents.local.WebServerSetupAgent.execute(WebServerSetupAgent.java:
63)
at com.callidus.agents.CallidusAgent.call(CallidusAgent.java:27)
at com.callidus.agents.CallidusAgent.runAgent(CallidusAgent.java:79)
at com.callidus.server.Server.startUpServer(Server.java:143)
at com.callidus.Callidus.main(Callidus.java:18)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException:
A ResourcePool could not acquire a resource from its primary factory
or source.
at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:
1319)
at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:
557)
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:
477)
at

Re: Issue with c3p0 when using h2-1.3.161.

2011-10-31 Thread Noel Grandin
you probably haven't specified the database URL properly.

see http://www.h2database.com/html/tutorial.html#connecting_using_jdbc

steve wrote:
 Hello
 Firstly , thank you for this awesome database. I've upgraded to the
 current release and noticed that the application wasn't functioning as
 expected. Turns out a database connection could be established by
 hibernate.

 I've attached a stacktrace.


 java.sql.SQLException: Connections could not be acquired from the
 underlying database!
   at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
   at
 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:
 529)
   at
 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:
 128)
   at
 org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:
 78)
   at
 org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:
 51)
   at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:
 168)
   at
 org.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:
 375)
   at
 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
 1872)
   at
 com.callidus.db.HibernateSessionFactory.clinit(HibernateSessionFactory.java:
 68)
   at com.callidus.db.dao.BaseDAO.getSession(BaseDAO.java:12)
   at
 com.callidus.db.dao.EmbeddedAppsDAO.getAllActiveApplications(EmbeddedAppsDAO.java:
 16)
   at
 com.callidus.agents.local.WebServerSetupAgent.getAllHandlers(WebServerSetupAgent.java:
 160)
   at
 com.callidus.agents.local.WebServerSetupAgent.configureHttpServer(WebServerSetupAgent.java:
 39)
   at
 com.callidus.agents.local.WebServerSetupAgent.execute(WebServerSetupAgent.java:
 63)
   at com.callidus.agents.CallidusAgent.call(CallidusAgent.java:27)
   at com.callidus.agents.CallidusAgent.runAgent(CallidusAgent.java:79)
   at com.callidus.server.Server.startUpServer(Server.java:143)
   at com.callidus.Callidus.main(Callidus.java:18)
 Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException:
 A ResourcePool could not acquire a resource from its primary factory
 or source.
   at
 com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:
 1319)
   at
 com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:
 557)
   at
 com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:
 477)
   at
 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:
 525)
   ... 16 more
 61949 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not
 complete schema update
 java.sql.SQLException: Connections could not be acquired from the
 underlying database!
   at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
   at
 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:
 529)
   at
 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:
 128)
   at
 org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:
 78)
   at
 org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:
 51)
   at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:
 168)
   at
 org.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:
 375)
   at
 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
 1872)
   at
 com.callidus.db.HibernateSessionFactory.clinit(HibernateSessionFactory.java:
 68)
   at com.callidus.db.dao.BaseDAO.getSession(BaseDAO.java:12)
   at
 com.callidus.db.dao.EmbeddedAppsDAO.getAllActiveApplications(EmbeddedAppsDAO.java:
 16)
   at
 com.callidus.agents.local.WebServerSetupAgent.getAllHandlers(WebServerSetupAgent.java:
 160)
   at
 com.callidus.agents.local.WebServerSetupAgent.configureHttpServer(WebServerSetupAgent.java:
 39)
   at
 com.callidus.agents.local.WebServerSetupAgent.execute(WebServerSetupAgent.java:
 63)
   at com.callidus.agents.CallidusAgent.call(CallidusAgent.java:27)
   at com.callidus.agents.CallidusAgent.runAgent(CallidusAgent.java:79)
   at com.callidus.server.Server.startUpServer(Server.java:143)
   at com.callidus.Callidus.main(Callidus.java:18)
 Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException:
 A ResourcePool could not acquire a resource from its primary factory
 or source.
   at
 com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:
 1319)
   at
 com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:
 557)
   at
 

Re: order of SQL operations

2011-10-31 Thread Adam McMahon
Noel,

Thanks for the link.  But, I did not find anything on the order of the
statements (but perhaps I missed it).  Lets say that one connection is
executing and has the lock, and two others are blocked temporarily.
Then after the release, one of the other two will get access and
perhaps lock the Database?  But which one will get access?  That is
what I am trying to understand.  Will the SQL statement that was
submitted first get access (is it a type of queue), or is there no
guarantee on this?

Thanks,

-Adam

On Oct 31, 1:08 am, Noel Grandin noelgran...@gmail.com wrote:
 seehttp://www.h2database.com/html/features.html#multiple_connections







 Adam McMahon wrote:
  Hi,

  Quick question.  As I understand it, H2 handles the synchronization of
  SQL commands.  If a number of SQL commands hit the database from a
  variety of connections, do they execute in the order that H2 receives
  them?  If not, can a brief explanation be provided?

  Thanks,

  -Adam

-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Re: DATABASE_TO_UPPER not Usable?

2011-10-31 Thread Thomas Mueller
Hi,

I guess I will be able to implement this in the next release. I will try
using a TreeMapString, V(String.CASE_INSENSITIVE_ORDER). If this is a
problem I might replace it with:

/**

 * A hash map with a case-insensitive string key.

 *

 * *@param* V the value type

 */

*public* *class* CaseInsensitiveMapV *extends* HashMapString, V {


*private* *static* *final* *long* serialVersionUID = 1L;


*public* V get(Object key) {

*return* *super*.get(toUpper(key));

}


*public* V put(String key, V value) {

*return* *super*.put(toUpper(key), value);

}


*public* *boolean* containsKey(Object key) {

*return* *super*.containsKey(toUpper(key));

}


*public* V remove(Object key) {

*return* *super*.remove(toUpper(key));

}


*private* String toUpper(Object key) {

*return* key == *null* ? *null* :
StringUtils.toUpperEnglish(key.toString());

}


}

On Friday, October 7, 2011, Thomas Mueller wrote:

 Hi

 Thanks, I will try it. It might take a few days (I'm on vacation right
 now).

 Regards,
 Thomas
 Am 07.10.2011 11:09 schrieb Sije de Haan 
 i...@dehaansoftware.nljavascript:_e({}, 'cvml', 'i...@dehaansoftware.nl');
 :



 On 30 sep, 21:52, Thomas Mueller 
 thomas.tom.muel...@gmail.comjavascript:_e({}, 'cvml', 
 'thomas.tom.muel...@gmail.com');
 wrote:
  Hi,
 
  I know it is not fully compatible. Currently, H2 internally uses a
  HashMapString, Table, and it is not so easy to make this case
 insensitive.
  Patches are welcome of couse :-)
 
  Regards,
  Thomas
  Am 30.09.2011 16:13 schrieb Sije de Haan 
  i...@dehaansoftware.nljavascript:_e({}, 'cvml', 
  'i...@dehaansoftware.nl');
 :
 
  Adding an extra jar is not necessary, I implemented a
 CaseInsensitiveHashMap myself, it's only one small source (with a test
 program). Download it from
 http://www.dehaansoftware.nl/CaseInsensitiveHashMap.zip

 Sije

 
 
 
 
 
   When I set the DATABASE_TO_UPPER property set to false Table- and
   FieldNames are 'stored-as-is', so when I execute 'CREATE TABLE
   Customers ...' and retrieve the metaData I get 'Customers'. That's
   what I want and that's what I need.
 
   But what I don't want is to ACCESS the table in a case-sensitive way.
   When I execute two queries:
   SELECT * from Customers
   and
   SELECT * from CUSTOMERS
   I expect both to return the same results because the SQL standard says
   that sql statements should be interpreted in a case-insensitive way.
   With the DATABASE_TO_UPPER set to false I even can execute:
   CREATE TABLE customers
   and
   CREATE TABLE Customers
   ending up with two different tables where the SQL Standard requires
   the second to throw a 'Table already exists' exception.
 
   The changelog says:
   DATABASE_TO_UPPER: when set to false, all identifier names (table
   names, column names) are case sensitive (except aggregate, built-in
   functions, data types, and keywords). This is for improved
   compatibility with MySQL and PostgreSQL
   But it's not compatible with MySQL at all (and I doubt it is with
   PostgreSql)
 
   Sije de Haan
 
   --
   You received this message because you are subscribed to the Google
 Groups
 
  H2 Database group. To post to this group, send email to
 h2-database@googlegroups.com javascript:_e({}, 'cvml',
 'h2-database@googlegroups.com');.
   To unsubscribe from this group, send email to
 
  h2-database+unsubscr...@googlegroups.com javascript:_e({}, 'cvml',
 'h2-database%2bunsubscr...@googlegroups.com');. For more options,
 visit this group at
 
  http://groups.google.com/group/h2-database?hl=en.
 
 
 
 
 
 
 
 

 --
 You received this message because you are subscribed to the Google Groups
 H2 Database group.
 To post to this group, send email to 
 h2-database@googlegroups.comjavascript:_e({}, 'cvml', 
 'h2-database@googlegroups.com');
 .
 To unsubscribe from this group, send email to
 h2-database+unsubscr...@googlegroups.com javascript:_e({}, 'cvml',
 'h2-database%2bunsubscr...@googlegroups.com');.
 For more options, visit this group at
 http://groups.google.com/group/h2-database?hl=en.



-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Re: CaseInsensitiveHashMap

2011-10-31 Thread Thomas Mueller
Hi,

Thanks a lot! I found out using TreeMapString, V(String.
CASE_INSENSITIVE_ORDER) should work. The disadvantage is that it's no
longer a HashMap but a Map, which is a bit slower on Android (interfaces
method calls are a bit slower than class method calls).

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Re: CreateCluster tool freezes at the same point every time

2011-10-31 Thread Thomas Mueller
Hi,

Thanks a lot! I found the problem now, it's a limitation of the exclusive
mode. I will try to fix it in the next release.

Regards,
Thomas


On Tuesday, October 11, 2011, Paul Morris wrote:

 a couple of thread dumps attached from the source DB

 On 10 October 2011 19:07, Thomas Mueller 
 thomas.tom.muel...@gmail.comjavascript:_e({}, 'cvml', 
 'thomas.tom.muel...@gmail.com');
  wrote:

 Hi,

 I don't know what could be the problem... Could you get a few full thread
 dumps to find out what the problem is?

 jps -l (to get the process id)
 jstack -l pid

 Regards,
 Thomas

 --
 You received this message because you are subscribed to the Google Groups
 H2 Database group.
 To post to this group, send email to 
 h2-database@googlegroups.comjavascript:_e({}, 'cvml', 
 'h2-database@googlegroups.com');
 .
 To unsubscribe from this group, send email to
 h2-database+unsubscr...@googlegroups.com javascript:_e({}, 'cvml',
 'h2-database%2bunsubscr...@googlegroups.com');.
 For more options, visit this group at
 http://groups.google.com/group/h2-database?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 H2 Database group.
 To post to this group, send email to 
 h2-database@googlegroups.comjavascript:_e({}, 'cvml', 
 'h2-database@googlegroups.com');
 .
 To unsubscribe from this group, send email to
 h2-database+unsubscr...@googlegroups.com javascript:_e({}, 'cvml',
 'h2-database%2bunsubscr...@googlegroups.com');.
 For more options, visit this group at
 http://groups.google.com/group/h2-database?hl=en.


-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Re: Issue with c3p0 when using h2-1.3.161.

2011-10-31 Thread Noel Grandin
Hmmm, interesting.
Is there perhaps an error message earlier on in the log?
I ask because I can't see a root cause belonging to H2 anywhere in
that stacktrace.

On Mon, Oct 31, 2011 at 18:42, Elton (GMAIL) eltonk...@gmail.com wrote:
 Hi Noel,
 Thank you for replying.  It is not an issue related to the DB connection
 string. I must add here that using the previous  x.x.160 version works and
 only when I replace the jar with vx.x.161 do I run into this problem.

 Regards
 Elton Kent

 -Original Message-
 From: Noel Grandin [mailto:noelgran...@gmail.com]
 Sent: Monday, October 31, 2011 5:51 PM
 To: h2-database@googlegroups.com
 Cc: steve
 Subject: Re: Issue with c3p0 when using h2-1.3.161.

 you probably haven't specified the database URL properly.

 see http://www.h2database.com/html/tutorial.html#connecting_using_jdbc

 steve wrote:
 Hello
 Firstly , thank you for this awesome database. I've upgraded to the
 current release and noticed that the application wasn't functioning as
 expected. Turns out a database connection could be established by
 hibernate.

 I've attached a stacktrace.


 java.sql.SQLException: Connections could not be acquired from the
 underlying database!
       at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
       at

 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C
 3P0PooledConnectionPool.java:
 529)
       at

 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(Abstract
 PoolBackedDataSource.java:
 128)
       at

 org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0Connection
 Provider.java:
 78)
       at

 org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepar
 e(SuppliedConnectionProviderConnectionHelper.java:
 51)
       at
 org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:
 168)
       at
 org.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:
 375)
       at
 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
 1872)
       at

 com.callidus.db.HibernateSessionFactory.clinit(HibernateSessionFactory.jav
 a:
 68)
       at com.callidus.db.dao.BaseDAO.getSession(BaseDAO.java:12)
       at

 com.callidus.db.dao.EmbeddedAppsDAO.getAllActiveApplications(EmbeddedAppsDAO
 .java:
 16)
       at

 com.callidus.agents.local.WebServerSetupAgent.getAllHandlers(WebServerSetupA
 gent.java:
 160)
       at

 com.callidus.agents.local.WebServerSetupAgent.configureHttpServer(WebServerS
 etupAgent.java:
 39)
       at

 com.callidus.agents.local.WebServerSetupAgent.execute(WebServerSetupAgent.ja
 va:
 63)
       at com.callidus.agents.CallidusAgent.call(CallidusAgent.java:27)
       at com.callidus.agents.CallidusAgent.runAgent(CallidusAgent.java:79)
       at com.callidus.server.Server.startUpServer(Server.java:143)
       at com.callidus.Callidus.main(Callidus.java:18)
 Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException:
 A ResourcePool could not acquire a resource from its primary factory
 or source.
       at

 com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePo
 ol.java:
 1319)
       at

 com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicRe
 sourcePool.java:
 557)
       at

 com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResource
 Pool.java:
 477)
       at

 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C
 3P0PooledConnectionPool.java:
 525)
       ... 16 more
 61949 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not
 complete schema update
 java.sql.SQLException: Connections could not be acquired from the
 underlying database!
       at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
       at

 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C
 3P0PooledConnectionPool.java:
 529)
       at

 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(Abstract
 PoolBackedDataSource.java:
 128)
       at

 org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0Connection
 Provider.java:
 78)
       at

 org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepar
 e(SuppliedConnectionProviderConnectionHelper.java:
 51)
       at
 org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:
 168)
       at
 org.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:
 375)
       at
 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
 1872)
       at

 com.callidus.db.HibernateSessionFactory.clinit(HibernateSessionFactory.jav
 a:
 68)
       at com.callidus.db.dao.BaseDAO.getSession(BaseDAO.java:12)
       at

 com.callidus.db.dao.EmbeddedAppsDAO.getAllActiveApplications(EmbeddedAppsDAO
 .java:
 16)
       at

 com.callidus.agents.local.WebServerSetupAgent.getAllHandlers(WebServerSetupA
 gent.java:
 160)
       at

 com.callidus.agents.local.WebServerSetupAgent.configureHttpServer(WebServerS
 

Re: order of SQL operations

2011-10-31 Thread Noel Grandin
There is no guarantee. But that is the case with pretty much every SQL
database engine out there.

Note also that there is no global lock. Transactions will acquire
row-level, and perhaps table-level locks, so two or more connections
can actually execute at the same time.

On Mon, Oct 31, 2011 at 18:08, Adam McMahon a...@cs.miami.edu wrote:
 Noel,

 Thanks for the link.  But, I did not find anything on the order of the
 statements (but perhaps I missed it).  Lets say that one connection is
 executing and has the lock, and two others are blocked temporarily.
 Then after the release, one of the other two will get access and
 perhaps lock the Database?  But which one will get access?  That is
 what I am trying to understand.  Will the SQL statement that was
 submitted first get access (is it a type of queue), or is there no
 guarantee on this?

 Thanks,

 -Adam

 On Oct 31, 1:08 am, Noel Grandin noelgran...@gmail.com wrote:
 seehttp://www.h2database.com/html/features.html#multiple_connections







 Adam McMahon wrote:
  Hi,

  Quick question.  As I understand it, H2 handles the synchronization of
  SQL commands.  If a number of SQL commands hit the database from a
  variety of connections, do they execute in the order that H2 receives
  them?  If not, can a brief explanation be provided?

  Thanks,

  -Adam

 --
 You received this message because you are subscribed to the Google Groups H2 
 Database group.
 To post to this group, send email to h2-database@googlegroups.com.
 To unsubscribe from this group, send email to 
 h2-database+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/h2-database?hl=en.



-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Re: order of SQL operations

2011-10-31 Thread Adam McMahon
That makes sense regarding there being no grantee on the order of the
operations.

As an extension of the question, I am wondering about the clustering
of H2.  It seems that non-read only statements are sent to both
databases (and there are clear limitations as outlined in the docs).
While I have not looked at the code, it seems that the update executes
are simply run on all nodes, but will that always lead to the same
database?

Take for example, a simple update that changes an value.  Two
statements are executed in parallel by two different connections.  The
connection A sets the value to 1, and connection B sets the value to
2.  In a cluster, the statements are executed on both nodes, but since
we can't guarantee the order of the statements (as previously
discussed), it seems that it is possible that nodes in the cluster
might have different values for that data (depending on which
statement executes first).  One node might have 1 as the value, but
the other could have 2?  Is this correct?  Or is something else going
on in the clustering to prevent this from occurring.

Thanks,

-Adam


On Oct 31, 11:20 am, Noel Grandin noelgran...@gmail.com wrote:
 There is no guarantee. But that is the case with pretty much every SQL
 database engine out there.

 Note also that there is no global lock. Transactions will acquire
 row-level, and perhaps table-level locks, so two or more connections
 can actually execute at the same time.







 On Mon, Oct 31, 2011 at 18:08, Adam McMahon a...@cs.miami.edu wrote:
  Noel,

  Thanks for the link.  But, I did not find anything on the order of the
  statements (but perhaps I missed it).  Lets say that one connection is
  executing and has the lock, and two others are blocked temporarily.
  Then after the release, one of the other two will get access and
  perhaps lock the Database?  But which one will get access?  That is
  what I am trying to understand.  Will the SQL statement that was
  submitted first get access (is it a type of queue), or is there no
  guarantee on this?

  Thanks,

  -Adam

  On Oct 31, 1:08 am, Noel Grandin noelgran...@gmail.com wrote:
  seehttp://www.h2database.com/html/features.html#multiple_connections

  Adam McMahon wrote:
   Hi,

   Quick question.  As I understand it, H2 handles the synchronization of
   SQL commands.  If a number of SQL commands hit the database from a
   variety of connections, do they execute in the order that H2 receives
   them?  If not, can a brief explanation be provided?

   Thanks,

   -Adam

  --
  You received this message because you are subscribed to the Google Groups 
  H2 Database group.
  To post to this group, send email to h2-database@googlegroups.com.
  To unsubscribe from this group, send email to 
  h2-database+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/h2-database?hl=en.

-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.



Encyption key passed in the JDBC Url

2011-10-31 Thread Kris
Hi,
  I have a requirement which would require encryption keys to be maintained 
on the server side of our client-server application. When the user logs in 
via the client every time, the encryption key is available on the client in 
its memory received as a response value to the login call. We would like to 
cycle these keys on a regular basis on the server. My question is - would 
it be possible to pass the encryption key via the JDBC url parameters 
instead of pointing to the file (like   
jdbc:derby:salesdb;encryptionKey=6162636465666768;newEncryptionKey=6862636465666768
 
in Apache Derby). I would appreciate if anyone can share ideas along these 
lines.

Thanks,
Kris

-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/1PieEUEHb2UJ.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.