H2 intenta crear una base de datos en una ubicación no válida

when I try to create a database in H2 in the web console with the following url

jdbc:h2:tcp://localhost/data/vervikMonitor

Obtuve el siguiente error:

IO Exception: "java.io.FileNotFoundException: 
C:\Program Files\H2\bin\data\vervikMonitor.lock.db (No access)"; 
"C:/Program Files/H2/bin/data/vervikMonitor.lock.db" [90031-162] 90031/90031 (Help)

I have a norwegian version of Windows, so the path to my program folder is C:/Programfiler/ - why does H2 try to access the english style c:/Program Files/, where is that reference stored?

preguntado el 02 de febrero de 12 a las 10:02

Where and how did you start H2 in server mode? -

The installer (NSIS) most likely installed H2 in the directory C:/Program Files/ and this is where you started the H2 server I guess. Or possibly H2 isn't installed in this directory, but the current working directory of the H2 server is C:/Program Files/ when that program was started. -

the strange thing is that "c:/Program Files" doesnt even exist on my machine, I have it in norwegain "C:/Programfiler". I downloaded in from Firfox and just ran the executable from there Firefox downloaded it, which in this case was the regular download folder in my user dir. -

Well, what file did you download and run? The installer? -

1 Respuestas

Try absolute paths (note the //):

jdbc:h2:tcp://localhost//data/vervikMonitor

Of course you must make sure that C:\data\vervikMonitor is writable. Or you can use a different directory :)

Respondido 02 Feb 12, 15:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.