This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Trouble with configuring Context DataSource (SQlite) in Tomcat6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Trouble with configuring Context DataSource (SQlite) in Tomcat6" Watch "Trouble with configuring Context DataSource (SQlite) in Tomcat6" New topic

Trouble with configuring Context DataSource (SQlite) in Tomcat6

Rj Kattke

Joined: Oct 04, 2010
Posts: 12
( I hope I'm in the right forum ) Although I'm on WinXP I'm going to refer to my paths with / -hopefully more universal for configurations.
I'm using: TC6, WinXP, JDK6 --and--
SQlite which is the file-based, RDMS, and the JDBC URL should point to the file.

I was encouraged by setting up a DataSource in a test Project on Tomcat
I created a Context file, named {CATALINA_HOME}/conf/Catalina/localhost/{MyAppContext}.xml

I configured a DataSource in it and proceeded to use JSTL sql tags; everything went well.
I used a fully qualified drive/path, and didn't notice until afterwards, that I had left the slashes like \ Windows, style.

Now that that POC was done, I tried on my real project, and hoping for full portability, decided to use the local

I first tried to use a relative path, but no luck.
Then tried fully qualified path (as I had done before with success) and also both style of path slashes.
I'm getting the error below, and I can't seem to shake it.... Is something fundamentally different about using the local Context ?
When using the local Context, do I also have to name it {MyAppContext}.xml

I'll paste in the error (below) but it's strange because it doesn't reflect the path I specified in Context.xml
I specified it like this:

Your thoughts, answers and solutions, greatly appreciated.

INFO: Server startup in 2247 ms
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnection
Factory (path to '/WEB-INF/my_data.sqlite': 'C:\WEB-INF' does not exist)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDat

I agree. Here's the link:
subject: Trouble with configuring Context DataSource (SQlite) in Tomcat6
It's not a secret anymore!