org.postgresql.util.PSQLException: An I/O error occured while sending to th

hello vaadiners

My project setup is the following:

  • tomcat 6
  • JDK 1.6
  • postgresql 9.0 database server
  • postgresql-9.0-801.jdbc4.jar JDBC driver (the latest version downloaded from
  • I setup a datasource/connection pooling for my vaadin webapp
  • for the database calls I use prepared statement

So with this setup sometimes I get the following exception (especially with firefox 4 and chrome)

org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
	at org.postgresql.core.v3.QueryExecutorImpl.execute(
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
	at com.digicpictures.dproject.Dproject.tryToLogIn(
	at com.digicpictures.dproject.Dproject.access$0(
	at com.digicpictures.dproject.Dproject$1.buttonClick(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at com.vaadin.event.ListenerMethod.receiveEvent(
	at com.vaadin.event.EventRouter.fireEvent(
	at com.vaadin.ui.AbstractComponent.fireEvent(
	at com.vaadin.ui.Button.fireClick(
	at com.vaadin.ui.Button$ClickShortcut.handleAction(
	at com.vaadin.event.ActionManager.handleAction(
	at com.vaadin.event.ActionManager.handleAction(
	at com.vaadin.event.ActionManager.handleActions(
	at com.vaadin.ui.Panel.changeVariables(
	at com.vaadin.ui.Window.changeVariables(
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.valves.ErrorReportValve.invoke(
	at org.apache.catalina.core.StandardEngineValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at org.apache.coyote.http11.Http11Processor.process(
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Caused by: Socket closed
	at Method)
	at org.postgresql.core.VisibleBufferedInputStream.readMore(
	at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(
	at org.postgresql.core.PGStream.ReceiveChar(
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(
	at org.postgresql.core.v3.QueryExecutorImpl.execute(
	... 41 more

What can cause this problem? And how can I solve it? Or where to look further to solve this problem?

This does not look like a Vaadin problem but a problem with a closed database connection or something like that - you just happen to see it when clicking a button. Maybe also related to some thread bound data.

I know this problem is not in connection with vaadin , but clients/my bosses dont care about that And it was especially embarassing because it occured on the login screen when the user clicked the login button (this was the applications first time to connect to the db)

It seems that there are some problems with tomcats default connection-pooling implementation (Apache DBCP)

Has anyone experience on how to properly configure tomcat 6 to provide connection-pooling/jdbc datasource for my appllication ? (which connection pooling implementation to use , configuration settings etc) ?

Or what other alternatives can I use (tomcat 7 or another servlet container or application server) ?

And also a detailed tutorial on how to make database CRUD application with user authenticaton with vaadin (besides the excellent spring roo plugin tutorial) with a sqlContainer or one of the JPA container implementation would be very usefull as well :slight_smile:

Or for example how to create a vaadin CRUD application from an existing database ? Which tools should I use besides vaadin to do that?

What other tools/JEE/web frameworks to use with vaadin?

A a lot of ( not just vaadin related ) important questions :slight_smile:

Vaadin is an excellent framework, but I think more information is needed on these topics :slight_smile: