tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hari Venkatesan" <hvenkate...@pfgc.com>
Subject RE: Strange JDBC Error
Date Fri, 01 Nov 2002 21:15:51 GMT
Did you define the datasource in web.xml? ?

Hari Venkatesan
Performance Food Group
Phone : 804 484 6263


-----Original Message-----
From: John Mattos [mailto:mattosj@yahoo.com] 
Sent: Friday, November 01, 2002 3:52 PM
To: Tomcat Users List
Subject: Strange JDBC Error


I'm using a JDBC Datasource with Tomcat 4.1.12 as follows.

Server.xml snippet:

          <Resource name="jdbc/indemand" scope="Shareable"
type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/indemand">
            <parameter>
              <name>validationQuery</name>
              <value>select top 100 * from Subscriber</value>
            </parameter>
            <parameter>
              <name>url</name>
 
<value>jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse
</value>
            </parameter>
            <parameter>
              <name>password</name>
              <value>tibco_user</value>
            </parameter>
            <parameter>
              <name>maxActive</name>
              <value>10</value>
            </parameter>
            <parameter>
              <name>maxWait</name>
              <value>5000</value>
            </parameter>
            <parameter>
              <name>driverClassName</name>
 
<value>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</value>
            </parameter>
            <parameter>
              <name>username</name>
              <value>tibco_user</value>
            </parameter>
            <parameter>
              <name>maxIdle</name>
              <value>2</value>
            </parameter>
          </ResourceParams>

END OF Server.xml Snippet

When I cause a database access within my application, I get the
following horrifying result. It's the "Error Establishing Socket" error
that's worrying me, as I'm using the native Microsoft SQL Server
Drivers. The ones in my lib directory are msutil.jar, msutil.jar, and
mssqlserver.jar

Any thoughts?

John

java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error
establishing socket.
        at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
Source)
        at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
        at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
        at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
        at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:140)
        at
com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnection
Pool.java:174)
        at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionFo
rTibco(ConnectionFactory.java:59)
        at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(C
onnectionFactory.java:40)
        at
com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(Databa
seUtility.java:123)
        at
com.thoughtworks.clearinghouse.web.service.UserProfileService.validateUs
erNamePassword(UserProfileService.jav
a:16)
        at
com.thoughtworks.clearinghouse.web.servlet.LogonAction.actionExecuted(Lo
gonAction.java:48)
        at
com.thoughtworks.clearinghouse.web.servlet.AbstractAction.execute(Abstra
ctAction.java:38)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:437)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
264)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
6)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
5)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:380)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
8)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:533)
        at java.lang.Thread.run(Thread.java:536)
com.thoughtworks.clearinghouse.util.SystemException: failed to load user
        at
com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(Databa
seUtility.java:147)
        at
com.thoughtworks.clearinghouse.web.service.UserProfileService.validateUs
erNamePassword(UserProfileService.jav
a:16)
        at
com.thoughtworks.clearinghouse.web.servlet.LogonAction.actionExecuted(Lo
gonAction.java:48)
        at
com.thoughtworks.clearinghouse.web.servlet.AbstractAction.execute(Abstra
ctAction.java:38)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:437)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
264)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
6)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
5)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:380)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
8)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:533)
        at java.lang.Thread.run(Thread.java:536)
Caused by: java.sql.SQLException: [Microsoft][SQLServer JDBC
Driver]Error establishing socket.
        at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
Source)
        at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
        at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
        at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
        at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:140)
        at
com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnection
Pool.java:174)
        at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionFo
rTibco(ConnectionFactory.java:59)
        at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(C
onnectionFactory.java:40)
        at
com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(Databa
seUtility.java:123)
        ... 38 more
Cause:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error
establishing socket.
        at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
Source)
        at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
        at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
        at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
        at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:140)
        at
com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnection
Pool.java:174)
        at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionFo
rTibco(ConnectionFactory.java:59)
        at
com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(C
onnectionFactory.java:40)
        at
com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(Databa
seUtility.java:123)
        at
com.thoughtworks.clearinghouse.web.service.UserProfileService.validateUs
erNamePassword(UserProfileService.jav
a:16)
        at
com.thoughtworks.clearinghouse.web.servlet.LogonAction.actionExecuted(Lo
gonAction.java:48)
        at
com.thoughtworks.clearinghouse.web.servlet.AbstractAction.execute(Abstra
ctAction.java:38)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:437)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
264)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
6)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
5)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:380)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
8)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:533)
        at java.lang.Thread.run(Thread.java:536)



---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message