Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC error calling an Oracle procedure using thin driver (No more data to read from socket)

14 views
Skip to first unread message

Paul Burgess

unread,
Nov 16, 2001, 5:49:41 PM11/16/01
to
I am having trouble getting a particular procedure to work
consistently when calling it from my java application. The procedure
receives certain input, and returns an int error code and a ref cursor
(the result set). The procedure works occasionally, but fails at
other times. There is no visible patters. Sometimes it fails the
first time I execute the procedure from the app, sometimes it doesn't
happen until the tenth, and everywhere in between. I am using
oracle's jdbc thin driver in a weblogic db connection pool. We are
running Oracle 8.1.6.3.0. I have checked my syntax, and everything
looks in order. Why else would it work sometimes and not others???
The error I get is:

No more data to read from socket
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:803)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:731)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:690)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:372)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1330)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:757)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1807)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:332)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:376)
at weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java:35)
at com.twp.charm.dataaccess.AttributeDataAccess.getObjectAttributes(AttributeDataAccess.java:189)
at com.twp.charm.dataaccess.CompanyDataAccess.getCompanyWithAttributes(CompanyDataAccess.java:67)
at com.twp.charm.busobj.Company.<init>(Company.java:54)
at jsp_servlet._test._jspService(_test.java:86)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:106)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:124)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:154)
at com.twp.charm.service.gatekeeperServlet.service(gatekeeperServlet.java:72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:106)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:907)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:851)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)

A code snippet:

conn = getConnection();
call = conn.prepareCall("{ call
charm.attribute_pkg.get_attribute_values_for_obj (?,?,?,?) }");
call.setString(1, objectType);
call.setInt(2,objectId.intValue());
call.registerOutParameter(3,Types.INTEGER);
call.registerOutParameter(4,OracleTypes.CURSOR);

call.execute();

int errorCode = call.getInt(3);
rs = (ResultSet)call.getObject(4);

The error occurs when executing the call.

Any help you can provide would be appreciated.

Regards,
Paul

Joseph Weinstein

unread,
Nov 16, 2001, 6:15:34 PM11/16/01
to Paul Burgess
The driver's broken. It's an old version of the driver. Download the
latest from the Oracle site and you hsould be OK...

Joe Weinstein at B.E.A.

Peter Sylvester

unread,
May 13, 2002, 10:00:15 AM5/13/02
to
I'd suggest starting by getting the latest available 8.1.7.X JDBC
driver, even if you are running the 8.1.6 database, as numerous bug
fixes where put in with each major and patch release.

Also, you may want to try reproducing the problem outside of weblogic.

-Peter

0 new messages