The problem seems to be that hibernate is calling the getConnection(id,
pw) method rather than the getConnection() method.
The first (id, pw) method is not valid for a pooled datasource.
It appears from the trace that hibernate is trying to manage it's own
connections.
When running in a web container hibernate should use the container
datasource pooling. The hibernate.properties file in WEB-INF/classes
should contain the property
hibernate.connection.datasource=java:comp/env/jdbc/calDB
and any jdbc properties should be absent (or commented out).
The hibernate.cfg.xml file should not contain any jdbc/datasource properties
Can you take a look at those files in the deployed application. You also
should have a context.xml file copied into conf/Catalina/localhost for
each deployed app. Is that there and does it look correct.
在hibernate.cfg.xml文件中不要再配置数据源链接信息,直接在tomcat中配置!