This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
Joined: Dec 07, 2004
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' error.
Ps: I havent fixex the "don't save the datasource" problem. I've just put the <context> inside server.xml
Joined: Dec 07, 2004
Fixed 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 type="javax.sql.DataSource" auth="Container" name="jdbc/tcrud" factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="100" maxIdle="30" maxWait="10000" username="root" password="" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/tcrud?autoReconnect=true" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" /> Resource params does not work as nested properties