Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8035249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:15:27+00:00 2026-06-05T02:15:27+00:00

I have a GWT web application that creates a cache on disk under the

  • 0

I have a GWT web application that creates a cache on disk under the relative directory “cache”. In my JUnit tests in eclipse it works but when I deploy it in Tomcat, the program still tries to create the file in /home/username/projects/myproject/cache (real path renamed) instead of /var/lib/tomcat7/webapps/myproject/cache and because it doesn’t have file write access there, it crashes. The code that creates the cache is an external library so it cannot even be hardcoded.

Could it be a symbolic link? Or can Tomcat and Eclipse share a JVM?
This error is driving me crazy.

The error message

org.h2.jdbc.JdbcSQLException: Fehler beim Erzeugen der Datei "/home/username/projects/myproject/cache"
Error while creating file "/home/username/projects/myproject/cache" [90062-143]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
    at org.h2.message.DbException.get(DbException.java:167)
    at org.h2.message.DbException.get(DbException.java:144)
    at org.h2.store.fs.FileSystemDisk.createDirs(FileSystemDisk.java:368)
    at org.h2.store.FileLock.lockFile(FileLock.java:328)
    at org.h2.store.FileLock.lock(FileLock.java:134)
    at org.h2.engine.Database.open(Database.java:525)
    at org.h2.engine.Database.openDatabase(Database.java:208)
    at org.h2.engine.Database.<init>(Database.java:203)
    at org.h2.engine.Engine.openSession(Engine.java:53)
    at org.h2.engine.Engine.openSession(Engine.java:147)
    at org.h2.engine.Engine.createSessionAndValidate(Engine.java:126)
    at org.h2.engine.Engine.createSession(Engine.java:109)
    at org.h2.engine.Engine.createSession(Engine.java:27)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:289)
    at org.h2.engine.SessionRemote.createSession(SessionRemote.java:265)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
    at org.h2.Driver.connect(Driver.java:73)
    at java.sql.DriverManager.getConnection(DriverManager.java:579)
    at java.sql.DriverManager.getConnection(DriverManager.java:221)

[…]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:15:31+00:00Added an answer on June 5, 2026 at 2:15 am

    Please try

    String path = new File(servletContext.getRealPath("/cache")).getAbsolutePath()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that is working fine under the following environment GWT
I'm coding a web application in GWT. I have a class that handles all
I'm creating a web application with GWT. I have a method bookMode() that builds
I have a web application that I developed with the Google Web Toolkit (GWT),
I have a GWT web application that I have deployed in App engine, however
I have a GWT based web application that I have previously uploaded to Appspot.
I have gwt-project that is comunication to database. Application design mvp pattern and view
I have gwt web project, which must use application.properties (on client side) loaded as
This may be an incredibly stupid question, but I have a web application that
I have some doubts, i m developing a web application in GWT using MVP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.