Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Connection Exception

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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.
Regards,

Sharon
 
Sharon Cowling
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't worry, it was a tomcat problem and it has been solved.
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!