Re: Cannot get connection

2012-10-30 Thread Thomas Mueller
Hi,

I'm sorry, I confused user.dir with user.home. You are right, the database
should be created there. It does in my case.

Regards,
Thomas


On Sunday, September 30, 2012, Carlos Hoces wrote:

 Hi,

 According to JavaSE Javadocs:
 http://docs.oracle.com/javase/7/docs/api/java/lang/System.html
 user.dir  User's current working directory
 so I don't quite understand why you seem to distinguish between them.

 Either case, I still do not understand why it works as expected under 166
 and before, and fails under 168/169
 It looks like either a bug in those later versions, or a behaviour change
 in the H2 specs.

 I will try asap that  h2.baseDir system property I wasn't aware of until
 now, and see what happens.

 Regards,
 Carlos


 2012/9/30 Thomas Mueller thomas.tom.muel...@gmail.com javascript:_e({},
 'cvml', 'thomas.tom.muel...@gmail.com');

 Hi,

 * jdbc:h2:h2/jplaydb *doesn`t work at all! It should create the folder
 and the database under user.dir as in prevoius H2 versions, I guess. No
 hope! Here is when I get the connection null.

 In this case, the database file should be created relative to the current
 working directory (see the docs), not relative to the user.dir. This always
 was the case for H2 (even in older versions). However, there is an
 exception if you use the system property h2.baseDir, in this case it is
 created relative to this directory. But in any case the connection returned
 by DriverManager is not null; either it works or it throws an exception
 (for me).

 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.




 --
 Carlos Hoces
 jPlay project http://www.javaforge.com/project/jplay

  --
 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: Cannot get connection

2012-09-30 Thread Thomas Mueller
Hi,

* jdbc:h2:h2/jplaydb *doesn`t work at all! It should create the folder and
the database under user.dir as in prevoius H2 versions, I guess. No hope!
Here is when I get the connection null.

In this case, the database file should be created relative to the current
working directory (see the docs), not relative to the user.dir. This always
was the case for H2 (even in older versions). However, there is an
exception if you use the system property h2.baseDir, in this case it is
created relative to this directory. But in any case the connection returned
by DriverManager is not null; either it works or it throws an exception
(for me).

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: Cannot get connection

2012-09-30 Thread Carlos Hoces
Hi,

According to JavaSE Javadocs:
http://docs.oracle.com/javase/7/docs/api/java/lang/System.html
user.dir  User's current working directory
so I don't quite understand why you seem to distinguish between them.

Either case, I still do not understand why it works as expected under 166
and before, and fails under 168/169
It looks like either a bug in those later versions, or a behaviour change
in the H2 specs.

I will try asap that  h2.baseDir system property I wasn't aware of until
now, and see what happens.

Regards,
Carlos


2012/9/30 Thomas Mueller thomas.tom.muel...@gmail.com

 Hi,

 * jdbc:h2:h2/jplaydb *doesn`t work at all! It should create the folder
 and the database under user.dir as in prevoius H2 versions, I guess. No
 hope! Here is when I get the connection null.

 In this case, the database file should be created relative to the current
 working directory (see the docs), not relative to the user.dir. This always
 was the case for H2 (even in older versions). However, there is an
 exception if you use the system property h2.baseDir, in this case it is
 created relative to this directory. But in any case the connection returned
 by DriverManager is not null; either it works or it throws an exception
 (for me).

 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.




-- 
Carlos Hoces
jPlay project http://www.javaforge.com/project/jplay

-- 
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: Cannot get connection

2012-09-19 Thread Thomas Mueller
Hi,

There are no error messages at all: the connection returned from the
 DriverManager is null.


Could you debug the DriverManager? That sounds very strange.

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: Cannot get connection

2012-09-18 Thread Carlos Hoces
There are no error messages at all: the connection returned from the
DriverManager is null.
Yes, I use a relative path. This works perfectly under version 166 and
before: if the folder does not exist, it is created by H2 engine, otherwise
it's used.
None of this happens with versions 168 and 169: no folder creation, no
database creation. Even if the folder and database exists, it's no
addressed at all.

2012/9/18 Brian iwor...@gmail.com

 Can you provide the error message?  Or was the data just not there?
 I see you're using a relative path for the file - so the actual location
 of the file H2 is using would change depending on where (which working
 directory) your program is launched from.

 On Sunday, September 9, 2012 12:32:55 PM UTC-7, choces wrote:

 I've run into a trouble after switching from 166 to 168 version

 The url I use is as follows: jdbc:h2:h2/jplaydb

 Under 166 I get a connection w/o any trouble, and the database works
 perfectly.
 Soon after switching to either 168, or to the recent 169, w/o any changes
 in my codebase, I don't get a connection anymore.

 I've tried to use jdbc:h2:file:h2/jplaydb just in case, with no luck.

 I'm running it under JavaSE 1.7u7 either case.

  --
 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/-/e8e05JjMoxIJ.
 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.




-- 
Carlos Hoces
jPlay project http://www.javaforge.com/project/jplay

-- 
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: Cannot get connection

2012-09-17 Thread Brian
Can you provide the error message?  Or was the data just not there?
I see you're using a relative path for the file - so the actual location of 
the file H2 is using would change depending on where (which working 
directory) your program is launched from.

On Sunday, September 9, 2012 12:32:55 PM UTC-7, choces wrote:

 I've run into a trouble after switching from 166 to 168 version

 The url I use is as follows: jdbc:h2:h2/jplaydb

 Under 166 I get a connection w/o any trouble, and the database works 
 perfectly.
 Soon after switching to either 168, or to the recent 169, w/o any changes 
 in my codebase, I don't get a connection anymore.

 I've tried to use jdbc:h2:file:h2/jplaydb just in case, with no luck.

 I'm running it under JavaSE 1.7u7 either case.


-- 
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/-/e8e05JjMoxIJ.
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.



Cannot get connection

2012-09-09 Thread choces
I've run into a trouble after switching from 166 to 168 version

The url I use is as follows: jdbc:h2:h2/jplaydb

Under 166 I get a connection w/o any trouble, and the database works 
perfectly.
Soon after switching to either 168, or to the recent 169, w/o any changes 
in my codebase, I don't get a connection anymore.

I've tried to use jdbc:h2:file:h2/jplaydb just in case, with no luck.

I'm running it under JavaSE 1.7u7 either case.

-- 
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/-/BL73Mx1xaToJ.
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.