Broken pipe / timeout during slow SQL statement in servlet

I have a servlet which supplies the client with quite a large block of data from an SQL query.
This works fine in a local test environment but I get problems running it under a fully fledged application server environment.
I find a "Broken Pipe" exception on the application log and the client side application gets an application error status code.
07/07/16 09:32:30.85 lapSycWebsite: Broken pipe
07/07/16 09:32:30.85 lapSycWebsite: Broken pipe
07/07/16 09:32:30.85 lapSycWebsite: Broken pipe
07/07/16 09:32:30.85 lapSycWebsite: Broken pipe
07/07/16 09:32:30.85 lapSycWebsite: Broken pipe
07/07/16 09:32:30.85 lapSycWebsite: Broken pipe
07/07/16 09:32:30.86 lapSycWebsite: Broken pipe
07/07/16 09:32:30.86 lapSycWebsite: Broken pipe
07/07/16 09:32:30.86 lapSycWebsite: Broken pipe
07/07/16 09:32:30.86 lapSycWebsite: Servlet error
java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
at sun.nio.ch.IOUtil.write(IOUtil.java:75)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
at java.nio.channels.Channels.write(Channels.java:60)
at java.nio.channels.Channels.access$000(Channels.java:47)
at java.nio.channels.Channels$1.write(Channels.java:134)
at com.evermind.server.http.AJPOutputStream.endRequest(AJPOutputStream.j
ava:117)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java
:309)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java
:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSo
cketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
sableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
:q
We're looking for ways to get the SQL execution time down, but even if we succeed in this case it's a source of instability that will trip us up in the future.
This SQL statment can take up to about 8 minutes to return the first row.
The client is a Java swing program, by the way, not a browser as such.
Later:
We've got the SQL execution time down and it's working for the time being but it's a problem that's going to hit us again sooner or later. Still looking for a solution.
Message was edited by:
IronChicken

Refer this url for inserting blob datatype to database.
See the LOBDatatype sample. This sample uses java application but same works for a servlet too.
http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
You can refer source to see how the lob data is inserted.
Chandar

