wkim / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

org.h2.jdbc.JdbcSQLException: Error while creating file #386

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Environment:
This is a Play-2.0 Application.  
H2 version: 1.3.164
OS        : Ubuntu 11.10 (GNU/Linux 3.0.0-12-server x86_64)
JDK       : 64-Bit Server VM, 1.7.0_03

Settings:
...
db.default.url="jdbc:h2:~/data/db/coolb;FILE_LOCK=SOCKET"
...

Description:

  Running for some time, database access is broken,  throw exceptions:

2012-03-20 08:42:40,441 - [ERROR] - from com.jolbox.bonecp.PoolWatchThread in 
BoneCP-pool-watch-thread 
Error in trying to obtain a connection. Retrying in 5000ms
org.h2.jdbc.JdbcSQLException: Error while creating file "/home/cha/data" 
[90062-164]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.message.DbException.get(DbException.java:169) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.message.DbException.get(DbException.java:146) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.store.fs.FilePathDisk.createDirectory(FilePathDisk.java:247) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.store.fs.FileUtils.createDirectory(FileUtils.java:46) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.store.fs.FileUtils.createDirectories(FileUtils.java:300) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.store.fs.FileUtils.createDirectories(FileUtils.java:299) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.store.FileLock.lockSocket(FileLock.java:363) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.store.FileLock.lock(FileLock.java:131) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.Database.open(Database.java:542) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.Database.openDatabase(Database.java:222) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.Database.<init>(Database.java:217) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.Engine.openSession(Engine.java:56) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.Engine.openSession(Engine.java:159) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.Engine.createSessionAndValidate(Engine.java:138) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.Engine.createSession(Engine.java:121) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.Engine.createSession(Engine.java:28) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:305) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94) ~[h2-1.3.164.jar:1.3.164]
    at org.h2.Driver.connect(Driver.java:72) ~[h2-1.3.164.jar:1.3.164]
    at java.sql.DriverManager.getConnection(DriverManager.java:579) ~[na:1.7.0_03]
    at java.sql.DriverManager.getConnection(DriverManager.java:221) ~[na:1.7.0_03]
    at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:256) ~[bonecp.jar:0.7.1.RELEASE]
    at com.jolbox.bonecp.ConnectionHandle.obtainInternalConnection(ConnectionHandle.java:211) ~[bonecp.jar:0.7.1.RELEASE]
    at com.jolbox.bonecp.ConnectionHandle.<init>(ConnectionHandle.java:170) ~[bonecp.jar:0.7.1.RELEASE]
    at com.jolbox.bonecp.PoolWatchThread.fillConnections(PoolWatchThread.java:101) [bonecp.jar:0.7.1.RELEASE]
    at com.jolbox.bonecp.PoolWatchThread.run(PoolWatchThread.java:82) [bonecp.jar:0.7.1.RELEASE]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_03]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_03]
    at java.lang.Thread.run(Thread.java:722) [na:1.7.0_03]

   But, the "/home/cha/data" directory already exists. What is wrong?

Original issue reported on code.google.com by live.t...@gmail.com on 20 Mar 2012 at 1:45

GoogleCodeExporter commented 8 years ago
Hi,

Please use StackOverflow or the H2 Google Group for questions, not the issue 
tracker.

I don't know what's wrong, probably file access rights or something like this. 
If you look at the source code, you see that it couldn't create the directory. 
I suggest to debug this yourself.

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 21 Mar 2012 at 6:00