DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006

    I/o Error - Ahhh!


    Hey all,

    Does anyone know - or have any ideas why the following error occurs?

    'An I/O error occured while sending to the backend'

    All works well, and no errors are encountered until I cast the resultsetmetadata to PGResultSetMetaData and then try to retrieve the basetable name...complete error message is at bottom of this post.

    For eg,
    pgrsmd =(PGResultSetMetaData)rs.getMetaData();
    String colName=getColAlias(rsmd.getColumnName(i),pgrsmd.getBaseTableName(i));

    error occurs here due to the pgrsmd.getBaseTableName(i)....

    The error is caused by java.io.IOException: Stream closed...but note i have not closed the connection to the database (if i omit the above line and work with just rs works fine no errors or other problems)...

    Any suggestions, advice to resolve this problem will be v much appreciated!

    Thanks in advance


    error recieved when run:

    org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
    at org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:214)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:437)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(AbstractJdbc2Statement.java:353)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eQuery(AbstractJdbc2Statement.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSetMetaDat a.getBaseTableName(AbstractJdbc2ResultSetMetaData. java:519)
    at UserInterfaces.DynamicTable.setUpJTable(DynamicTab le.java:79)
    at UserInterfaces.MainInterface.selectRiskReview(Main Interface.java:2804)
    at UserInterfaces.MainInterface.jComboOkActionPerform ed(MainInterface.java:2267)
    at UserInterfaces.MainInterface.access$2500(MainInter face.java:33)
    at UserInterfaces.MainInterface$26.actionPerformed(Ma inInterface.java:1544)
    at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:234)
    at java.awt.Component.processMouseEvent(Component.jav a:5488)
    at javax.swing.JComponent.processMouseEvent(JComponen t.java:3126)
    at java.awt.Component.processEvent(Component.java:525 3)
    at java.awt.Container.processEvent(Container.java:196 6)
    at java.awt.Component.dispatchEventImpl(Component.jav a:3955)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2024)
    at java.awt.Component.dispatchEvent(Component.java:38 03)
    at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774 )
    at java.awt.Component.dispatchEvent(Component.java:38 03)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 463)
    at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:110)
    Caused by: java.io.IOException: Stream closed
    at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder. java:38)
    at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java: 151)
    at java.io.OutputStreamWriter.flush(OutputStreamWrite r.java:213)
    at org.postgresql.core.PGStream.flush(PGStream.java:5 01)
    at org.postgresql.core.v3.QueryExecutorImpl.sendSync( QueryExecutorImpl.java:672)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:187)
    ... 33 more

  2. #2
    Join Date
    Feb 2006
    Cologne - Germany
    i/o errors usually denote a truncated connection between the jdbc driver and the database. this can mean:
    - your network connection to the db is truncated
    - the connection you are using has expired or was closed
    and several other posibilities.
    you can try to rebuild / inti your connection to the db and retry your query.

Similar Threads

  1. Tomcat FILE I/O
    By Souren in forum Java
    Replies: 0
    Last Post: 04-29-2003, 01:10 AM
  2. Getting Process I/O statistics
    By Andy in forum VB Classic
    Replies: 6
    Last Post: 05-17-2001, 08:09 PM
  3. Getting Process I/O statistics
    By Andy in forum VB Classic
    Replies: 0
    Last Post: 05-16-2001, 11:21 AM
  4. File I/O ?????
    By Gary Nelson in forum .NET
    Replies: 32
    Last Post: 03-06-2001, 12:56 PM
  5. File I/O...
    By Brian Patrick in forum VB Classic
    Replies: 0
    Last Post: 02-25-2001, 02:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.