Similar Messages

  • JBO-26041: Failed to post data to database during "Insert": SQL Statement "

    Dear All,
    I am trying to insert the data into custom table,getting the following error. Please help me to resolve the issues.
    I have created one custom table in APPS schema having the primary key and History Columns.
    Created the EO based on the custom table and generate the create method.
    Created the VO based on the EO and generated the VOImpl, RowImpl Java Files.
    I am using the PER_PEOPLE_S sequence to populate the value into Primary key column.
    Calling the below code into create method of EO object to populate the value into Primarykey column.
    setPersPersonid(getOADBTransaction().getSequenceValue("PER_PEOPLE_S"));
    oracle.apps.fnd.framework.OAException: oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "INSERT INTO XXUTS_PERSON_T(PERS_PERSONID,PERS_FIRSTNAME,PERS_LASTNAME,CREATION_DATE,CREATED_BY,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN) VALUES (?,?,?,?,?,?,?,?)".
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(Unknown Source)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
         at xxuts.oracle.apps.csc.person.webui.XXCreatePersonCO.processFormRequest(XXCreatePersonCO.java:67)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:72)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.sql.SQLException: ORA-00911: invalid character
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3074)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:427)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5740)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4539)
         at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(Unknown Source)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2996)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2807)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1971)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2173)
         at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(Unknown Source)
         at xxuts.oracle.apps.csc.person.server.XXPersonMainAMImpl.savePersonToDatabase(XXPersonMainAMImpl.java:39)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
         at xxuts.oracle.apps.csc.person.webui.XXCreatePersonCO.processFormRequest(XXCreatePersonCO.java:67)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:72)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    java.sql.SQLException: ORA-00911: invalid character
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3074)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:427)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5740)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4539)
         at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(Unknown Source)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2996)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2807)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1971)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2173)
         at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(Unknown Source)
         at xxuts.oracle.apps.csc.person.server.XXPersonMainAMImpl.savePersonToDatabase(XXPersonMainAMImpl.java:39)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
         at xxuts.oracle.apps.csc.person.webui.XXCreatePersonCO.processFormRequest(XXCreatePersonCO.java:67)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:72)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Thanksm
    Sai Sankilisetty

    Dear Kumar,
    I have checked the datatypes of the table and datatypes of the Pageitems, both the datatypes are same.
    I have created the region using the wizard based on the VO.
    My custom table having only 3 columns and History Columns.Out of 3 columns PersPersonid is Primary key column and I am assigning the sequence value to the column in create method of EO as below
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    setPersPersonid(getOADBTransaction().getSequenceValue("PER_PEOPLE_S"));
    //Here PER_PEOPLE_S is the Sequence
    Thanks,
    Sai

  • Just a helpful SAP note for slow SQL statements

    Hi Guys,
    Just wanted to share this SAP note with you. I am sure many of you might have gone through it.
    [SAP Note 155413 - Analysis of slow SQL statements|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=155413]
    Cheers,
    Abu

    >
    ZAFCO ABAP wrote:
    > Hi Guys,
    >
    > Just wanted to share this SAP note with you. I am sure many of you might have gone through it.
    >
    > [SAP Note 155413 - Analysis of slow SQL statements|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=155413]
    >
    > Cheers,
    > Abu
    Hi,
    I would bet not as many as you might think -  many questions here suffering form not GOING through
    the analysis before they post it here. 
    Meantime I think questions to SQL statement performance here will only be answered when the execution plan on the statement  is posted with it.
    bye
    yk

  • Failed to post data to database during "Update": SQL Statement

    Hi,
    I'm getting this error while trying to update a VO via BCBrowser or UI.
    Failed to post data to database during "Update": SQL Statement
    This is a simple & straight forward default VO created on Entity Object (Database Table)
    On the same table & with same DB credentials, I could successfully update the record.
    Any Guess, on what went Wrong??
    Thanks in Advance for any help.
    p.s Jdev 11.1.1.6
    Log:
    oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Update": SQL Statement "BEGIN UPDATE CAR CarEO SET SEL_ITEM=:1 WHERE TXN_NO=:2 AND LOGID=:3 AND SEQNO=:4 RETURNING DELIVERY_MODE, CERTIFICATION_REQ, SOFT_COPY_IND, SELITEM INTO :5, :6, :7, :8; END;".
      at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:583)
      at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)
      at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)
      at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
      at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)
      at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)
      at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)
      at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)
      at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)
      at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
      at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
      at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
      at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)
      at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
      at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
      at java.awt.Component.processMouseEvent(Component.java:6289)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
      at java.awt.Component.processEvent(Component.java:6054)
      at java.awt.Container.processEvent(Container.java:2041)
      at java.awt.Component.dispatchEventImpl(Component.java:4652)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Component.dispatchEvent(Component.java:4482)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
      at java.awt.Container.dispatchEventImpl(Container.java:2085)
      at java.awt.Window.dispatchEventImpl(Window.java:2478)
      at java.awt.Component.dispatchEvent(Component.java:4482)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
      at java.awt.EventQueue.access$000(EventQueue.java:85)
      at java.awt.EventQueue$1.run(EventQueue.java:603)
      at java.awt.EventQueue$1.run(EventQueue.java:601)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
      at java.awt.EventQueue$2.run(EventQueue.java:617)
      at java.awt.EventQueue$2.run(EventQueue.java:615)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.sql.SQLException: Invalid column type
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterInternal(OracleCallableStatement.java:150)
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:399)
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:581)
      at oracle.jdbc.driver.OracleCallableStatementWrapper.registerOutParameter(OracleCallableStatementWrapper.java:1765)
      at oracle.jbo.server.OracleSQLBuilderImpl.bindUpdateStatement(OracleSQLBuilderImpl.java:2243)
      at oracle.jbo.server.EntityImpl.bindDMLStatement(EntityImpl.java:10524)
      at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:412)
      ... 52 more

    The issue is resolved now.
    new Columns added to the Database table, after creating Entity Object. These latest changes were not picked up in Entity Object.
    I found this difference after comparison of entity object with DB Table.
    And when I added those new columns to EO & VO, I'm not getting this error anymore.
    Thanks to all who tried to help

  • SQL statement in servlet

    public synchronized Product GetProductItem (int productid) throws CategoryException
        Statement stmt  = null;
          stmt = conn.createStatement();
          ResultSet rs = stmt.executeQuery("select c.CategoryName, p.ProductName from category_product cp inner join category c on cp.CategoryID = c.CategoryID inner join product p on cp.ProductID = ?");
            Product p = new Product();
            p.setCategoryName(rs.getString("CategoryName"));
         p.setProductName(rs.getString("ProductName"));
      }How can I make the SQL statement to get the int parameter productid? As I want to show the particular product with it's own id.
    And, how can I display the product detail for that product? How can I show it as an object?

    I don't think your code will work. Don't you have to call next() on the ResultSet to advance the cursor to the first row? What if your query returns more than one row?
    In either case, I think your code should look more like this:
    ResultSet rs = ...;
    List products = new ArrayList();  // Or something else
    while (rs.next())
       Product p = new Product();
       // Set the values from the ResultSet
       products.add(p);
    rs.close();
    statement.close();Once you've got those, you can either pass Product to a JSP and have it display the values or you can write the HTML response to the browser from the servlet. I'd go with JSP myself. - MOD

  • SQL statement in servlet giving error

    Please let me know if I need to post this on a different forum, but I thought it was applicable to here.
    First, let me preface this post by saying I've inserted hardcoded values at the DB (Oracle) level and it worked just fine, so most of the statement is sound. All the values inserted properly when testing it that way. Also, I've printed the SQL statement to the console and all looks ok there, too.
    Out of this, I'm getting an error citing the following:
    java.lang.ArrayIndexOutOfBoundsException
    also occasionally getting the following error:
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    In my servlet, I'm attempting the following:
    prior to the insert statement, I'm retrieving the last row number to start the increment from as in:
    Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    ResultSet rst = stmt.executeQuery("select CHANGE_CTRL_ID from CHANGE_CONTROL_USER order by CHANGE_CTRL_ID");
         rst.last();
         int lastRowNum = Integer.valueOf(rst.getString("CHANGE_CTRL_ID")).intValue();
         rst.close();
         stmt.close();
    ------------ then ------------------------------------------------
    String preparedQuery = "INSERT ALL " +
    "INTO CHANGE_CONTROL_USER " +
    "(CHANGE_CTRL_ID,REQUESTOR_NAME,REQUESTOR_EMAIL,BUS_CONTACT,DEPT,LOCATION,PHONE_NUM,DATE_REQ," +
    "BUSVP,VP_PHONE,VP_DATE,BRANCH,PRIORITY,OPS_MAN_CHG,OPS_MAN_PPCHAP,TRAIN_REQ," +
    "EXIST_SYS_FLD_CHG,BUS_RULES_CHG,NEW_CODING,NEW_BUS_RULE,NEW_SYS_FIELD,REQ_TYPE_OTHER,REQ_OTHER_SPECIFY,IMPACT_RE_COLL," +
    "IMPACT_DEF_LM,IMPACT_DEF_REC_NRE,IMPACT_AUDIT,IMPACT_PERS_COLL,IMPACT_DEF_FCL,IMPACT_BUS_TECH,IMPACT_LEGAL,IMPACT_PRIV_COLL," +
    "IMPACT_DEF_BKRUP_RE,IMPACT_DEC_SUPT,IMPACT_RISK_MGT,IMPACT_DEF_REO,IMPACT_DEF_BKRUP_NRE,IMPACT_QUALSVCS,IMPACT_INTERNAL_CTRL,IMPACT_DEF_WKFL," +
    "IMPACT_DEF_WKOUT,IMPACT_TRAIN_TPI,IMPACT_OTHER,IMPACT_DEF_MGT,IMPACT_DEF_TAX,IMPACT_VEND_MGT,IMPACT_DEF_CTRL,IMPACT_DEF_REC_RE," +
    "IMPACT_BUS_ADMIN,IMPACT_OTHER_SPECIFY,CHANGE_IN_KPMG,CHANGE_IN_OTS,CHANGE_IN_NFR,CHANGE_IN_ARR,CHANGE_IN_BRR, CHANGE_IN_PROC_IMP," +
    "CHANGE_IN_INT_CITI_POL,CHANGE_IN_OTHER,CHANGE_IN_OTHER_SPECIFY, CHANGE_INIT_DETAILS,REQ_INFO_DESCRIPT,REQ_INFO_EXPLAIN_CURRBUS,REQ_INFO_EXPLAIN_PROPOSED,REQ_BEN_PROP_BENEFIT,REQ_BEN_FIN_IMPLEMENT," +
    "REQ_BEN_OPS_IMPLEMENT,YES_FORM,VULN_ASSESS, CBA_CHG, RISK_ACCEPT,MARSITEM, GCCRFP, APP_COMPL_QUES,CAP_EXPEND)" +
    " VALUES (changecontrol_user_seq.nextval,?,?,?,?,?,?,to_date(?,'YYYY-MON-DD HH:MI:SS'),?,?,to_date(?,'YYYY-MON-DD HH:MI:SS'),?,?," + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
    + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
    + "INTO CHANGE_CONTROL_ADMIN "
    + "(AID,CHANGE_CTRL_ID,ADMNAME,CLOSEDATE,ACTIVE)"
    + "VALUES (changecontrol_admin_seq.nextval, changecontrol_user_seq.currval,NULL, NULL, -1)"
    + "SELECT object_name AS REQUESTOR_NAME FROM all_objects where rownum <= 1;";     
    also I've declared all the respective strings for the PreparedQuery statement.
    If you need to see those, here they are:
    PreparedStatement pstmt = connection.prepareStatement(preparedQuery);
                   // stmt = connection.stmt("INSERT INTO RMIS_USER VALUES (?,?,?,?,to_date(?,'YYYY-MON-DD HH:MI:SS'),?,?,?,?,to_date(?,'YYYY-MM-DD HH:MI:SS')");
              pstmt.setInt(1,++lastRowNum);
              pstmt.setString(2,reqName);
              pstmt.setString(3,reqemail);
              pstmt.setString(4,buscont);
              pstmt.setString(5,reqDept);
              pstmt.setString(6,reqLocale);
              pstmt.setString(7,phone_num);
              pstmt.setDate(8,dtreq);
              //pstmt.setCalendar(8,rtnow);
              pstmt.setString(9,busvp_email);
              pstmt.setString(10,vpphone);
              pstmt.setDate(11,dt);
              pstmt.setString(12,branch);
              pstmt.setString(13,priority);
              pstmt.setString(14,opsmanchg);
              pstmt.setString(15,opsmanppchap);
              pstmt.setString(16,train_req);
              pstmt.setString(17,reqexist_sys_fld_chg);
              pstmt.setString(18,reqbus_rules_chg);
              pstmt.setString(19,reqnew_coding);
              pstmt.setString(20,reqnewbus_rule );
              pstmt.setString(21,reqnew_sys_fld);
              pstmt.setString(22,reqother);
              pstmt.setString(23,req_other_specify);
              pstmt.setString(24,imp_recoll);
              pstmt.setString(25,imp_deflm);
              pstmt.setString(26,imp_defrecnre);
              pstmt.setString(27,imp_audit);
              pstmt.setString(28,imppers_coll);
              pstmt.setString(29,imp_deffcl);
              pstmt.setString(30,imp_bustech);
              pstmt.setString(31,imp_legal);
              pstmt.setString(32,imp_privcoll);
              pstmt.setString(33,imp_defbkre);
              pstmt.setString(34,imp_decsupt);
              pstmt.setString(35,imp_riskmgt);
              pstmt.setString(36,imp_defreo);
              pstmt.setString(37,imp_defbknre);
              pstmt.setString(38,imp_qualsvc);
              pstmt.setString(39,imp_intlctrl);
              pstmt.setString(40,imp_defwkfl);
              pstmt.setString(41,imp_defwkout);
              pstmt.setString(42,imp_trtpi);
              pstmt.setString(43,impact_other);
              pstmt.setString(44,imp_defmgt);
              pstmt.setString(45,imp_deftax);
              pstmt.setString(46,imp_vendmgt);
              pstmt.setString(47,imp_defctrl);
              pstmt.setString(48,imp_defrecre);
              pstmt.setString(49,imp_busadm);
              pstmt.setString(50,impact_other_specify);
              pstmt.setString(51,change_in_kpmg);
              pstmt.setString(52,change_in_ots);
              pstmt.setString(53,change_in_nfr);
              pstmt.setString(54,change_in_arr);
              pstmt.setString(55,change_in_brr);
              pstmt.setString(56,change_in_proc_imp);
              pstmt.setString(57,change_inter_citpol);
              pstmt.setString(58,change_in_other);
              pstmt.setString(59,change_in_other_specify);
              pstmt.setString(60,change_init_details);
              pstmt.setString(61,req_info_descript);
              pstmt.setString(62,req_info_explain_currbus);
              pstmt.setString63,req_info_explain_proposed);
              pstmt.setString(64,req_ben_prop_benefit);
              pstmt.setString(65,req_ben_fin_implement);
              pstmt.setString(66,req_ben_ops_implement);
              pstmt.setString(67,projyes);
              pstmt.setString(68,vulnass);
              pstmt.setString(69,cbachg);
              pstmt.setString(70,riskacc);
              pstmt.setString(71,marsitem);
              pstmt.setString(72,gccrfp);
              pstmt.setString(73,applcomp);
              pstmt.setString(74,capexpend);
              pstmt.executeUpdate();
    if anyone sees anything flawed here, please let me know!
    Thanks!
    Message was edited by:
    bpropes20
    Message was edited by:
    bpropes20
    Message was edited by:
    bpropes20

    What a mess. First off, the line pstmt.setInt(1,++lastRowNum); just needs to go away. You're already using a sequence to set the value for the primary keys, you don't need to add a mistake like this.
    I then count 73 question marks (you can verify, I'm not counting again.) That would mean that your indices are off by one, and the ArrayIndexOutOfBounds is probably coming from pstmt.setString(74,capexpend); Dump the ++lastRowNum line, change all of your indices (after verifying the bind count!) and try it again.
    You can see an inherent weakness in the PreparedStatement clauses - one change means manually rewriting all of the indices. A solution is dumping all of your bind values into a List, then loop through the list to do your setXXX statements. If all binds are not of the same type, you can bind the values to some object that identifies type and use those objects in the list instead of the values. A little more complex, but easier to maintain in my opinion.

  • Help with a very slow sql statement

    Hi this statement takes 10 seconds to run and is run a lot, can anyone help me speed it up.
    Each section in itself is quick but when i add the IN section it slows down, probably because there is 20291 rows in the view v_allitems.
    anyone know how i can speed up?
    select ITEMTYPE,
    ITEMID,
    NOTESID,
    NOTES,
    DUEDATE,
    OPENDATE,
    SUBJECT,
    TYPE,
    STATUS,
    OWNER,
    CREATEBY,
    CREATEDATE,
    ITEMCODE
    FROM v_allitems
    where
    ITEMCODE in ( 'ACT,'||4264) OR ITEMCODE IN
    (SELECT pcchildcode
    ||','
    || pcchild item
    FROM afpc
    CONNECT BY pcparent = prior pcchild
    AND pcparentcode = prior pcchildcode START
    WITH pcparent = 232
    AND pcparentcode = 'CAS'
    UNION ALL
    SELECT pcparentcode
    ||','
    || pcparent item
    FROM afpc
    CONNECT BY pcchild = prior pcparent
    AND pcchildcode = prior pcparentcode START
    WITH pcchild =4264
    AND pcchildcode = 'ACT'
    )

    Something to just try i guess (wild guessing here).
    WITH
       itemcodes AS
       SELECT
          DISTINCT ItemCode
       FROM
          SELECT 'ACT,' || 4264 AS ItemCode
          FROM DUAL
             UNION ALL    
             SELECT pcchildcode || ',' || pcchild item AS ItemCode
             FROM afpc
             CONNECT BY  pcparent       = prior pcchild
             AND         pcparentcode   = prior pcchildcode
             START WITH  pcparent       = 232
             AND         pcparentcode   = 'CAS'
                UNION ALL
             SELECT pcparentcode || ',' || pcparent item AS ItemCode
             FROM afpc
             CONNECT BY  pcchild     = prior pcparent
             AND         pcchildcode = prior pcparentcode
             START WITH  pcchild     = 4264
             AND         pcchildcode = 'ACT'
    SELECT
       v.ITEMTYPE,
       v.ITEMID,
       v.NOTESID,
       v.NOTES,
       v.DUEDATE,
       v.OPENDATE,
       v.SUBJECT,
       v.TYPE,
       v.STATUS,
       v.OWNER,
       v.CREATEBY,
       v.CREATEDATE,
       v.ITEMCODE
    FROM v_allitems v,  itemcodes i
    WHERE v.ItemCode  = i.ItemCode;Assuming (probably a good assumption) that's not good, how long does this query take to finish for you?
             SELECT pcchildcode || ',' || pcchild item AS ItemCode
             FROM afpc
             CONNECT BY  pcparent       = prior pcchild
             AND         pcparentcode   = prior pcchildcode
             START WITH  pcparent       = 232
             AND         pcparentcode   = 'CAS'
                UNION ALL
             SELECT pcparentcode || ',' || pcparent item AS ItemCode
             FROM afpc
             CONNECT BY  pcchild     = prior pcparent
             AND         pcchildcode = prior pcparentcode
             START WITH  pcchild     = 4264
             AND         pcchildcode = 'ACT'

  • Query BEX - slow - sql statement

    Hi to all.
    When I execute a query on my master data I see(with the ST05) that the sytem executes a lot of query like that:
    SELECT
    FROM
      "/BIC/SC_RAG_SOC"
    WHERE
      "SID" IN (:A0 ,:A1 ,:A2 ,:A3 ,:A4 )
    The SID values are updated 5 for time !!!
    Due to the fact that I need to be select almost 500 K of record, can I modify one of the system (database or java) paramenters in order to obtain the following code ?:
    SELECT
    FROM
      "/BIC/SC_RAG_SOC"
    Thank'you in advance

    May be first you want to try following:
    1. Run Configurator Purge concurrent program which will physically delete all the logically deleted records over the time. You must do this if you haven't done this since long time.
    2. Run Gather schema stats on the CZ schema.
    If that does not work, then you should upload file SR with explain plan.
    HTH

  • Problem w/ portion of SQL statement in servlet

    Hi folks,
    Don't know if this was one that should go under JDBC, but it's not so much of a connection problem as it is returning -- or not in this case -- a small result set I'm trying to make.
    I've got an INSERT statement up above this code that handles all of the data input from a form, but what I'm trying to accomplish is verification of the nextval ID into the Oracle db. By the way, this is nothing I'll keep in the servlet long term, just to test and then see what way's best to pass that thru an email with a link to an approval page.
    So at the end of the insert statement, I've got these lines:
    Statement stmto = connection.createStatement();
    ResultSet rsltst = stmto.executeQuery("SELECT MAX(CHANGE_CTRL_ID) FROM CHANGE_CONTROL_USER");
    String chgid= rsltst.getString(1);
    System.out.println("Change ID is" +chgid);
                I get an invalid cursor error from this. Any idea why?
    Any feedback would be appreciated.
    Thanks.
    Message was edited by:
    bpropes20

    Statement stmto = connection.createStatement();
    ResultSet rsltst = stmto.executeQuery("SELECT MAX(CHANGE_CTRL_ID) FROM CHANGE_CONTROL_USER");
    if (rsltst.next()) {
        String chgid= rsltst.getString(1);
        System.out.println("Change ID is" +chgid);
    } else
       System.out.println("No value!");BTW: Check if oracle (I've never worked with these DBM) has any function to retrieve the generated ID, it will be a bit more acurated ;)
    null

  • Web Service Error: java.sql.SQLException: Io exception: Broken pipe

    Hi,
    I am using JDeveloper PL/SQL web service generator. After some time we start receiving the "java.sql.SQLException: Io exception: Broken pipe" exception when we invoke the web service. I've noticed that the error starts occuring once all the connections in the database have been closed.
    Here are the Data Source configurations I tried using:
    <data-source name="jdev-connection-SACS" class="com.evermind.sql.DriverManagerDataSource" location="jdbc/SACSCoreDS" xa-location="jdbc/xa/SACSXADS" ejb-location="jdbc/SACSDS" pooled-location="jdbc/MACSPooledDS" connection-driver="oracle.jdbc.driver.OracleDriver" username="xxx" password="xxxx" url="jdbc:oracle:thin:@test:1521:SACS" inactivity-timeout="30" connection-retry-interval="3" max-connections="5" min-connections="0" wait-timeout="20"/>
    AND I also tried:
    <data-source name="jdev-connection-SACS" class="com.evermind.sql.DriverManagerDataSource" location="jdbc/SACSCoreDS" xa-location="jdbc/xa/SACSXADS" ejb-location="jdbc/SACSDS" pooled-location="jdbc/SACSPooledDS" connection-driver="oracle.jdbc.driver.OracleDriver" username="xxxx" password="xxxx" url="jdbc:oracle:thin:@xxxx:1521:SACS" inactivity-timeout="30"/>
    That did not make any changes.
    I then changed ConnectionContext.KEEP_CONNECTION to ConnectionContext.CLOSE_CONNECTION in the <name>Base.sqlj:
    public void release() throws SQLException
    { if (__tx!=null && __onn!=null) __tx.close(ConnectionContext.CLOSE_CONNECTION);
    __onn = null; __tx = null;
    That did not help either. We are running these web services on the standalone OC4J and Oracle 8.1.7.2 database with the MTS installed on it.

    Hi,
    I don't use JDeveloper to develop stored procedure web services. However, I do use WebServicesAssembler.jar to generate stored procedure web services.
    I had the same problem as you did. After some research in this forum, I was informed that it's a bug in the web services generator itself. I was also informed that the newest version of WebServicesAssembler.jar is supposed to fix the problem.
    If you want, you can always write a batch job to restart the OC4J periodically. The command is
    dcmctl -ct oc4j -co home
    If I come across the posting containing the answer to your solution, I will forward it to you.
    Good luck
    Jack

  • JDriver for SQL Server 6.5 Broken Pipe

    hi:
    I am using jDriver for SQL Server 6.5 and use prepared statements to execute
    my Stored Procedures from a Stateless-EJB. At times, I get the following
    error message, can anyone help me with what I should do ?
    2002.06.06 at 03:49:43 PM PDT : weblogic.jdbcbase.mssqlserver4.TdsException:
    I/O exception while talking to the server, java.io.IOException: Broken pipe
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:82)
    at weblogic.jdbcbase.mssqlserver4.TdsException.<init>(TdsException.java:40)
    at
    weblogic.jdbcbase.mssqlserver4.TdsStatement.cancel(TdsStatement.java:446)
    at weblogic.jdbcbase.mssqlserver4.TdsStatement.getMoreResults(Compiled
    Code)
    at weblogic.jdbcbase.mssqlserver4.TdsStatement.execute(Compiled Code)
    at weblogic.jdbcbase.mssqlserver4.TdsStatement.execute(Compiled Code)
    at weblogic.jdbcbase.jts.Statement.execute(Compiled Code)
    at weblogic.jdbc20.rmi.internal.PreparedStatementImpl.execute(Compiled
    Code)
    at weblogic.jdbc20.rmi.SerialPreparedStatement.execute(Compiled Code)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarDAO.insertException(Compiled
    Code)
    at com.pmi.zeus.ejb.LoanRegistration.LoanRegistrar.registerLoan(Unknown
    Source)
    at com.pmi.zeus.ejb.LoanRegistration.LoanRegistrar.register(Compiled Code)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarEOImpl.register(LoanRegistrar
    EOImpl.java:56)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarEOImpl_ServiceStub.register(C
    ompiled Code)
    at
    com.pmi.zeus.mom.LoanInputQueueListener.messageInputProcessor(LoanInputQueue
    Listener.java:86)
    at
    com.pmi.zeus.mom.LoanInputQueueListener.onMessage(LoanInputQueueListener.jav
    a:59)
    at weblogic.jms.client.JMSMessageConsumer.run(Compiled Code)
    at weblogic.jms.client.JMSSession.run(JMSSession.java:342)
    at weblogic.jms.server.JMSServerSession.execute(JMSServerSession.java:44)
    at weblogic.kernel.ExecuteThread.run(Compiled Code)
    2002.06.06 at 03:49:43 PM PDT : java.sql.SQLException: I/O exception while
    talking to the server, java.io.IOException: Broken pipe
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:82)
    at com.pmi.zeus.ejb.LoanRegistration.LoanRegistrar.register(Compiled Code)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarEOImpl.register(LoanRegistrar
    EOImpl.java:56)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarEOImpl_ServiceStub.register(C
    ompiled Code)
    at
    com.pmi.zeus.mom.LoanInputQueueListener.messageInputProcessor(LoanInputQueue
    Listener.java:86)
    at
    com.pmi.zeus.mom.LoanInputQueueListener.onMessage(LoanInputQueueListener.jav
    a:59)
    at weblogic.jms.client.JMSMessageConsumer.run(Compiled Code)
    at weblogic.jms.client.JMSSession.run(JMSSession.java:342)
    at weblogic.jms.server.JMSServerSession.execute(JMSServerSession.java:44)
    at weblogic.kernel.ExecuteThread.run(Compiled Code)
    thanks,
    balaji.

    Balaji Venkataraman wrote:
    hi:
    I am using jDriver for SQL Server 6.5 and use prepared statements to execute
    my Stored Procedures from a Stateless-EJB. At times, I get the following
    error message, can anyone help me with what I should do ?That means the driver-DBMS connection has broken somehow. It can either be
    a bug in our driver, or a bug in the DBMS. Is there any indication in DBMS logs
    about client thread failures that result in a session being killed?
    If you can isolate the SQL and JDBC that causes this, we may be able to
    debug it. Is the DBMS a 6.5 DBMS?
    Joe
    >
    >
    2002.06.06 at 03:49:43 PM PDT : weblogic.jdbcbase.mssqlserver4.TdsException:
    I/O exception while talking to the server, java.io.IOException: Broken pipe
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:82)
    at weblogic.jdbcbase.mssqlserver4.TdsException.<init>(TdsException.java:40)
    at
    weblogic.jdbcbase.mssqlserver4.TdsStatement.cancel(TdsStatement.java:446)
    at weblogic.jdbcbase.mssqlserver4.TdsStatement.getMoreResults(Compiled
    Code)
    at weblogic.jdbcbase.mssqlserver4.TdsStatement.execute(Compiled Code)
    at weblogic.jdbcbase.mssqlserver4.TdsStatement.execute(Compiled Code)
    at weblogic.jdbcbase.jts.Statement.execute(Compiled Code)
    at weblogic.jdbc20.rmi.internal.PreparedStatementImpl.execute(Compiled
    Code)
    at weblogic.jdbc20.rmi.SerialPreparedStatement.execute(Compiled Code)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarDAO.insertException(Compiled
    Code)
    at com.pmi.zeus.ejb.LoanRegistration.LoanRegistrar.registerLoan(Unknown
    Source)
    at com.pmi.zeus.ejb.LoanRegistration.LoanRegistrar.register(Compiled Code)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarEOImpl.register(LoanRegistrar
    EOImpl.java:56)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarEOImpl_ServiceStub.register(C
    ompiled Code)
    at
    com.pmi.zeus.mom.LoanInputQueueListener.messageInputProcessor(LoanInputQueue
    Listener.java:86)
    at
    com.pmi.zeus.mom.LoanInputQueueListener.onMessage(LoanInputQueueListener.jav
    a:59)
    at weblogic.jms.client.JMSMessageConsumer.run(Compiled Code)
    at weblogic.jms.client.JMSSession.run(JMSSession.java:342)
    at weblogic.jms.server.JMSServerSession.execute(JMSServerSession.java:44)
    at weblogic.kernel.ExecuteThread.run(Compiled Code)
    2002.06.06 at 03:49:43 PM PDT : java.sql.SQLException: I/O exception while
    talking to the server, java.io.IOException: Broken pipe
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:82)
    at com.pmi.zeus.ejb.LoanRegistration.LoanRegistrar.register(Compiled Code)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarEOImpl.register(LoanRegistrar
    EOImpl.java:56)
    at
    com.pmi.zeus.ejb.LoanRegistration.LoanRegistrarEOImpl_ServiceStub.register(C
    ompiled Code)
    at
    com.pmi.zeus.mom.LoanInputQueueListener.messageInputProcessor(LoanInputQueue
    Listener.java:86)
    at
    com.pmi.zeus.mom.LoanInputQueueListener.onMessage(LoanInputQueueListener.jav
    a:59)
    at weblogic.jms.client.JMSMessageConsumer.run(Compiled Code)
    at weblogic.jms.client.JMSSession.run(JMSSession.java:342)
    at weblogic.jms.server.JMSServerSession.execute(JMSServerSession.java:44)
    at weblogic.kernel.ExecuteThread.run(Compiled Code)
    thanks,
    balaji.

  • JDBC Connectivity - broken pipe received when SQL server resets the connect

    Hi,
    We have downloaded MICROSOFT SQL SERVER 2000 DRIVER for UNIX boxes
    when i try to connect using JDBC , with all parameters
    user id, driver, password etc
    at the sniffer(TCPIP) level when the jdbc connection is attempted
    i see a
    1) SYN packet to the SQL server from unix box
    2) ACK SYN from the SQL server to unix box
    3) ACK from unix box to server
    4) no activity for about a minute
    5) a RST( reset ) from SQL server to unix box.
    at this point i get the following
    stack trace
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Broken pipe or
    no reader on socket
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.submitRequest(Unknow
    n Source)
    at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Sou
    rce)
    at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown S
    ource)
    at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Cod
    e)
    at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Cod
    e)
    at wu.database.WUDBAccess.getGiftGramConnection(WUDBAccess.java, Compile
    d Code)
    at wu.util.GiftMailClient.ConnectToDB(GiftMailClient.java, Compiled Code
    at wu.util.GiftMailClient.ProcessEmail(GiftMailClient.java, Compile
    the sniffer trace
    Frame source = (Network)
    Length = 66
    Time received = 09/24/2002 21:19:42.543
    Frame Relay
    Header = 1041
    0001 00.. 0100 .... = DLCI 68
    .... ..0. .... 000. = (Command)
    EtherType = 0800 IP
    Internet Protocol (IP)
    Source address = unix_server
    Destination address = SQL_server
    Type of service = 00
    Length = 60
    Identification = 58024
    Flags = 0000 (May fragment, Last fragment)
    Time to live = 28
    Protocol = 6 TCP
    Transmission Control Protocol (TCP)
    Source Port = 2175
    Destination Port = 8072
    Sequence = 2690569244
    Acknowledgement = 0
    Flags = 02 (SYN)
    Window size = 8192
    ============================= Frame Number 7 =============================
    Frame source = (User)
    Length = 66
    Time received = 09/24/2002 21:19:42.544
    Frame Relay
    Header = 1041
    0001 00.. 0100 .... = DLCI 68
    .... ..0. .... 000. = (Command)
    EtherType = 0800 IP
    Internet Protocol (IP)
    Source address = SQL_server
    Destination address = unix_server
    Type of service = 00
    Length = 60
    Identification = 47302
    Flags = 4000 (Don't fragment, Last fragment)
    Time to live = 126
    Protocol = 6 TCP
    Transmission Control Protocol (TCP)
    Source Port = 8072
    Destination Port = 2175
    Sequence = 60776554
    Acknowledgement = 2690569245
    Flags = 12 (ACK, SYN)
    Window size = 17520
    ============================= Frame Number 8 =============================
    Frame source = (Network)
    Length = 58
    Time received = 09/24/2002 21:19:42.607
    Frame Relay
    Header = 1041
    0001 00.. 0100 .... = DLCI 68
    .... ..0. .... 000. = (Command)
    EtherType = 0800 IP
    Internet Protocol (IP)
    Source address = unix_server
    Destination address = SQL_server
    Type of service = 00
    Length = 52
    Identification = 58025
    Flags = 0000 (May fragment, Last fragment)
    Time to live = 28
    Protocol = 6 TCP
    Transmission Control Protocol (TCP)
    Source Port = 2175
    Destination Port = 8072
    Sequence = 2690569245
    Acknowledgement = 60776555
    Flags = 10 (ACK)
    Window size = 8192
    ****************************************************8
    ============================= Frame Number 9 =============================
    Frame source = (User)
    Length = 52
    Time received = 09/24/2002 21:21:35.137
    Frame Relay
    Header = 1041
    0001 00.. 0100 .... = DLCI 68
    .... ..0. .... 000. = (Command)
    EtherType = 0800 IP
    Internet Protocol (IP)
    Source address = SQL_server
    Destination address = unix_server
    Type of service = 00
    Length = 40
    Identification = 47451
    Flags = 4000 (Don't fragment, Last fragment)
    Time to live = 126
    Protocol = 6 TCP
    Transmission Control Protocol (TCP)
    Source Port = 8072
    Destination Port = 2175
    Sequence = 60776555
    Acknowledgement = 623322721
    Flags = 04 (RST)
    Window size = 0
    Data (ASCII)
    0000 = 00 00 00 00 00 00 ......
    any help is welcome
    Regards,
    Sunil

    Well then, it beats me. I don't see what the problem could be in this case. :o(
    Get another driver and see what happens. I would recommend jTDS, because I'm one of the developers and I can help you debug it. It only supports basic things (such as forward-only result sets, prepared statements and callable statements) but it should be enough to see if you can connect to SQL Server. The address is http://jtds.sourceforge.net
    Alin.

  • Jackd + guitar: "timeouts and broken pipes"

    Hi friends! I'm trying to pass my electric guitar via any rack/effects (like Guitarix or Creox) with no luck. I've got this sound card:
    01:06.0 Multimedia audio controller: Creative Labs [SB Live! Value] EMU10k1X
    01:06.1 Input device controller: Creative Labs [SB Live! Value] Input device controller
    I try with QJackCtl and invoking jackd from the terminal with any luck.
    jackd -d alsa -C -P
    jackd 0.121.3
    Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
    jackd comes with ABSOLUTELY NO WARRANTY
    This is free software, and you are welcome to redistribute it
    under certain conditions; see the file COPYING for details
    could not open driver .so '/usr/lib/jack/jack_net.so': libcelt0.so.2: cannot open shared object file: No such file or directory
    could not open driver .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
    JACK compiled with System V SHM support.
    loading driver ..
    creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
    control device hw:0
    configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
    ALSA: final selected sample format for capture: 16bit little-endian
    ALSA: use 2 periods for capture
    ALSA: final selected sample format for playback: 16bit little-endian
    ALSA: use 2 periods for playback
    jackd watchdog: timeout - killing jackd
    [gabo@machina ~]$
    This is the output from QJackCtl:
    00:12:07.126 Client deactivated.
    00:12:07.130 JACK is being forced...
    cannot read server event (Success)
    cannot continue execution of the processing graph (Bad file descriptor)
    zombified - calling shutdown handler
    cannot send request type 7 to server
    cannot read result for request type 7 from server (Broken pipe)
    cannot send request type 7 to server
    cannot read result for request type 7 from server (Broken pipe)
    00:12:07.339 JACK was stopped with exit status=1.
    I can hear my guitar and record with Audacity, but when jackd enter into the escenario everything blows up. I read that nowadays almost any sound card will work with QJackCtl with the default options. I play with the parameters and sometimes jack refuse to start. With the default options on i can make it run, but i get no sound of the racks or guitar effects processors neither the guitar tuners that use jack takes the sound from the guitar. My line input is in capture via alsamixer, but still no luck. Any clue on this? I'm skipping steps?
    Thanks in advance.
    iamgabo

    Hi!
    groups && cat /proc/asound/cards && cat ~/.asoundrc && cat '/etc/security/limits.d/audio.conf' && jackd -v
    adm disk lp wheel http network video audio optical storage power users polkitd vboxusers wireshark kismet
    0 [Live ]: EMU10K1X - Dell Sound Blaster Live!
    Dell Sound Blaster Live! at 0xcc00 irq 17
    #pcm.upmix71 {
    #type upmix
    #slave.pcm "surround71"
    #delay 15
    #channels 8
    pcm.!default {
    type hw
    card 0
    ctl.!default {
    type hw
    card 0
    # convert alsa API over jack API
    # use it with
    # % aplay foo.wav
    # use this as default
    pcm.!default {
    type plug
    slave { pcm "jack" }
    ctl.mixer0 {
    type hw
    card 1
    # pcm type jack
    pcm.jack {
    type jack
    playback_ports {
    0 system:playback_1
    1 system:playback_2
    capture_ports {
    0 system:capture_1
    1 system:capture_2
    cat: /etc/security/limits.d/audio.conf: No such file or directory
    I have a file called 99-audio.conf
    cat /etc/security/limits.d/99-audio.conf
    @audio - rtprio 99
    @audio - memlock unlimited
    Also i've seen some guys changing this file too:
    cat /etc/security/limits.conf
    # /etc/security/limits.conf
    #Each line describes a limit for a user in the form:
    #<domain> <type> <item> <value>
    #Where:
    #<domain> can be:
    # - an user name
    # - a group name, with @group syntax
    # - the wildcard *, for default entry
    # - the wildcard %, can be also used with %group syntax,
    # for maxlogin limit
    #<type> can have the two values:
    # - "soft" for enforcing the soft limits
    # - "hard" for enforcing hard limits
    #<item> can be one of the following:
    # - core - limits the core file size (KB)
    # - data - max data size (KB)
    # - fsize - maximum filesize (KB)
    # - memlock - max locked-in-memory address space (KB)
    # - nofile - max number of open files
    # - rss - max resident set size (KB)
    # - stack - max stack size (KB)
    # - cpu - max CPU time (MIN)
    # - nproc - max number of processes
    # - as - address space limit (KB)
    # - maxlogins - max number of logins for this user
    # - maxsyslogins - max number of logins on the system
    # - priority - the priority to run user process with
    # - locks - max number of file locks the user can hold
    # - sigpending - max number of pending signals
    # - msgqueue - max memory used by POSIX message queues (bytes)
    # - nice - max nice priority allowed to raise to values: [-20, 19]
    # - rtprio - max realtime priority
    #<domain> <type> <item> <value>
    #* soft core 0
    #* hard rss 10000
    #@student hard nproc 20
    #@faculty soft nproc 20
    #@faculty hard nproc 50
    #ftp hard nproc 0
    #@student - maxlogins 4
    * - rtprio 0
    * - nice 0
    @audio - rtprio 65
    @audio - nice -10
    @audio - memlock unlimited
    jackd 0.121.3
    There are the snaps for QJackCtl
    Also, checkout this stuff that i've recorded with audacity, only from the line and nothing else
    http://ompldr.org/vZ3A2eg
    Thanks!
    Last edited by iamgabo (2012-12-15 02:21:08)

  • Ssh configuration to avoid connection timeouts / broken pipes ?

    I'm running irssi through screen on my server via ssh. Recently, my parents' internet connection has become very dodgy, and because of this, my terminal freezes altogether once every 15 minutes or so, and resumes with some "broken pipe" message after a very long time (around 10 minutes). I usualy just kill the terminal when I notice the freezing and open a new one with another ssh connection, but this seems to be getting more and more frequent, so it's very annoying. I was wondering if there is a way to get around this? Server configuration, client configuration, a different ssh client ... ?
    By googling, I found that disabling "TCPKeepAlive" might do the trick, and so I did. It seemed to work at first, my connection was up for about half an hour, but then the same thing occured again
    The sadest part of this is that by using puTTY on my phone over 3G, the connection stays up forever, but with the wired broadband, it won't stay up for more than 15 minutes
    EDIT: This time I got this message: "Timeout, server <myaddress> not responding", after 29 minutes.
    Last edited by pauligrinder (2011-04-24 00:50:30)

    yep, this connection used to be reliable too, but now I get timeouts all the time, and also if I connect the Deluge-GTK to a daemon running on my server, it will randomly freeze and I have to reconnect to get it to work again. Luckily I'm getting out of here tomorrow
    Still, it would be nice to solve this problem, because I will be coming here every once in a while... I would call the ISP and complain (I don't think the problem can be with our routers, because ssh connections inside the LAN work just fine), but because it's easter, their customer support is closed Besides, I don't know how to explain the problem to them, because most likely they won't even know what ssh is...
    I tried rwd's configs, and they didn't help either. The only difference is that it seems to timeout faster now, instead of freezing the whole terminal for a long time...
    Last edited by pauligrinder (2011-04-25 14:13:11)

  • PL/SQL Web Service: Broken Pipe

    We have successfully deployed PL/SQL Web Services on the Oracle Application Server 10g with about 6 containers. The web services are being consumed by a .NET application. All seems to be working well but we continually are having intermittent (every 2-3 days) "BROKEN PIPE" errors which is causing us to bounce the container constantly. This is not very effecient for a production environment. Does anybody have any ideas........? Here is what shows up in the log:
    javax.servlet.ServletException: Io exception: Broken pipe
    at swprodweb.__Ws_reservationImplSPWrapper.destroy(__Ws_reservationImplSPWrapper.java:605)
    at oracle.j2ee.ws.RpcWebService.destroy(RpcWebService.java:93)
    at com.evermind.server.http.ServletInstanceInfo.destroy(ServletInstanceInfo.java:127)
    at com.evermind.server.http.HttpApplication.destroyServlets(HttpApplication.java:5805)
    at com.evermind.server.http.HttpApplication.destroy(HttpApplication.java:5732)
    at com.evermind.server.http.HttpSite.destroy(HttpSite.java:881)
    at com.evermind.server.http.HttpServer.destroy(HttpServer.java:613)
    at com.evermind.server.ApplicationServer.destroy(ApplicationServer.java:2033)
    at com.evermind.server.ApplicationServerShutdownHandler.run(ApplicationServerShutdownHandler.java:39)
    at java.lang.Thread.run(Thread.java:534)
    So everytime I see this error I know that we have to bounce the container. Very Frustrating!!

    Hi,
    Although it's a long time since you posted your message, I nowadays working with this issue, that is, calling web services from Oracle database 10g through UTL_DBWS package. It turns out that almost 3 of 100 requests fail due to this error (broken pipe). Actually, the trace is:
    ERROR on line 1:
    ORA-29532: Java call finished due to an unresolved exception: HTTP
    transport error: javax.xml.soap.SOAPException:
    java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message
    send failed: send failed
    Broken pipe
    ORA-06512: en "SYS.UTL_DBWS", línea 403
    ORA-06512: en "SYS.UTL_DBWS", línea 400
    I'm looking for the cause of this error. Has anyone any idea about this?
    Thanks a lot.
    Luis Serrano.

Maybe you are looking for