wood burning stoves 2.0*
The moose likes JSP and the fly likes Connection Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Connection Exception" Watch "Connection Exception" New topic

Connection Exception

Sharon Cowling

Joined: Feb 09, 2002
Posts: 18
I have received an error message, whilst testing my JSP app. I'm using Tomcat 4 and Posgresql 7.2.1
Something unusual has occured to cause the driver to fail. Please report this exception: Exception: java.sql.SQLException: FATAL 1: Sorry, too many clients already
So I thought that I would stop and start Tomcat, but I get this error message:
root@kent:/usr/local/jakarta/build/tomcat/bin# /usr/local/jakarta/build/tomcat/bin/shutdown.sh
Guessing TOMCAT_HOME from tomcat.sh to /usr/local/jakarta/build/tomcat/bin/..
Setting TOMCAT_HOME to /usr/local/jakarta/build/tomcat/bin/..
Using classpath: /usr/local/jakarta/build/tomcat/bin/../classes:/usr/local/jakarta/build/tomcat/bin/../lib/ant.jar:/usr/local/jakarta/build/tomcat/bin/../lib/jaxp.jar:/usr/local/jakarta/build/tomcat/bin/../lib/parser.jar:/usr/local/jakarta/build/tomcat/bin/../lib/servlet.jar:/usr/local/jakarta/build/tomcat/bin/../lib/test:/usr/local/j2sdk1.3.0/lib/tools.jar:/usr/local/j2sdk1.3.0/jre/lib/jdbc7.1-1.2.jar
Stop tomcat
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at org.apache.tomcat.task.StopTomcat.execute(StopTomcat.java:104)
at org.apache.tomcat.startup.Tomcat.stopTomcat(Tomcat.java:267)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:174)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
I have not implemented connection pooling yet, and from this problem it looks like I'll have to do that shortly, I've had a look on the net and I haven't found anything helpful, I need to be able to shutdown tomcat.
If someone is able to give me a hand in determining and fixing the problem it would be most appreciated.

Sharon Cowling

Joined: Feb 09, 2002
Posts: 18
Don't worry, it was a tomcat problem and it has been solved.
I agree. Here's the link: http://aspose.com/file-tools
subject: Connection Exception