tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregor Schneider <>
Subject Re: tomcat only query localhost database
Date Tue, 03 Feb 2009 09:16:03 GMT
Sorry, but you're providing too few informations.

- please post the file /etc/tomcat6/Catalina/localhost/webappName.xml
(masquerade the user-id / password!)

- please post the piece of code where the said webapp tries to create
the database-connection.
should looke similar to

	    try {
		Context env = (Context) new InitialContext()
		dbDS = (DataSource) env.lookup(dataSourceName);
		if (dbDS == null) {
		    logger.error("seems that '" + dataSourceName
			    + "' is an unknown DataSource");
		    throw new ServletException("'" + dataSourceName
			    + "' is an unknown DataSource");
	    } catch (NamingException e) {
		logger.error("Exception caught:", e);
		throw new ServletException(e);

My guess is, that within the app's code, the connection to the
database is not established to the said datasource but that somewhere
"localhost" is hardcoded.... *sic*

So have a chat with the webapp-developer and let us have a look at the code.


just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message