Problem starting connection pooling

Problem starting connection pooling

am 22.01.2010 17:21:46 von Mark Witczak

--------------090409060704090102040309
Content-Type: multipart/alternative;
boundary="------------000908020702090207090200"


--------------000908020702090207090200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I'm very new to MySQL, Tomcat, connection pooling, JSP, etc. and I've
been banging my head against a wall for two weeks trying to get a simple
program to connect to a MySQL database.

*Vital Stats:*
Ubuntu 9.10, Java 1.6.0_0, Java Servelet 2.5, Java Server Pages 2.1,
JSTL 1.2, Apache2, Tomcat 6.0.20, MySQL 5.1.41 & 5.0.67
MySQL Connector/J 5.1.11 (also 5.1.10) - in $CATALINA_HOME/lib
dbcp 1.2.1 - in $CATALINA_HOME/lib
(all standard Ubuntu issue)

*testapp/WEB-INF/web.xml:*

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">


Servlet and JSP Examples.

Servlet and JSP Examples


DB Connection
jdbc/mydatabase
javax.sql.DataSource
Container



*testapp/META-INF/context.xml:*



type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="foo" password="bar"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://test.hostname.com:3306/database_test1"/>


*testapp/testapp.jsp:*
<%@ page contentType="text/html" %>
<%-- These libraries are required for the and tags --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>



JNDI DBCP Test Page



JNDI DBCP Test Page



Executing the query ...



<%-- Note: Enter a query that is valid for your database here --%>

SELECT company FROM manuals




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.g etConnection(Unknown
Source)
at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.d oStartTag(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.ja va: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.

What is going on here? What am I missing? What is going on here? How do
I fix it?

-Do I need to create a "foo" user in the tomcat-users.xml?
-Do I have to mess with the policy files? or security?

Thanks for your help.
Mark



--------------000908020702090207090200
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit




content="text/html; charset=ISO-8859-1">


 I'm very new to MySQL, Tomcat, connection pooling, JSP, etc. and I've
been
banging my head against a wall for two weeks trying to get a simple
program to connect to a MySQL database.



Vital Stats:

Ubuntu 9.10, Java 1.6.0_0,  Java Servelet 2.5, Java Server Pages 2.1,
JSTL 1.2, Apache2, Tomcat 6.0.20, MySQL 5.1.41 & 5.0.67

MySQL Connector/J 5.1.11 (also 5.1.10) - in $CATALINA_HOME/lib

dbcp 1.2.1 - in $CATALINA_HOME/lib

(all standard Ubuntu issue)



testapp/WEB-INF/web.xml:

<?xml version="1.0"
encoding="ISO-8859-1"?>

<web-app xmlns= class="moz-txt-link-rfc2396E" href="http://java.sun.com/xml/ns/javaee">"http://java.sun.co m/xml/ns/javaee"

   xmlns:xsi= href="http://www.w3.org/2001/XMLSchema-instance">"http://www .w3.org/2001/XMLSchema-instance"

   xsi:schemaLocation= class="moz-txt-link-rfc2396E"
href="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/x ml/ns/javaee/web-app_2_5.xsd">"http://java.sun.com/xml/ns/ja vaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"


   version="2.5">



    <description>

      Servlet and JSP Examples.

    </description>

    <display-name>Servlet and JSP Examples</display-name>



  <resource-ref>

      <description>DB Connection</description>

      <res-ref-name>jdbc/mydatabase</res-ref-name>

      <res-type>javax.sql.DataSource</res-type>

      <res-auth>Container</res-auth>

  </resource-ref>

</web-app>




testapp/META-INF/context.xml:

<?xml version="1.0"
encoding="UTF-8"?>



<Context>

  <Resource name="jdbc/mydatabase" auth="Container"
type="javax.sql.DataSource"

               maxActive="100" maxIdle="30" maxWait="10000"

               username="foo" password="bar"
driverClassName="com.mysql.jdbc.Driver"

              
url="jdbc:mysql://test.hostname.com:3306/database_test1"/>

</Context>




testapp/testapp.jsp:

<%@ page
contentType="text/html" %>

<%-- These libraries are required for the <c> and <sql>
tags --%>

<%@ taglib prefix="c" uri= class="moz-txt-link-rfc2396E" href="http://java.sun.com/jsp/jstl/core">"http://java.sun.co m/jsp/jstl/core"
%>

<%@ taglib prefix="sql" uri= class="moz-txt-link-rfc2396E" href="http://java.sun.com/jsp/jstl/sql">"http://java.sun.com /jsp/jstl/sql"
%>

<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">

<html>

<head>

    <title>JNDI DBCP Test Page</title>

</head>

<body>



    <h1>JNDI DBCP Test Page</h1>

    <br/>Executing the query ...

    <br/>



    <%-- Note: Enter a query that is valid for your database here
--%>

    <sql:query var="result" dataSource="jdbc/mydatabase">

        SELECT company FROM manuals

    </sql:query>

</body>

</html>




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:



face="Courier New, Courier, monospace">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.g etConnection(Unknown
Source)

        at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.d oStartTag(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.ja va: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.



What is going on here? What am I missing? What is going on here? How do
I fix it?



-Do I need to create a "foo" user in the tomcat-users.xml?

-Do I have to mess with the policy files? or security?



Thanks for your help.

Mark








--------------000908020702090207090200--

--------------090409060704090102040309
Content-Type: text/plain;
name="Attached Message Part"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="Attached Message Part"


No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.432 / Virus Database: 271.1.1/2636 - Release Date: 01/21/10 07:34:00



--------------090409060704090102040309
Content-Type: text/plain; charset=us-ascii


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
--------------090409060704090102040309--

Re: Problem starting connection pooling

am 22.01.2010 17:38:17 von Mark Matthews

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.g etConnection(Unknown Source)
> at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.d oStartTag(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.ja va: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=gcdmg-mysql-2@m.gmane.org

Re: Problem starting connection pooling

am 22.01.2010 17:49:36 von Mark Witczak

--------------010204020507090806090106
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Alright, here is the entire log entry:

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.SQLNe
stedException: Cannot create PoolableConnectionFactory (Communications
link failure

The last packet sent successfully to the server was 0 milliseconds ago.
The driver has not received any pack
ets from the server.)"
at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.g etConnection(Unknown
Source)
at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.d oStartTag(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.ja va:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper.java:374)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:342)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java :267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil .java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
at
org.apache.catalina.security.SecurityUtil.execute(SecurityUt il.java:301)
at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(Secu rityUtil.java:162)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:283)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(A pplicationFilterChain.java:56)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(Applic ationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:185)
at
org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.java:454)
at java.lang.Thread.run(Thread.java:636)

