Amigos, estou com um problema ao executar uma Query aqui, procurei no Google e a no Forum da ORACLE e não consegui encontrar nenhuma ajuda para este erro. Recorro a vocês como ultimo caso.
O Erro que estora é este:
java.sql.SQLException: Não serão lidos mais dados do soquete
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:962)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:894)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:383)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2599)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2963)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:584)
at br.com.hp.control.ExecutarDBMS.executarQuery(ExecutarDBMS.java:23)
at br.com.hp.actions.ExportarListaAction.actionPerformed(ExportarListaAction.java:65)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Estou executando esta Query:
public final static String buscaServicoHoje =
("SELECT DISTINCT " +
"ambiente, servico, display_name " +
"FROM " +
"al_mat_colunas_usadas_hora_hj " +
"WHERE " +
"display_name LIKE '%?%'");
Estou chamando o metodo:
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rset = null;
public void executarQuery(String servico) throws Exception {
try {
conn = DBUtil.getConnectionLogApache();
pstmt = conn.prepareStatement(Queries.buscaServicoHoje);
pstmt.setString(1, servico);
rset = pstmt.executeQuery();
rset.next();
do {
System.out.println(rset.getString(1) + " " + rset.getString(2) + " " +rset.getString(3));
}while (rset.next());
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}