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 <[email protected] <javascript:_e({}, > 'cvml', '[email protected]');>> > >> 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 >> [email protected]<javascript:_e({}, 'cvml', >> '[email protected]');> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:_e({}, 'cvml', >> 'h2-database%[email protected]');>. >> 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 > [email protected]<javascript:_e({}, 'cvml', > '[email protected]');> > . > To unsubscribe from this group, send email to > [email protected] <javascript:_e({}, 'cvml', > 'h2-database%[email protected]');>. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
