It's not a secret anymore!
The moose likes Tomcat and the fly likes Tomcat 5.5.9 admin and Datasources Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 5.5.9 admin and Datasources" Watch "Tomcat 5.5.9 admin and Datasources" New topic

Tomcat 5.5.9 admin and Datasources

Vinicius Carvalho
Ranch Hand

Joined: Dec 07, 2004
Posts: 61
Hello there! Back on 4.x era, I always had my datasources configured through the admin console. Now that it's gone from basic distribution on 5.5, I've downloaded and installed it, but when I save a datasource, when the server re-starts it vanish from there. It's not saving the datasource. Well, so I tried the old way, putting it on the server.xml:

And my hibernate.cfg.xml has this line:
<property name="connection.datasource">java:comp/env/jdbc/tcrud</property>

But I'm getting an error:
FATAL main org.hibernate.connection.DatasourceConnectionProvider - Could not find datasource: java:comp/env/jdbc/tcrud
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

Any ideas?


Vinicius Carvalho
Ranch Hand

Joined: Dec 07, 2004
Posts: 61
Ok I fixed it, and got in another nightmare.
A few months ago I gave up on tomcat 5.x datasource configuration (it's a pain configuring it, this is one lesson the guys from tomcat should take from jboss group). Everthing I've done, searched the web I always get the:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

So I found spring which would manage my ds pools and everthing was OK I didnt need tomcat 5.x ds support (or the lack of it). Now the nightmare begins once again...
I've read :
I do have my driver on common/lib folder
And yet, it simply does not work.
I know ppl use datasource + tomcat, could someone help me out with this?

Ps: I havent fixex the "don't save the datasource" problem. I've just put the <context> inside server.xml

Thanks all
Vinicius Carvalho
Ranch Hand

Joined: Dec 07, 2004
Posts: 61
Ok, I love tomcat, but I really would like to kill someone for this:

It seems that the order of the params matter and what's worse: only through this I could accomplish:
Resource params does not work as nested properties

Shame on you tomcat
I agree. Here's the link:
subject: Tomcat 5.5.9 admin and Datasources
It's not a secret anymore!