You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Clinton <bc...@snipermail.com> on 2001/06/13 22:47:00 UTC

Struts Datasource problem

Hello,
     I am having a recurring problem with struts and jdbc.  The demo 
driver I am using, inet's Sprinta200, only allows 2 connections.  I have 
my data source max set to 1, but I still get errors from the driver:

java.sql.SQLException: [TDS Driver]Too many connections :3
at com.inet.tds.e.<init>(Unknown Source)
at com.inet.tds.TdsDriver.connect(Unknown Source)
at 
org.apache.struts.util.GenericDataSource.createConnection(GenericDataSource.java:731)
at org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:668)
at 
org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.java:1077)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
at javax.servlet.GenericServlet.init(GenericServlet.java:52)
at com.caucho.server.http.Application.createServlet(Application.java:1741)
___________________________________________

this is how I have it set up in my struts-config:

<data-source>
   <set-property property="autoCommit" value="false"/>
   <set-property property="description" value="I-Net Sprinta2000"/>
   <set-property property="driverClass" value="com.inet.tds.TdsDriver"/>
   <set-property property="maxCount" value="1"/>
   <set-property property="minCount" value="1"/>
   <set-property property="password" value="password"/>
   <set-property property="url"value="jdbc:inetdae7a:192.168.0.20:1433/>
   <set-property property="user" value="sa"/>
</data-source>


I sometimes get this problem right after I stop and start resin and 
bring up a JSP that doesn't even use a connection.  Any ideas?

Bill


Re: Struts Datasource problem

Posted by Martin Cooper <ma...@tumbleweed.com>.
Are you the only person connecting to the database with this driver? One of
the unusual things about the demo version of Sprinta is that the connection
limit is per database server, not per client. So if two other people already
have one connection each open to the same database, you will see this error
when you try to open your connection.

Hope this helps.

--
Martin Cooper


----- Original Message -----
From: "Bill Clinton" <bc...@snipermail.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, June 13, 2001 1:47 PM
Subject: Struts Datasource problem


> Hello,
>      I am having a recurring problem with struts and jdbc.  The demo
> driver I am using, inet's Sprinta200, only allows 2 connections.  I have
> my data source max set to 1, but I still get errors from the driver:
>
> java.sql.SQLException: [TDS Driver]Too many connections :3
> at com.inet.tds.e.<init>(Unknown Source)
> at com.inet.tds.TdsDriver.connect(Unknown Source)
> at
>
org.apache.struts.util.GenericDataSource.createConnection(GenericDataSource.
java:731)
> at
org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:668)
> at
>
org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.java:10
77)
> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
> at javax.servlet.GenericServlet.init(GenericServlet.java:52)
> at com.caucho.server.http.Application.createServlet(Application.java:1741)
> ___________________________________________
>
> this is how I have it set up in my struts-config:
>
> <data-source>
>    <set-property property="autoCommit" value="false"/>
>    <set-property property="description" value="I-Net Sprinta2000"/>
>    <set-property property="driverClass" value="com.inet.tds.TdsDriver"/>
>    <set-property property="maxCount" value="1"/>
>    <set-property property="minCount" value="1"/>
>    <set-property property="password" value="password"/>
>    <set-property property="url"value="jdbc:inetdae7a:192.168.0.20:1433/>
>    <set-property property="user" value="sa"/>
> </data-source>
>
>
> I sometimes get this problem right after I stop and start resin and
> bring up a JSP that doesn't even use a connection.  Any ideas?
>
> Bill
>