Also, the MySQL instance I'm connecting to is hosted by dreamhost. I
don't have any control over their networking configuration. Is there a
command that will tell me if the --skip-networking flag was used for
startup?

On 1/22/2010 11:38 AM, Mark Matthews wrote:
> 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.g etConnection(Unknown Source)
>> at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.d oStartTag(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.ja va: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
>
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.432 / Virus Database: 271.1.1/2638 - Release Date: 01/22/10 07:34:00
>
>

--------------010204020507090806090106--

Re: Problem starting connection pooling

am 22.01.2010 18:09:05 von Mark Matthews

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

> Alright, here is the entire log entry:
>
> 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.SQLNe
> stedException: Cannot create PoolableConnectionFactory (Communications link failure
>
> The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any pack
> ets from the server.)"
> at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.g etConnection(Unknown Source)
> at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.d oStartTag(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.ja va:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper.java:374)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:342)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java :267)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil .java:269)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
> at org.apache.catalina.security.SecurityUtil.execute(SecurityUt il.java:301)
> at org.apache.catalina.security.SecurityUtil.doAsPrivilege(Secu rityUtil.java:162)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:283)
> at org.apache.catalina.core.ApplicationFilterChain.access$000(A pplicationFilterChain.java:56)
> at org.apache.catalina.core.ApplicationFilterChain$1.run(Applic ationFilterChain.java:189)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:185)
> at org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:233)
> at org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:128)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:293)
> at org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:849)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:583)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.java:454)
> at java.lang.Thread.run(Thread.java:636)
>
> Also, the MySQL instance I'm connecting to is hosted by dreamhost. I don't have any control over their networking configuration. Is there a command that will tell me if the --skip-networking flag was used for startup?

Mark,

In "mysql", issuing "show variables like 'skip_networking'" should tell you.

-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=gcdmg-mysql-2@m.gmane.org

Re: Problem starting connection pooling

am 22.01.2010 18:16:59 von Mark Witczak

--------------090209080307010507030205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

skip-networking is OFF

On 1/22/2010 12:09 PM, Mark Matthews wrote:
> On Jan 22, 2010, at 10:49 AM, Mark Witczak wrote:
>
>
>> Alright, here is the entire log entry:
>>
>> 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.SQLNe
>> stedException: Cannot create PoolableConnectionFactory (Communications link failure
>>
>> The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any pack
>> ets from the server.)"
>> at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.g etConnection(Unknown Source)
>> at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.d oStartTag(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.ja va:70)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>> at org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper.java:374)
>> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:342)
>> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java :267)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:616)
>> at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil .java:269)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
>> at org.apache.catalina.security.SecurityUtil.execute(SecurityUt il.java:301)
>> at org.apache.catalina.security.SecurityUtil.doAsPrivilege(Secu rityUtil.java:162)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:283)
>> at org.apache.catalina.core.ApplicationFilterChain.access$000(A pplicationFilterChain.java:56)
>> at org.apache.catalina.core.ApplicationFilterChain$1.run(Applic ationFilterChain.java:189)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:185)
>> at org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:233)
>> at org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
>> at org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:128)
>> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
>> at org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
>> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:293)
>> at org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:849)
>> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:583)
>> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.java:454)
>> at java.lang.Thread.run(Thread.java:636)
>>
>> Also, the MySQL instance I'm connecting to is hosted by dreamhost. I don't have any control over their networking configuration. Is there a command that will tell me if the --skip-networking flag was used for startup?
>>
> Mark,
>
> In "mysql", issuing "show variables like 'skip_networking'" should tell you.
>
> -Mark
>
>
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.432 / Virus Database: 271.1.1/2638 - Release Date: 01/22/10 07:34:00
>
>

--------------090209080307010507030205--