I'm guessing, but based on my previous experience with Tomcat, you're probably trying to write to a directory which Tomcat believes you don't have permission to access. Tomcat installs it's own SecurityContext which restricts each WAR to have access to only certain directories.
You need to do something in the configuration to make it work.

Thomas, our problem is that FilePathDisk#createFile() cannot tell the difference between
"access denied because of permission problem"
and
"access denied because of locking problem"

Perhaps when we start using the new JDK7 file API's, we'll be able to tell the difference.


On 2012-10-26 15:02, Thomas Mueller wrote:
Hi,

That's strange. I never saw a case so far where the file locking mechanism was hanging (either it works within a second or, or it fails). Are you sure it actually hangs, or is it possibly just slow (taking a second or so)?

What file system do you use? Maybe the last modified time doesn't match the system time. I saw this in some cases (when using NFS for example).

I don't recommend using FILE_LOCK=SOCKET because it is rather dangerous as it relies on network connectivity and correctly configured network settings. I would rather suggest to use FILE_LOCK=FS. Could you try that?

Regards,
Thomas



On Fri, Oct 26, 2012 at 9:54 AM, Tejas Shah <[email protected] <mailto:[email protected]>> wrote:

    I am using H2 with default settings on Red Hat Enterprise Linux
    and it causes my tocat server to hang. I created a thread dump and
    it looks like H2 keep waiting for gaining lock over the database
    file. No Exceptions anywhere. No deadlocks detected in thread
    dump. I have tried using sun/Oracle JDK as well as Open JDK.
    Please note the same application works fine under Windows 7,
    ubuntu 12.04 and Cent OS 5.x

    Solution to this was change it to use: FILE_LOCK=SOCKET

    Now, can anybody tell me if I can use this or not? I have a single
    application accessing the database.


-- 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/-/GCG1LYWYLvcJ.
    To post to this group, send email to [email protected]
    <mailto:[email protected]>.
    To unsubscribe from this group, send email to
    [email protected]
    <mailto: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.

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

Reply via email to