On Jan 22, 2010, at 10:21 AM, Mark Witczak wrote:

>  [snip]
> I create the WAR (jar cvf testapp.war *), undeploy the old version and 
> redeploy the new one through Tomcat Web Application Manager. Then restart 
> Tomcat (sudo /etc/init.d/tomcat restart). The result is:
> 
> Jan 21, 2010 9:40:35 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Jan 21, 2010 9:40:35 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Jan 21, 2010 9:43:06 PM org.apache.catalina.core.StandardWrapperValve invoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: 
> "org.apache.commons.dbcp.SQLNestedException: Cannot create 
> PoolableConnectionFactory (Communications link failure
> 
> The last packet sent successfully to the server was 0 milliseconds ago. The 
> driver has not received any packets from the server.)"
>         at 
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown
>  Source)
>         at 
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown 
> Source)
>         at 
> org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(test_jsp.java:188)
>         at org.apache.jsp.test_jsp._jspService(test_jsp.java:138)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> Blah, Blah, Blah....
> 
> More info: The connection to MySQL tested successfully using the command line 
> 'mysql'. There are no firewalls, that I can find, between the servers.

Mark,

What message is where you posted "blah blah blah". *Usually* there's 
information from the driver right there, which will have the details of why 
there was a communications link failure.

If I had to guess, your mysql server was started with --skip-networking (most 
debian-based distributions do this by default), and "mysql" is using unix 
domain sockets (which Java can't) to speak to mysqld. If that's the case, 
you'll have to reconfigure mysqld to listen at least on the loopback 
(127.0.0.1) by removing --skip-networking from my.cnf and adding 
--bind-address=127.0.0.1

        -Mark
-- 
Mark Matthews, Architect - Enterprise Tools
MySQL @ Sun Microsystems, Inc., http://www.sun.com/mysql/





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to