Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6647805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:34:51+00:00 2026-05-26T00:34:51+00:00

First of all, I already read posts relating to this error prior to posting

  • 0

First of all, I already read posts relating to this error prior to posting this question. However, most of them are not using PostgreSQL, so this error might be handled differently. Here’s the stack trace of this error:

    WARN  org.hibernate.util.JDBCExceptionReporter  - SQL Error: 0, SQLState: 08006
 4450102501 [XmlBlaster.socket_ssl.cbWorkerThread] ERROR org.hibernate.util.JDBCExceptionReporter  - An I/O error occured while sending to the backend.
 java.lang.RuntimeException: org.hibernate.exception.JDBCConnectionException: could not execute query using iterate
    at edu.umd.cattlab.vatraffic.listener.output.VaTrafficDbModule.processSingleMessage(VaTrafficDbModule.java:380)
    at edu.umd.cattlab.vatraffic.listener.output.VaTrafficDbModule.processMessage(VaTrafficDbModule.java:266)
    at edu.umd.cattlab.vatraffic.listener.input.InputModule.sendMessageToOuputModules(InputModule.java:36)
    at edu.umd.cattlab.vatraffic.listener.input.XmlBlaster.update(XmlBlaster.java:173)
    at org.xmlBlaster.client.XmlBlasterAccess.update(XmlBlasterAccess.java:1043)
    at org.xmlBlaster.client.protocol.AbstractCallbackExtended.update(AbstractCallbackExtended.java:111)
    at org.xmlBlaster.client.protocol.AbstractCallbackExtended.update(AbstractCallbackExtended.java:199)
    at org.xmlBlaster.util.protocol.RequestReplyExecutor.receiveReply(RequestReplyExecutor.java:444)
    at org.xmlBlaster.client.protocol.socket.WorkerThread.run(WorkerThread.java:51)
 Caused by: org.hibernate.exception.JDBCConnectionException: could not execute query using iterate
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:427)
    at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:380)
    at org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:224)
    at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1192)
    at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:46)
    at edu.umd.cattlab.schema.hibernate.cattXML.extensions.VaTraffic.VaTrafficHelper.laneMap(VaTrafficHelper.java:165)
    at edu.umd.cattlab.vatraffic.listener.output.VaTrafficDbModule.processIncidentDescription(VaTrafficDbModule.java:396)
    at edu.umd.cattlab.vatraffic.listener.output.VaTrafficDbModule.processSingleMessage(VaTrafficDbModule.java:360)
    ... 8 more
 Caused by: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:218)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
    at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:404)
    ... 15 more
 Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(Unknown Source)
    at java.net.SocketOutputStream.write(Unknown Source)
    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
    at java.io.BufferedOutputStream.write(Unknown Source)
    at org.postgresql.core.PGStream.SendChar(PGStream.java:174)
    at org.postgresql.core.v3.QueryExecutorImpl.sendBind(QueryExecutorImpl.java:829)
    at org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1053)
    at org.postgresql.core.v3.QueryExecutorImpl.sendQueryPreamble(QueryExecutorImpl.java:373)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:189)

Our application uses Hibernate, so here’s the Hibernate configuration:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

  <session-factory>

    <!-- Database connection settings -->
    <property name="connection.driver_class">org.postgresql.Driver</property>
    <property name="connection.url">jdbc:postgresql://cannottell.umd.edu</property>
    <property name="connection.username"></property>
    <property name="connection.password"></property>

    <!-- JDBC connection pool (use the built-in) -->
    <property name="connection.pool_size">1</property>

    <!-- Enable C3P0 database connection pool -->
    <!----> <!--<property name="c3p0.min_size">2</property>
    <property name="c3p0.max_size">5</property>
    <property name="c3p0.timeout">600</property>
    <property name="c3p0.max_statements">0</property>
    <property name="hibernate.c3p0.idle_test_period">300</property>
    <property name="hibernate.c3p0.acquire_increment">1</property>-->

    <!-- SQL dialect -->
    <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>

    <!-- Oracle doesn't handle prepared statement caching very well.  This disables prepared statements. -->
    <property name="statement_cache.size">0</property>

    <!-- Enable Hibernate's automatic session context management -->
    <property name="current_session_context_class">thread</property>

    <!-- Disable the second-level cache  -->
    <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

    <!-- Echo all executed SQL to stdout -->
    <property name="show_sql">false</property>

    <!-- Drop and re-create the database schema on startup -->
    <property name="hbm2ddl.auto">false</property>

    <!-- ritis schema mappings -->
    <mapping resource="edu/umd/cattlab/schema/hibernate/cattXML/cattXML.hbm.xml"/>
    <mapping resource="edu/umd/cattlab/schema/hibernate/cattXML/cattXMLLookup.hbm.xml"/>

    <!-- vatraffic schema mappings -->
    <mapping resource="edu/umd/cattlab/schema/hibernate/cattXML/extensions/VaTraffic/vaTraffic.hbm.xml"/>
    <mapping resource="edu/umd/cattlab/schema/hibernate/cattXML/extensions/VaTraffic/vaTrafficLookup.hbm.xml"/>

