I have 4 Tomcat environments for the same application:
two development machines, 1 test and 1 production.
Development machines are Windows 2000 and Vista, the
others are linux. All 4 machines have Tomcat 6.0.14
installed.
I really have problems getting the application
properly deployed and configured. I have a global
datasource configured in tomcat's server.xml and the
mysql driver jar is in the /lib directory of tomcat.
If I deploy the application by putting it in the
webapps dir or using the ant manager tasks, I get this
exception:
Caused by:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at
org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
... 45 more
If I copy the contents of the application's
META-INF/context.xml into the server.xml, then the
application and datasources loads fine, no problems.
It looks something like:
<Context path="/myapp" docBase="path_to_war" debug="0"
reloadable="false" antiJARLocking="true"
antiResourceLocking="true" crossContext="true">
<ResourceLink name="jdbc/mydatasource"
global="jdbc/mydatasource" type="javax.sql.DataSource"
/>
</Context>
(I then have a context.xml and the same part in the
server.xml, but it doesn't seem to do harm)
But then I cannot use the ant manager tasks to
redeploy the application:
C:\projects\myapp\build.xml:198: FAIL - Context /myapp
is defined in server.xml and may not be undeployed
On the test and production (linux) servers, its not
that critical, as I do not do a lot of deployments. So
there I have the app configured in server.xml and a
deployment basically means stopping stopping,
unzipping the war to an exploded docbase dir and
starting tomcat again. (The restarting is also
required because I use hibernate and there are some
known memory leak issues there)
So can someone clarify where/how the application must
be configured to be able to use the ant manager tasks,
but also to get the datasource working?
Thanks!
Charl
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]