</session-factory>

</hibernate-configuration>

Here’s my questions:

  1. Is this error really comes from the lost connection to the database, or is it an error from my code? (If the latter is true, then I’ll provide the codes involved)
  2. Either way, how should I deal with this error?
  3. If the error comes from the database, how can I replicate this error (for testing purpose), provided that I do not have direct access to the database?

I’m sorry if I’m asking too many questions.By the way, I would love to add more information regarding to this question if necessary. I really appreciate any response from you all. Thank you.

ADDED

Here’s the code for opening and closing the hibernate session:

Session sess = HibernateUtil.getSessionFactory().openSession();

    Transaction tx = null;
    String eventId = null;

    try {

        sess.getTransaction().setTimeout(new Integer(configuration
                        .getProperty("messageProcessingTimeout")));

        if (!sess.isConnected()) {
            attemptReconnect();
        } else {
            log.debug("Database connection open.");
        }

        //tx = sess.beginTransaction();
        //log.debug("After transaction");
        eventId = processIncidentDescription(message, sess);

        //tx.commit();

        // Sending jmsNotify.
        if (Boolean.valueOf(configuration.getProperty("sendJmsNotify"))
                && eventId != null) {
            log.debug("Sending jmsNotify message " + "<notify id=\""
                    + eventId + "\"/>");
            jmsSender.sendMessage("<notify id=\"" + eventId + "\"/>");
        }
    } catch (Exception e) {

        try {
            if (tx != null)
                tx.rollback();
        } catch (TransactionException te) {
            log.warn("Unable to roll back transaction.");
        }

        throw new RuntimeException(e);
    } finally {
        sess.close();
    }

ADDED

Here’s the code that might cause the error:

public static HashMap<String,HashMap<String,Object>> laneMap(Session sess){
    HashMap<String,HashMap<String,Object>> table = new HashMap<String,HashMap<String,Object>>();
    Query query = sess.createQuery("from Direction");
    Iterator<Object> iterate = query.iterate();
    while (iterate.hasNext()){
        Object obj = iterate.next();
        Direction direct = (Direction) obj;
        if (table.get("direction") == null){
            table.put("direction", new HashMap<String,Object>());
        }
        String directDesc = direct.getDirectionDescription();
        table.get("direction").put(directDesc, direct);
    }
    Query query2 = sess.createQuery("from LaneStatus");
    Iterator<Object> iterate2 = query2.iterate();
    while (iterate2.hasNext()){
        Object obj = iterate2.next();
        LaneStatus laneStatus = (LaneStatus) obj;
        if (table.get("lane_status") == null){
            table.put("lane_status", new HashMap<String,Object>());
        }
        String directDesc = laneStatus.getLaneStatusDescription();
        table.get("lane_status").put(directDesc, laneStatus);
    }
    Query query3 = sess.createQuery("from LaneType");
    Iterator<Object> iterate3 = query3.iterate();
    while (iterate3.hasNext()){
        Object obj = iterate3.next();
        LaneType laneType = (LaneType) obj;
        if (table.get("lane_type") == null){
            table.put("lane_type", new HashMap<String,Object>());
        }
        String directDesc = laneType.getLaneTypeDescription();
        table.get("lane_type").put(directDesc, laneType);
    }
    return table;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:34:52+00:00Added an answer on May 26, 2026 at 12:34 am

    This issue happens when your application can no longer connect to the Postgres DB. I’ve had it happen when I’ve been VPN’ed in to my office, and then close the VPN connection, which severs the DB connection. My local server will then show the above. If this issue is happening in your server environment, you need to see if there are network connectivity issues.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all there is a partial question regarding this, but it is not
First of all, I'm fairly sure snapping to grid is fairly easy, however I've
First of all: I am not an experienced ClearCase user, but I have lots
First of all (in case this is important) I'm using ActiveState's Perl (v5.8.7 built
First of all, I'm not looking for miracle... I know how PHP works and
First I've read loads of posts and sites that recommend going to http://silverlight.net/GetStarted/ to
This is my first question ever on StackOverflow, hurray! I can honestly say I
First of all, I know how to build a Java application. But I have
First of all, I don't need a textual comparison so Beyond Compare doesn't do
First of all, let's define a few tables: Users table will store information about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.