Handling SQLExceptions

Hi,
I have an interesting problem. In my ctor of a Creator JSP page, after the built-in initialization for a rowSet, I call some innocent SQL like so:
attributeRowSetForListbox.setInt( 1, PRODUCT_ID);
attributeRowSetForListbox.setString( 2, "f");
attributeRowSetForListbox.execute();
The listbox is bound to the rowset via Creator and this works fine when the query succeeds.
But when the query fails, I get an SQLException that says:
java.sql.SQLException: Illegal operation on empty result set.
Fine.
The problem is that this Exception is printed to the log, but it is NOT executed in my code - the catch block for my try never gets called!!!! It is as if the call to execute() is asynchronous and always succeeds, but real SQL failures (SQLExceptions) are posted (say from another thread) to the log but not in my code. If this is true, then do I need to register an exception listener, much like is done in JMS. If so, what is the registration method?
HOWEVER - If this is NOT the case, and execute() is supposed to operate synchronously (i.e., from the thread that invoked it), then we have a bigger problem...
TIA for your help.

Thanks, sure thing. Of course we can see that MySQL is throwing the exception (perhaps innapropriately, perhaps not) but one problem is that my jsp page redirects to the same page and I can't figure out how to control the program flow from that point - perhaps it is a JSF technique I am unaware of? Or a setting in the App server I can toggle?
Even if I could, it's not really an error... BTW, I've seen the other postings regarding this issue.
Anyway:
CODE:
attributeRowSetForListbox.setInt( 1, PRODUCT_ID);
attributeRowSetForListbox.setString( 2, "f");
attributeRowSetForListbox.execute();
attributeRowSetForListbox.commit();
if ( attributeRowSetForListbox.next())
// then there are more than zero rows.
this.log( mPageName + " attributeRowSetForListbox should have some rows");
else
// handle EMPTY ROWSET HERE. (not in the catch block.)
this.log( mPageName + " attributeRowSetForListbox should be empty, done with this Product!");
final String AFTER_MSG = " ctor; <<SUCCESS>> Gathered all Attributes for product - " + PRODUCT;
this.log( mPageName + AFTER_MSG);
catch ( Exception e)
final String FAILURE_MSG = " ctor; <<FAILED>> to gather all Attributes for product - " + PRODUCT;
this.log( mPageName + FAILURE_MSG);
final String ERR_MSG = mPageName
+ " <<FAILED>> ctor; Exception occurred ****!! : " + e.getMessage();
this.log( ERR_MSG);
LOG:
[#|2005-02-14T17:46:33.375-0700|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=12;|WebModule[/tas_user_webapp][TasNewInventoryPage] attributeRowSetForListbox should be empty, done with this Product!|#]
[#|2005-02-14T17:46:33.375-0700|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=12;|WebModule[/tas_user_webapp][TasNewInventoryPage] ctor; <<SUCCESS>> Gathered all Attributes for product - -1:|#]
[#|2005-02-14T17:46:33.421-0700|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.err|_ThreadID=12;|java.sql.SQLException: Illegal operation on empty result set.
at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java:5327)
at com.mysql.jdbc.ResultSet.getObject(ResultSet.java:1624)
at com.sun.sql.rowset.JdbcRowSetXImpl.handleOnInsertRowGet(JdbcRowSetXImpl.java:2372)
at com.sun.sql.rowset.JdbcRowSetXImpl.handleOnInsertRowGet(JdbcRowSetXImpl.java:2141)
at com.sun.sql.rowset.JdbcRowSetXImpl.getObject(JdbcRowSetXImpl.java:1021)
at com.sun.sql.rowset.JdbcRowSetXImpl.getObject(JdbcRowSetXImpl.java:1025)
at com.sun.jsfcl.data.ResultSetPropertyResolver$ColumnData.getSelectItems(ResultSetPropertyResolver.java:303)
at com.sun.jsfcl.data.ResultSetPropertyResolver.getValue(ResultSetPropertyResolver.java:61)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at javax.faces.component.UISelectItems.getValue(UISelectItems.java:110)
at com.sun.faces.util.Util.getSelectItems(Util.java:600)
at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:488)
at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:465)
at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:430)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:623)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)
at com.sun.faces.taglib.html_basic.SelectOneListboxTag.doEndTag(SelectOneListboxTag.java:521)
at org.apache.jsp.TasNewInventoryPage_jsp._jspx_meth_h_selectOneListbox_0(TasNewInventoryPage_jsp.java:425)
at org.apache.jsp.TasNewInventoryPage_jsp._jspx_meth_h_form_0(TasNewInventoryPage_jsp.java:170)
at org.apache.jsp.TasNewInventoryPage_jsp._jspx_meth_f_view_0(TasNewInventoryPage_jsp.java:122)
at org.apache.jsp.TasNewInventoryPage_jsp._jspService(TasNewInventoryPage_jsp.java:83)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
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:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:718)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:478)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:413)
at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:77)
at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:92)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:319)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
at com.sun.jsfcl.app.ViewHandlerImpl.renderView(ViewHandlerImpl.java:169)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
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:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.|#]
[#|2005-02-14T17:46:33.421-0700|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.err|_ThreadID=12;|java:107)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
at java.lang.Thread.run(Thread.java:534)
|#]

Similar Messages

  • Invalid Handle SQLException - HELP!!

    I am using a timer and a counter to automaticallyinsert records into my table at predefined intervals. The counter is used to provide the unique PersonID. My first record is inserted fine, where PersonID is 0. As soon as PersonID is 1 or more, I get an Invalid Handle SQLException.
    The line which is generating the error is:
    stmt.setInt(1, id);
    Relevent code is given below:
         * Insert a record into the Person table,
        private void insertPersonRecord(int id) {
            try {
                connection.setAutoCommit(false);
    System.err.println("ID: " + id);
                stmt.setInt(1, id);
                stmt.setString(2, "First_name");
                stmt.setString(3, "Sur_name");
                stmt.executeUpdate();
                connection.commit();
                connection.setAutoCommit(true);
                stmt.close();
    System.err.println("Person record inserted");
            catch(SQLException sqlex) {
    System.err.println("Unable to insert person record");
                sqlex.printStackTrace();
         * Set up timer actions.
        class InsertTask extends TimerTask {
            public void run() {
                insertPersonRecord(id);
                id++;
                if (id == 20) {
    System.err.println("Timer stopped - shutting down");                   
                    shutDown();
        }I just can't work this out. Any ideas?
    Cheers,
    Sandra.

    More code:
    * Simple JDBC prototype using the Sports.mdb MSAccess database.
    public class JDBCPrototype {
        private Connection connection;
        private PreparedStatement stmt;
        private Timer timer;
        private int id = 0;
        public JDBCPrototype() {
            // Connect to the Sports database using a JDBC-ODBC bridge.
            final String url = "jdbc:odbc:Sports";
            final String username = "JDBCPrototype";
            final String password = "test";
              // Load the driver to allow connection to the database          
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                connection = DriverManager.getConnection(url, username, password);
    System.err.println("Connection established");           
            catch (ClassNotFoundException cnfex) {
    System.err.println("Failed to load JDBC/ODBC driver.");
                cnfex.printStackTrace();
                System.exit(1);
            catch (SQLException sqlex) {
    System.err.println("Unable to connect");
                sqlex.printStackTrace();
            String insertString = "INSERT INTO PARTICIPANTS " +
                "VALUES (?, ?, ?)";
            try {
                stmt = connection.prepareStatement(insertString);    
            catch(SQLException sqlex) {
                sqlex.printStackTrace();
    System.err.println("Unable to prepare statement");           
            //empty database
            try {
                Statement statement = connection.createStatement();
                statement.executeUpdate
                        ("DELETE * FROM PARTICIPANTS");
    System.err.println("Table emptied");
            catch(SQLException sqlex) {
    System.err.println("Unable to empty table");
                sqlex.printStackTrace();
            startTimer();
         * Insert records using the timer.
        private void startTimer() {
              timer = new Timer();       
            final int DELAY = 50;
            timer.schedule(new InsertTask(), 0, DELAY);    
    System.err.println("Timer started");
        }   

  • VisualAge for Java - generated error handling code

    The code that VAJ generates to handle errors is getting on my nerves, and I'd like to know if someone else is experiencing this difficulty.
    It's not possible to specify which exception you're handling. The generated catch code produced is of the form below:
    catch (java.lang.Throwable ivjExc) {
    // user code begin {3}
    // user code end
    handleException(ivjExc);
    This rules out any attempt to handle specific exceptions in a try catch block such as:
    try {
    } catch (java.sql.SQLException e) {
    } catch(java.io.IOException e2) {
    It also prevents the very useful compiler errors you get when you ignore certain exceptions, because they all end up caught in the Throwable section.
    I know I can partially go around this with RTTI, or even worse, by cleverly coding the user code sections, such as in:
    try {
    // user code begin {1}
    // user code end
    [...] myCode(); [...]
    // user code begin {2}
    } catch (SQLException e) {
    [...] myCatchCode(); [...]
    // TRICKY BIT - NOTICE THE user code end
    // This actually does nothing, but rids me of the
    // default catch block
    try {
    // user code end
    } catch (java.lang.Throwable ivjExc) {
    // user code begin {3}
    // user code end
    handleException(ivjExc);
    Anyone with this trouble? How do you go around it?

    Actually, from what I could tell, you can actually program almot entirely by resorting to the visual programming tool. Better said than done, of course, because a good deal of coding would end up being less practical than actually typing. And the tangling of connections would be ridiculous. But with some more fine tuning of these features, IBM might end up with a very, very effective visual tool, especially if you do your own programming with this in mind.
    Specifically, I'm doing some database programming and I'd like to handle SQLExceptions differently than all the other "Throwable" ones. In particular, I'm getting a bunch of records when a JFrame is windowOpened, and if there's an error I'm showing a window that details the list of database errors that occurred (each SQLException allows access to the next in the list through getNextException(), so I'm adding all of these to a JList). This window is a DetailSQLExceptionDialog which extends DetailThrowableDialog (a class of mine which adds a Throwable's message to a list).
    The actual code where I get the records is below. Don't bother with the details, but as you can see I had to use "instanceof" to figure out what class I'm getting as an exception.
    * connEtoM2: (MasterFrame.window.windowOpened(java.awt.event.WindowEvent) --> fctMasterTableModel.setListOfRecords(Ljava.util.ArrayList;)V)
    * @param arg1 java.awt.event.WindowEvent
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private void connMasterFrame_WindowOpened(java.awt.event.WindowEvent arg1) {
    try {
    // user code begin {1}
    // user code end
    getumMasterTableModel().setListOfRecords(Master.getAllRecords(conn));
    // user code begin {2}
    // user code end
    } catch (java.lang.Throwable ivjExc) {
    // user code begin {3}
    if (ivjExc instanceof SQLException) {
    MessageWithDetail.show(
    "Error getting the records.",
    new DetailSQLExceptionDialog((SQLException) ivjExc, this, getTitle(), true),
    this,
    getTitle());
    dispose();
    } else {
    MessageWithDetail.show(
    "Error getting the records.",
    new DetailThrowableDialog(ivjExc, this, getTitle(), true),
    this,
    getTitle());
    dispose();
    return;
    // user code end
    handleException(ivjExc);
    It's still not a good solution because since the actual "catch" part has a "throwable" in it, which catches EVERY exception, since Throwable is The Mother Of all Exceptions, I wouldn't get the compiler error for not handling the SQLException. In fact, I'm not aware of what kind of errors can be raised by the class/methods I'm using, unless I delve into all the docs and that can be a daunting task. Basically, the help that the compiler would give me pointing those exceptions as not caught, which is so nice in Java, is gone with the wind.
    :-P

  • MS Access 2003 PDFMaker Error

    OS: XP Pro Ver 2002 SP2
    App: MS Access 2003 SP3
    Adobe Acrobat 8 Standard 8.1.2
    I can't print Access Reports using PDFMaker unless I'm logged into the PC with admin rights. However printing to Adobe PDF does work without admin rights. I tried some of the suggestions in Tech Note 333235 with no luck.

    Yes, and no.
    I had the MS Access file opened, but not the table which I was writing to.
    I had been manually deleting, and recreating the table in MS Access each time I wrote to it via JDBC. I was testing different ways of handling SQLException.
    The JDBC examples in both books, and this website ended the update (or any) statement whenever there is an occurence of SQLException. I moved the try/catch inside a "labeled" while loop, so the program would append the error message to a log, and continue to process the next recordset until the EOF. I was successful after a few trials; it works better than the import function from MS Access.
    I think my clipboard was very full when I copied and pasted table several times.
    Thank you.

  • ESB Invokation failed "exception on JaxRpc invoke: received empty response"

    I have a async bpel-process invoking an esb-routing-service whicht routes to an db-adapter-service for executing a select statement running about 2 minutes.
    Sometimes this invoke of the esb-service failes with this fault:
    <fault>
      <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
      <part name="summary">
        <summary>exception on JaxRpc invoke: received empty response</summary>
      </part>
      </remoteFault>
    </fault>If i look inside the esb-console the instance completes successfully.
    Then i look at the logfile /opt/oracle/soa/as_1/j2ee/home/log/home_default_group_1/oc4j/log.xml and see this errormessages:
    <MESSAGE>
      <HEADER>
        <TSTZ_ORIGINATING>2008-02-07T15:30:40.118+01:00</TSTZ_ORIGINATING>
        <COMPONENT_ID>j2ee</COMPONENT_ID>
        <MSG_ID>J2EE DS-00181</MSG_ID>
        <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
        <MSG_LEVEL>1</MSG_LEVEL>
        <HOST_ID>QRZ1275.kabeldeutschland.de</HOST_ID>
        <HOST_NWADDR>10.32.7.156</HOST_NWADDR>
        <MODULE_ID>datasource</MODULE_ID>
        <THREAD_ID>42</THREAD_ID>
        <USER_ID>soa</USER_ID>
        <SUPPL_ATTRS>
          <ATTR NAME="J2EE_MODULE.name">provider-war</ATTR>
          <ATTR NAME="J2EE_APP.name">esb-rt</ATTR>
          <ATTR NAME="WEBSERVICE_PORT.name">__soap_RSreadServiceOrderIDsWithChangedStatus_RSreadServiceOrderIDsWithChangedStatus</ATTR>
          <ATTR NAME="WEBSERVICE.name">ESB_RSreadServiceOrderIDsWithChangedStatus_Service</ATTR>
        </SUPPL_ATTRS>
      </HEADER>
      <CORRELATION_DATA>
        <EXEC_CONTEXT_ID><UNIQUE_ID>10.32.7.156:63112:1202394509070:3176</UNIQUE_ID><SEQ>5</SEQ></EXEC_CONTEXT_ID>
      </CORRELATION_DATA>
      <PAYLOAD>
        <MSG_TEXT>Commit failed.</MSG_TEXT>
      </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
      <HEADER>
        <TSTZ_ORIGINATING>2008-02-07T15:30:40.118+01:00</TSTZ_ORIGINATING>
        <COMPONENT_ID>j2ee</COMPONENT_ID>
        <MSG_ID>J2EE DS-00190</MSG_ID>
        <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
        <MSG_LEVEL>1</MSG_LEVEL>
        <HOST_ID>QRZ1275.kabeldeutschland.de</HOST_ID>
        <HOST_NWADDR>10.32.7.156</HOST_NWADDR>
        <MODULE_ID>datasource</MODULE_ID>
        <THREAD_ID>42</THREAD_ID>
        <USER_ID>soa</USER_ID>
        <SUPPL_ATTRS>
          <ATTR NAME="J2EE_MODULE.name">provider-war</ATTR>
          <ATTR NAME="J2EE_APP.name">esb-rt</ATTR>
          <ATTR NAME="WEBSERVICE_PORT.name">__soap_RSreadServiceOrderIDsWithChangedStatus_RSreadServiceOrderIDsWithChangedStatus</ATTR>
          <ATTR NAME="WEBSERVICE.name">ESB_RSreadServiceOrderIDsWithChangedStatus_Service</ATTR>
        </SUPPL_ATTRS>
      </HEADER>
      <CORRELATION_DATA>
        <EXEC_CONTEXT_ID><UNIQUE_ID>10.32.7.156:63112:1202394509070:3176</UNIQUE_ID><SEQ>5</SEQ></EXEC_CONTEXT_ID>
      </CORRELATION_DATA>
      <PAYLOAD>
        <MSG_TEXT>Setting auto commit on the connection failed. Exception: 'java.sql.SQLException: Closed Connection'</MSG_TEXT>
      </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
      <HEADER>
        <TSTZ_ORIGINATING>2008-02-07T15:30:40.119+01:00</TSTZ_ORIGINATING>
        <COMPONENT_ID>j2ee</COMPONENT_ID>
        <MSG_ID>J2EE JTA-00901</MSG_ID>
        <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
        <MSG_LEVEL>1</MSG_LEVEL>
        <HOST_ID>QRZ1275.kabeldeutschland.de</HOST_ID>
        <HOST_NWADDR>10.32.7.156</HOST_NWADDR>
        <MODULE_ID>transaction</MODULE_ID>
        <THREAD_ID>42</THREAD_ID>
        <USER_ID>soa</USER_ID>
        <SUPPL_ATTRS>
          <ATTR NAME="J2EE_MODULE.name">provider-war</ATTR>
          <ATTR NAME="J2EE_APP.name">esb-rt</ATTR>
          <ATTR NAME="WEBSERVICE_PORT.name">__soap_RSreadServiceOrderIDsWithChangedStatus_RSreadServiceOrderIDsWithChangedStatus</ATTR>
          <ATTR NAME="WEBSERVICE.name">ESB_RSreadServiceOrderIDsWithChangedStatus_Service</ATTR>
        </SUPPL_ATTRS>
      </HEADER>
      <CORRELATION_DATA>
        <EXEC_CONTEXT_ID><UNIQUE_ID>10.32.7.156:63112:1202394509070:3176</UNIQUE_ID><SEQ>5</SEQ></EXEC_CONTEXT_ID>
      </CORRELATION_DATA>
      <PAYLOAD>
        <MSG_TEXT>Coordinator caught XAException thrown from resource during Action: ACTION_COMMIT. Exception Msg: javax.transaction.xa.XAException: Commit failed. - Error Code: XA_RBROLLBACK - Branch: [oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, state={PREPARED}, exception error code=] - Thread: HTTPThreadGroup-66 .  This XAException may be expected  during recovery) </MSG_TEXT>
      </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
      <HEADER>
        <TSTZ_ORIGINATING>2008-02-07T15:30:40.121+01:00</TSTZ_ORIGINATING>
        <COMPONENT_ID>j2ee</COMPONENT_ID>
        <MSG_ID>J2EE JTA-99999</MSG_ID>
        <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
        <MSG_LEVEL>1</MSG_LEVEL>
        <HOST_ID>QRZ1275.kabeldeutschland.de</HOST_ID>
        <HOST_NWADDR>10.32.7.156</HOST_NWADDR>
        <MODULE_ID>transaction</MODULE_ID>
        <THREAD_ID>42</THREAD_ID>
        <USER_ID>soa</USER_ID>
        <SUPPL_ATTRS>
          <ATTR NAME="J2EE_MODULE.name">provider-war</ATTR>
          <ATTR NAME="J2EE_APP.name">esb-rt</ATTR>
          <ATTR NAME="WEBSERVICE_PORT.name">__soap_RSreadServiceOrderIDsWithChangedStatus_RSreadServiceOrderIDsWithChangedStatus</ATTR>
          <ATTR NAME="WEBSERVICE.name">ESB_RSreadServiceOrderIDsWithChangedStatus_Service</ATTR>
        </SUPPL_ATTRS>
      </HEADER>
      <CORRELATION_DATA>
        <EXEC_CONTEXT_ID><UNIQUE_ID>10.32.7.156:63112:1202394509070:3176</UNIQUE_ID><SEQ>5</SEQ></EXEC_CONTEXT_ID>
      </CORRELATION_DATA>
      <PAYLOAD>
        <MSG_TEXT>ProtocolError : Branch [oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, state={PREPARED}, exception error code=] in transaction Global Transaction Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740), type=esb-rt, state=COMMITTING, time in completion or recovering=16)
    [oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, state={PREPARED}, exception error code=],
    [oracle.oc4j.sql.xa.EmulatedXAResource@1eb09a1, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.01), oracle.oc4j.sql.xa.EmulatedXAResource@1eb09a1, state={PREPARED}, exception error code=]
    } returned RB* during commit.</MSG_TEXT>
      </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
      <HEADER>
        <TSTZ_ORIGINATING>2008-02-07T15:30:40.122+01:00</TSTZ_ORIGINATING>
        <COMPONENT_ID>j2ee</COMPONENT_ID>
        <MSG_ID>J2EE JTA-00113</MSG_ID>
        <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
        <MSG_LEVEL>1</MSG_LEVEL>
        <HOST_ID>QRZ1275.kabeldeutschland.de</HOST_ID>
        <HOST_NWADDR>10.32.7.156</HOST_NWADDR>
        <MODULE_ID>transaction</MODULE_ID>
        <THREAD_ID>42</THREAD_ID>
        <USER_ID>soa</USER_ID>
        <SUPPL_ATTRS>
          <ATTR NAME="J2EE_MODULE.name">provider-war</ATTR>
          <ATTR NAME="J2EE_APP.name">esb-rt</ATTR>
          <ATTR NAME="WEBSERVICE_PORT.name">__soap_RSreadServiceOrderIDsWithChangedStatus_RSreadServiceOrderIDsWithChangedStatus</ATTR>
          <ATTR NAME="WEBSERVICE.name">ESB_RSreadServiceOrderIDsWithChangedStatus_Service</ATTR>
        </SUPPL_ATTRS>
      </HEADER>
      <CORRELATION_DATA>
        <EXEC_CONTEXT_ID><UNIQUE_ID>10.32.7.156:63112:1202394509070:3176</UNIQUE_ID><SEQ>5</SEQ></EXEC_CONTEXT_ID>
      </CORRELATION_DATA>
      <PAYLOAD>
        <MSG_TEXT>Could not reconstruct transaction from store after protocol error: oracle.as.j2ee.transaction.tpc.Store$StoreException: Can not recover transaction as logging is not enabled in transaction-manager.xml xid : Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740)
    xid : Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740)</MSG_TEXT>
      </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
      <HEADER>
        <TSTZ_ORIGINATING>2008-02-07T15:30:40.124+01:00</TSTZ_ORIGINATING>
        <COMPONENT_ID>tip</COMPONENT_ID>
        <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
        <MSG_LEVEL>1</MSG_LEVEL>
        <HOST_ID>QRZ1275.kabeldeutschland.de</HOST_ID>
        <HOST_NWADDR>10.32.7.156</HOST_NWADDR>
        <MODULE_ID>esb.server.service.impl.soap</MODULE_ID>
        <THREAD_ID>42</THREAD_ID>
        <USER_ID>soa</USER_ID>
        <SUPPL_ATTRS>
          <ATTR NAME="J2EE_MODULE.name">provider-war</ATTR>
          <ATTR NAME="J2EE_APP.name">esb-rt</ATTR>
          <ATTR NAME="WEBSERVICE_PORT.name">__soap_RSreadServiceOrderIDsWithChangedStatus_RSreadServiceOrderIDsWithChangedStatus</ATTR>
          <ATTR NAME="WEBSERVICE.name">ESB_RSreadServiceOrderIDsWithChangedStatus_Service</ATTR>
        </SUPPL_ATTRS>
      </HEADER>
      <CORRELATION_DATA>
        <EXEC_CONTEXT_ID><UNIQUE_ID>10.32.7.156:63112:1202394509070:3176</UNIQUE_ID><SEQ>5</SEQ></EXEC_CONTEXT_ID>
      </CORRELATION_DATA>
      <PAYLOAD>
        <MSG_TEXT>Error constructing SOAPFault</MSG_TEXT>
        <SUPPL_DETAIL><![CDATA[oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.as.j2ee.transaction.tpc.ProtocolErrorWithNotification: Branch [oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, state={PREPARED}, exception error code=] in transaction Global Transaction Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740), type=esb-rt, state=COMMITTING, time in completion or recovering=16)
    [oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, state={PREPARED}, exception error code=],
    [oracle.oc4j.sql.xa.EmulatedXAResource@1eb09a1, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.01), oracle.oc4j.sql.xa.EmulatedXAResource@1eb09a1, state={PREPARED}, exception error code=]
    } returned RB* during commit.
         at oracle.as.j2ee.transaction.tpc.Coordinator$Action.processRB(Coordinator.java:1133)
         at oracle.as.j2ee.transaction.tpc.Coordinator$Action.interpretException(Coordinator.java:1090)
         at oracle.as.j2ee.transaction.tpc.Coordinator$Action.processException(Coordinator.java:1049)
         at oracle.as.j2ee.transaction.tpc.Coordinator$Action.act(Coordinator.java:1013)
         at oracle.as.j2ee.transaction.tpc.Coordinator.doAction(Coordinator.java:687)
         at oracle.as.j2ee.transaction.tpc.Coordinator.actOnEligibleBranch(Coordinator.java:676)
         at oracle.as.j2ee.transaction.tpc.Coordinator.actOnEligibleBranchForDoCommit(Coordinator.java:533)
         at oracle.as.j2ee.transaction.tpc.Coordinator.doCommit(Coordinator.java:520)
         at oracle.as.j2ee.transaction.tpc.Coordinator.doResolve(Coordinator.java:317)
         at oracle.as.j2ee.transaction.tpc.Coordinator.resolve(Coordinator.java:104)
         at oracle.as.j2ee.transaction.tpc.TwoPhaseCommitEngine.commit(TwoPhaseCommitEngine.java:111)
         at com.evermind.server.ApplicationServerTransaction.twoPhaseCommit(ApplicationServerTransaction.java:780)
         at com.evermind.server.ApplicationServerTransaction.commitBasedOnResourceCount(ApplicationServerTransaction.java:609)
         at com.evermind.server.ApplicationServerTransaction.doCommit(ApplicationServerTransaction.java:279)
         at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:162)
         at com.evermind.server.ApplicationServerTransactionManager.commit(ApplicationServerTransactionManager.java:472)
         at oracle.tip.esb.server.common.JTAHelper.commitTransaction(JTAHelper.java:148)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1473)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(EventOracleSoapProvider.java:333)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(EventOracleSoapProvider.java:200)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         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 com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(EventOracleSoapProvider.java:370)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(EventOracleSoapProvider.java:200)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         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 com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.as.j2ee.transaction.tpc.ProtocolErrorWithNotification: Branch [oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, state={PREPARED}, exception error code=] in transaction Global Transaction Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740), type=esb-rt, state=COMMITTING, time in completion or recovering=16)
    [oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@1034dd5, state={PREPARED}, exception error code=],
    [oracle.oc4j.sql.xa.EmulatedXAResource@1eb09a1, Xid( Global Id df.c8.fe.d9.ff.ff.ff.ff.a4.28.8c.f3.17.01.00.00.fe.28.00.00.00.00.00.00, Format Id 1330790740, Branch Id 40.d6.ea.48.00.00.00.00.00.00.00.00.00.00.00.01), oracle.oc4j.sql.xa.EmulatedXAResource@1eb09a1, state={PREPARED}, exception error code=]
    } returned RB* during commit.
         at oracle.as.j2ee.transaction.tpc.Coordinator$Action.processRB(Coordinator.java:1133)
         at oracle.as.j2ee.transaction.tpc.Coordinator$Action.interpretException(Coordinator.java:1090)
         at oracle.as.j2ee.transaction.tpc.Coordinator$Action.processException(Coordinator.java:1049)
         at oracle.as.j2ee.transaction.tpc.Coordinator$Action.act(Coordinator.java:1013)
         at oracle.as.j2ee.transaction.tpc.Coordinator.doAction(Coordinator.java:687)
         at oracle.as.j2ee.transaction.tpc.Coordinator.actOnEligibleBranch(Coordinator.java:676)
         at oracle.as.j2ee.transaction.tpc.Coordinator.actOnEligibleBranchForDoCommit(Coordinator.java:533)
         at oracle.as.j2ee.transaction.tpc.Coordinator.doCommit(Coordinator.java:520)
         at oracle.as.j2ee.transaction.tpc.Coordinator.doResolve(Coordinator.java:317)
         at oracle.as.j2ee.transaction.tpc.Coordinator.resolve(Coordinator.java:104)
         at oracle.as.j2ee.transaction.tpc.TwoPhaseCommitEngine.commit(TwoPhaseCommitEngine.java:111)
         at com.evermind.server.ApplicationServerTransaction.twoPhaseCommit(ApplicationServerTransaction.java:780)
         at com.evermind.server.ApplicationServerTransaction.commitBasedOnResourceCount(ApplicationServerTransaction.java:609)
         at com.evermind.server.ApplicationServerTransaction.doCommit(ApplicationServerTransaction.java:279)
         at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:162)
         at com.evermind.server.ApplicationServerTransactionManager.commit(ApplicationServerTransactionManager.java:472)
         at oracle.tip.esb.server.common.JTAHelper.commitTransaction(JTAHelper.java:148)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1473)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(EventOracleSoapProvider.java:333)
         ... 19 more
    ]]></SUPPL_DETAIL>
      </PAYLOAD>
    </MESSAGE>

    I am getting also similar exceptions in logs for JMS connections over AQ.
    It looks like problematic JDBC connections (database is down), however it is not true database was running (confirmed by alert.logs from DB)
    Following Exceptions were seen in log.xml:
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T10:09:04.084+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>tip</COMPONENT_ID>
    <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>esb.server.service.impl.inadapter</MODULE_ID>
    <THREAD_ID>72</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.68.7.92:99044:1208331963242:25573</UNIQUE_ID><SEQ>23</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>JCA: ORABPEL-12165
    ERRJMS_PROVIDER_ERR.
    Could not produce message due to JMS provider error.
    Please examine the log file to determine the problem.
    </MSG_TEXT>
    <SUPPL_DETAIL><![CDATA[ORABPEL-12165
    ERRJMS_PROVIDER_ERR.
    Could not produce message due to JMS provider error.
    Please examine the log file to determine the problem.
    at oracle.tip.adapter.jms.JMS.JMSMessageProducer.produce(JMSMessageProducer.java:233)
    at oracle.tip.adapter.jms.outbound.JmsProducer.execute(JmsProducer.java:143)
    at oracle.tip.adapter.jms.JmsInteraction.executeProduce(JmsInteraction.java:197)
    at oracle.tip.adapter.jms.JmsInteraction.execute(JmsInteraction.java:156)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:485)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:736)
    at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:429)
    at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:443)
    at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:251)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:727)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:366)
    at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
    at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3672)
    at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1650)
    at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:276)
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5658)
    at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1082)
    at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:535)
    at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:342)
    at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:648)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at CubeDeliveryBean_LocalProxy_4bin6i8.handleInvoke(Unknown Source)
    at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:138)
    at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
    at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
    at WorkerBean_EndPointProxy_4bin6i8.onMessage(Unknown Source)
    at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:266)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.jms.AQjmsException: Io exception: Connection reset
    at oracle.jms.AQjmsProducer.enqueue(AQjmsProducer.java:1180)
    at oracle.jms.AQjmsProducer.send(AQjmsProducer.java:633)
    at oracle.jms.AQjmsProducer.send(AQjmsProducer.java:459)
    at oracle.tip.adapter.jms.JMS.JMSMessageProducer.produce(JMSMessageProducer.java:219)
    ... 62 more
    ]]></SUPPL_DETAIL>
    </PAYLOAD>
    </MESSAGE>
    then we get:
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T10:09:04.087+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>tip</COMPONENT_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>esb.server.service.impl.inadapter</MODULE_ID>
    <THREAD_ID>72</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.68.7.92:99044:1208331963242:25573</UNIQUE_ID><SEQ>23</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>JCA: file:/u01/app/oracle/product/10.1.3.1/mtsoa/bpel/domains/default/tmp/.bpel_UpdateCustomerSiebelJMSProducer_1.0_e980896db0c26e753eca73525e1235e7.tmp/enqueueJMSBillProfile.wsdl [ Produce_Message_ptt::Produce_Message(ListOfCmuAccsyncBillingProfileIo) ] - Rolling back JCA LocalTransaction</MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T10:09:04.087+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>tip</COMPONENT_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>esb.server.service.impl.inadapter</MODULE_ID>
    <THREAD_ID>72</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.68.7.92:99044:1208331963242:25573</UNIQUE_ID><SEQ>23</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>JCA: file:/u01/app/oracle/product/10.1.3.1/mtsoa/bpel/domains/default/tmp/.bpel_UpdateCustomerSiebelJMSProducer_1.0_e980896db0c26e753eca73525e1235e7.tmp/enqueueJMSBillProfile.wsdl [ Produce_Message_ptt::Produce_Message(ListOfCmuAccsyncBillingProfileIo) ] - Unable to roll back JCA LocalTransaction due to: </MSG_TEXT>
    <SUPPL_DETAIL><![CDATA[ORABPEL-12102
    ERRJMS_TRX_ROLLBACK.
    CCI Local Transaction ROLLBACK failed due to: ERRJMS_ROLLBACK_FAIL.
    Unable to rollback transaction.
    Please examine the log file to determine the problem.
    Please examine the log file to determine the problem.
    at oracle.tip.adapter.jms.JmsCciLocalTransactionImpl.rollback(JmsCciLocalTransactionImpl.java:115)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:601)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:736)
    at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:429)
    at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:443)
    at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:251)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:727)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:366)
    at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
    at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3672)
    at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1650)
    at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:276)
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5658)
    at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1082)
    at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:535)
    at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:342)
    at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:648)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at CubeDeliveryBean_LocalProxy_4bin6i8.handleInvoke(Unknown Source)
    at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:138)
    at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
    at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
    at WorkerBean_EndPointProxy_4bin6i8.onMessage(Unknown Source)
    at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:266)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.jms.IllegalStateException: JMS-131: Session is closed
    at oracle.jms.AQjmsError.throwIllegalStateEx(AQjmsError.java:464)
    at oracle.jms.AQjmsSession.checkSessionStarted(AQjmsSession.java:4309)
    at oracle.jms.AQjmsSession.rollback(AQjmsSession.java:832)
    at oracle.tip.adapter.jms.JmsTransactionImpl.rollback(JmsTransactionImpl.java:114)
    at oracle.tip.adapter.jms.JmsCciLocalTransactionImpl.rollback(JmsCciLocalTransactionImpl.java:110)
    ... 59 more
    ]]></SUPPL_DETAIL>
    </PAYLOAD>
    </MESSAGE>
    and finally
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T10:22:26.332+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>tip</COMPONENT_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>esb.server.service.impl.inadapter</MODULE_ID>
    <THREAD_ID>96</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    <SUPPL_ATTRS>
    <ATTR NAME="J2EE_MODULE.name">startup</ATTR>
    <ATTR NAME="J2EE_APP.name">orabpel</ATTR>
    <ATTR NAME="WEBSERVICE_PORT.name">ProcessSalesOrderSiebelJMSProducerPort</ATTR>
    <ATTR NAME="WEBSERVICE.name">ProcessSalesOrderSiebelJMSProducer</ATTR>
    </SUPPL_ATTRS>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>1208506946:10.68.7.92:4646:0:11533</UNIQUE_ID><SEQ>1</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>JCA: JmsProducer_execute: A resource exception occured while producing message</MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T15:34:44.126+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>j2ee</COMPONENT_ID>
    <MSG_ID>J2EE DS-00266</MSG_ID>
    <MSG_TYPE TYPE="NOTIFICATION"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>datasource</MODULE_ID>
    <THREAD_ID>74</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.68.7.92:99044:1208332596547:25852</UNIQUE_ID><SEQ>64</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>Fatal error code : '17,008' detected handling SQLException : 'java.sql.SQLException: Closed Connection'.</MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T15:34:44.156+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>j2ee</COMPONENT_ID>
    <MSG_ID>J2EE DS-00264</MSG_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>datasource</MODULE_ID>
    <THREAD_ID>23</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.68.7.92:99044:1208272357214:163</UNIQUE_ID><SEQ>96</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>Attempt to use an invalid handle : 'oracle_jdbc_driver_LogicalConnection_Proxy@14c0017'.</MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T15:34:44.368+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>j2ee</COMPONENT_ID>
    <MSG_ID>J2EE JTA-00901</MSG_ID>
    <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>transaction</MODULE_ID>
    <THREAD_ID>74</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.68.7.92:99044:1208332596547:25852</UNIQUE_ID><SEQ>97</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>Coordinator caught XAException thrown from resource during Action: ACTION_COMMIT. Exception Msg: javax.transaction.xa.XAException: Commit failed. - Error Code: XA_RBROLLBACK - Branch: [oracle.oc4j.sql.xa.EmulatedXAResource@124cec1, Xid( Global Id d3.66.25.bf.ff.ff.ff.ff.de.9e.9d.52.19.01.00.00.a8.80.01.00.00.00.00.00, Format Id 1330790740, Branch Id e3.c1.de.e1.00.00.00.00.00.00.00.00.00.00.00.01), oracle.oc4j.sql.xa.EmulatedXAResource@124cec1, state={PREPARED}, exception error code=] - Thread: WorkExecutorWorkerThread-52 . This XAException may be expected during recovery) </MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T15:34:44.371+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>j2ee</COMPONENT_ID>
    <MSG_ID>J2EE JTA-99999</MSG_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>transaction</MODULE_ID>
    <THREAD_ID>74</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.68.7.92:99044:1208332596547:25852</UNIQUE_ID><SEQ>97</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>ProtocolError : Branch [oracle.oc4j.sql.xa.EmulatedXAResource@124cec1, Xid( Global Id d3.66.25.bf.ff.ff.ff.ff.de.9e.9d.52.19.01.00.00.a8.80.01.00.00.00.00.00, Format Id 1330790740, Branch Id e3.c1.de.e1.00.00.00.00.00.00.00.00.00.00.00.01), oracle.oc4j.sql.xa.EmulatedXAResource@124cec1, state={PREPARED}, exception error code=] in transaction Global Transaction Xid( Global Id d3.66.25.bf.ff.ff.ff.ff.de.9e.9d.52.19.01.00.00.a8.80.01.00.00.00.00.00, Format Id 1330790740), type=orabpel, state=COMMITTING, time in completion or recovering=4)
    [oracle.oc4j.sql.xa.EmulatedXAResource@181f80e, Xid( Global Id d3.66.25.bf.ff.ff.ff.ff.de.9e.9d.52.19.01.00.00.a8.80.01.00.00.00.00.00, Format Id 1330790740, Branch Id e3.c1.de.e1.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@181f80e, state={COMPLETED_COMMITTED}, exception error code=],
    [oracle.oc4j.sql.xa.EmulatedXAResource@124cec1, Xid( Global Id d3.66.25.bf.ff.ff.ff.ff.de.9e.9d.52.19.01.00.00.a8.80.01.00.00.00.00.00, Format Id 1330790740, Branch Id e3.c1.de.e1.00.00.00.00.00.00.00.00.00.00.00.01), oracle.oc4j.sql.xa.EmulatedXAResource@124cec1, state={PREPARED}, exception error code=]
    } returned RB* during commit.</MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-04-18T15:34:44.371+02:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>j2ee</COMPONENT_ID>
    <MSG_ID>J2EE JTA-00113</MSG_ID>
    <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>l0340.kpnnl.local</HOST_ID>
    <HOST_NWADDR>10.68.7.92</HOST_NWADDR>
    <MODULE_ID>transaction</MODULE_ID>
    <THREAD_ID>74</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.68.7.92:99044:1208332596547:25852</UNIQUE_ID><SEQ>97</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>Could not reconstruct transaction from store after protocol error: oracle.as.j2ee.transaction.tpc.Store$StoreException: Can not recover transaction as logging is not enabled in transaction-manager.xml xid : Xid( Global Id d3.66.25.bf.ff.ff.ff.ff.de.9e.9d.52.19.01.00.00.a8.80.01.00.00.00.00.00, Format Id 1330790740)
    xid : Xid( Global Id d3.66.25.bf.ff.ff.ff.ff.de.9e.9d.52.19.01.00.00.a8.80.01.00.00.00.00.00, Format Id 1330790740)</MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    However database is up and there was no outage.
    Do you have an idea what can be wrong?
    Thanks
    Peter

  • Cannot commit during managed transaction

    Using Kodo 2.5.2, JBoss 3.2.1, and the DefaultDS datasource (HSQL)
    provided by JBoss, I'm getting the following exception when calling
    PersistenceManager.makePersistent:
    java.sql.SQLException: You cannot commit during a managed transaction!
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLEx
    ceptions.java:58)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.handle(SQLExcept
    ions.java:43)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.newDataStoreI
    d(JDBCStoreManager.java:562)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.makePersistentFil
    ter(PersistenceManagerImpl.java:1450)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.makePersistent(Pe
    rsistenceManagerImpl.java:1380)
    Any idea why?
    -Chris

    Using Kodo's connection pooling fixed the problem.
    Thanks for the help.
    Chris West wrote:
    I suspect JBoss connection pooling could be the problem. A couple of
    questions...
    1. Do you know which versions of JBoss have this problem.
    2. How do I configure Kodo to use it's own connection pool on JBoss?
    -Chris West
    Stephen Kim wrote:
    I would highly suggest using Kodo's connection pool first and see if
    that alleviates the problem. I recall JBoss having some connection pool
    issues in certain versions.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • SQL Exceptions

    Hi all
    I hope everyone knows that in SQL there are various kinds of exceptions that are thrown , which are vendor-specific.
    Now, while doing my program i came across situations, in a single java statement where i am inserting certain data in the database which can be a duplicate record.....(I am using MS Access). In the database there is one column which cannot contain duplicates, and hence when i add a record using such an insert statement, it throws an SQLException as follows
    java.sql.SQLException: General error
    now this 'General error' is one type of error, which is again vendor-specific.
    What i want to know is, how do i detect in java code which type of SQL exception is thrown and correlate it with the database vendor, so that i can show an appropriate error/warning message to the user of my application.
    Please help......
    Thank You.
    Vaibhav

    I use Derby in my applications, and their messages are cryptic (at best). However, on the website, there is documentation for the error codes (http://db.apache.org/derby/docs/dev/ref/rrefexcept71493.html) that are provided in their "obtuse" (I dislike using that word, but it fits) messages.
    What I did was write a parser for the documentation page's HTML that loaded the SQL State error codes into a properties file that would allow me to better see which type of error it is.
    Now... that is because I want to log the information more clearly to make error tracking easier when debugging. If you want to provide "special handling", I think there's not much of a choice but to continually utilize "instanceof" in some kind of helper/utility class.
    For example, in that case, I would write:
    public class SqlExceptionUtilities
       * Default constructor.
       * <br />Declared private to prevent utility class instantiation.
      private SqlExceptionUtilities() { }
       * Provide error handling for specific exception types.
       * @param e the exception to handle
       * @param logger the logger to utilize along-side the base error handling
      public static handle(SQLException e, Logger logger)
         if (e instanceof ProprietarySqlExceptionType1)
         else if (e instanceof ProprietarySqlExceptionType2)
         else if (e instanceof ProprietarySqlExceptionType3)
         else
              logger.err("Generalized SQL Exception encountered: " + e.getMessage(), e);
    }The other route I would consider taking is, again, a properties file that provides error handling capabilities based on the SQL exception's class name.
    Hope this helps.

  • Closed Connection Issues

    We're having some issues with closed connection errors. Basically, if a user is idle long enough, if he clicks a button, then the results won't show and a closed connection error will be thrown. Frequently the user will have to re-enter information or it leads to some bad results. These tend to happen with views in particular.
    So, any ideas? I'm new to JDeveloper and Oracle, so I'm not quite sure where to start or information I should provide. Our pages are running off of one virtual machine with the Oracle database on another virtual machine, both on the same physical machine.
    A couple questions:
    1) Does this have anything to do with Session timeout? We have ours set to 60 minutes. When I set it to 1 minute, it'll redirect to the login page at 1 minute. Odd... I just tested by idling on a page for 90 minutes, no redirect, no error thrown...
    2) We have validate-connection set to true, but do not have validate-connection-query set. Is there a default value or will this stop the verification?
    Thank you very much.
    Here's our datasource information:
    <data-sources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd" xmlns="http://xmlns.oracle.com/oracleas/schema">
    <connection-pool name="jdev-connection-pool-DBSVR" disable-server-connection-pooling="false" validate-connection="true" abandoned-connection-timeout="60">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="user" password="" url="jdbc:oracle:thin:@192.168.130.23:1521:web"/>
    </connection-pool>
    <managed-data-source name="jdev-connection-managed-DBSVR" jndi-name="jdbc/DBSVRDS" connection-pool-name="jdev-connection-pool-DBSVR"/>
    <native-data-source name="jdev-connection-native-STRATDBSVR" jndi-name="jdbc/STRATDBSVRCoreDS" url="jdbc:oracle:thin:@192.168.130.23:1521:web" user="user" password="" data-source-class="oracle.jdbc.pool.OracleDataSource"/>
    </data-sources>
    Session timeout:
    <session-config>
    <session-timeout>60</session-timeout>
    </session-config>
    Here's an example of the error:
    INFO: Fatal error code : '17,008' detected handling SQLException : 'java.sql.SQLException: Closed Connection'.
    12/01/09 14:40:27 java.lang.NullPointerException
    12/01/09 14:40:27      at oracle.oc4j.sql.proxy.StatementBCELProxy.oc4j_releaseToCache(StatementBCELProxy.java:67)
    12/01/09 14:40:27      at oracle.oc4j.sql.proxy.StatementBCELProxy.oc4j_releaseTarget(StatementBCELProxy.java:79)
    12/01/09 14:40:27      at oracle.oc4j.sql.proxy.SQLBCELProxy.oc4j_close(SQLBCELProxy.java:95)
    12/01/09 14:40:27      at oracle.oc4j.sql.proxy.StatementBCELProxy.close(StatementBCELProxy.java:92)
    12/01/09 14:40:27      at oracle.jbo.server.DBTransactionImpl.closeStatement(DBTransactionImpl.java:4202)
    12/01/09 14:40:27      at oracle.jbo.server.ViewObjectImpl.closeFreedStatements(ViewObjectImpl.java:8466)
    12/01/09 14:40:27      at oracle.jbo.server.ViewObjectImpl.closeStatements(ViewObjectImpl.java:8451)
    12/01/09 14:40:27      at oracle.jbo.server.DBTransactionImpl.closeStatements(DBTransactionImpl.java:4370)
    12/01/09 14:40:27      at oracle.jbo.server.DBTransactionImpl.closeTransaction(DBTransactionImpl.java:1542)
    12/01/09 14:40:27      at oracle.jbo.server.DBTransactionImpl.disconnect(DBTransactionImpl.java:4730)
    12/01/09 14:40:27      at oracle.jbo.server.DBTransactionImpl2.disconnect(DBTransactionImpl2.java:310)
    12/01/09 14:40:27      at oracle.jbo.server.DBTransactionImpl2.reconnect(DBTransactionImpl2.java:329)
    12/01/09 14:40:27      at oracle.jbo.common.ampool.DefaultConnectionStrategy.reconnect(DefaultConnectionStrategy.java:239)
    12/01/09 14:40:27      at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolReconnect(ApplicationPoolMessageHandler.java:487)
    12/01/09 14:40:27      at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:323)
    12/01/09 14:40:27      at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:7777)
    12/01/09 14:40:27      at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4074)
    12/01/09 14:40:27      at oracle.jbo.common.ampool.ApplicationPoolImpl.manageReferencingState(ApplicationPoolImpl.java:1239)
    12/01/09 14:40:27      at oracle.jbo.common.ampool.ApplicationPoolImpl.finalizeResource(ApplicationPoolImpl.java:1156)
    12/01/09 14:40:27      at oracle.jbo.pool.ResourcePool.removeResourceInternal(ResourcePool.java:749)
    12/01/09 14:40:27      at oracle.jbo.pool.ResourcePool.setState(ResourcePool.java:1004)
    12/01/09 14:40:27      at oracle.jbo.pool.ResourcePool.gc(ResourcePool.java:1423)
    12/01/09 14:40:27      at oracle.jbo.pool.ResourcePool.wakeup(ResourcePool.java:774)
    12/01/09 14:40:27      at oracle.jbo.pool.ResourcePool.wakeup(ResourcePool.java:779)
    12/01/09 14:40:27      at oracle.jbo.pool.ResourcePoolMonitor.run(ResourcePoolMonitor.java:98)
    12/01/09 14:40:27      at java.util.TimerThread.mainLoop(Timer.java:512)
    12/01/09 14:40:27      at java.util.TimerThread.run(Timer.java:462)
    Exception breakpoint occurred at line 311 of ReleasableResourcePooledExecutor.java.
    java.lang.UnsupportedOperationException:
    Edited by: 908629 on Jan 17, 2012 2:18 PM

    Thank you. However, a new error has arisen.
    I set session-timeout to 120 (should be minutes) and abandon-timeout to 0 (which should disable it) and I get an error exactly on the hour, regardless of what the abandon-timeout or session-timeout were.
    Is there are particular I should be checking on the Oracle database side?
    oracle.jbo.NotConnectedException: JBO-25200: Application module is not connected to a database
         at oracle.jbo.server.DefaultTxnHandlerImpl.handleRollback(DefaultTxnHandlerImpl.java:149)
         at oracle.jbo.server.DBTransactionImpl.doRollback(DBTransactionImpl.java:4443)
         at oracle.jbo.server.DBTransactionImpl.rollback(DBTransactionImpl.java:2327)
         at oracle.stratis.SystemAdmin.threads.ImportExportThread.loadMHIF(ImportExportThread.java:262)
         at oracle.stratis.SystemAdmin.threads.ImportExportThread.run(ImportExportThread.java:67)
         at java.lang.Thread.run(Thread.java:662)

  • Java.sql.SQLException: statement handle not executed

    hello,
    i am calling a stored procedure and its returns a REF CURSOR and i am getting intermittent exceptions below,
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
    and
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxxx_pkg(?,?,?)}]; SQL state [99999]; error code [17009]; Closed Statement; nested exception is java.sql.SQLException: Closed Statement
    any clue what could be the issue,
    Regards
    GG

    its pretty simple have a java class calling hibernateTemplate's findByNamedQueryAndNamedParam method by passing the procedure name and binding parameters/values, and here is the stack
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
    at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:1006)
    Caused by: java.sql.SQLException: statement handle not executed
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
    at oracle.jdbc.driver.T4CStatement.doDescribe(T4CStatement.java:701)
    at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3355)
    at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:2009)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:494)
    at org.hibernate.type.StringType.get(StringType.java:18)
    at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
    at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
    at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
    at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2091)
    at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
    at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
    at org.hibernate.loader.Loader.getRow(Loader.java:1206)
    at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
    at org.hibernate.loader.Loader.doQuery(Loader.java:701)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
    at org.hibernate.loader.Loader.doList(Loader.java:2217)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108)
    at org.hibernate.loader.Loader.list(Loader.java:2103)
    at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
    at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1696)
    at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
    at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
    at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1015)
    at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)

  • Exception SQLException not handled

    Is this code above i get the SQLException in the catch statement and throws a new bussiness exception.
    The problem is that the SQLException looks like not handled, as it goes out the same SQLException, not the bussiness exception.
    Above goes the code and stacktrace :
    Connection con=null;
    Statement stmt=null;
    ResultSet rset=null;
    DirPart dirPart=null;
    String wClause =null;
    try
    wClause ="SELECT l.nom_localidade,to_char(co.dat_constituicao,'DD-MM-YY') dat_constituicao ,to_char(co.dat_ini_vigencia,'DD-MM-YY') dat_ini_vigencia ,to_char(co.dat_fim_vigencia,'DD-MM-YY') dat_fim_vigencia,co.num_protocolo,to_char(co.dat_protocolo,'DD-MM-YY') dat_protocolo,to_char(co.dat_prox_convencao,'DD-MM-YY') dat_prox_convencao ,o.cod_localidade_tse,co.cod_composicao,p.num_partido,p.nom_partido,p.sgl_partido,t.des_tipo_orgao,o.des_endereco,o.nom_bairro,o.num_cep,o.telefones,o.fax,o.email FROM ORGAO_PARTIDARIO O,MVW_PARTIDO p,COMPOSICAO_ORGAO CO, TIPO_ORGAO T,MVW_LOCALIDADE_UF l WHERE o.cod_localidade_tse=l.cod_localidade_tse and co.cod_composicao="+cod_composicao+" and p.num_partido=o.num_partido and co.cod_orgao=o.cod_orgao and co.tipo_orgao=t.tipo_orgao and co.ativa='S' order by p.sgl_partido";
    line 133 con=ConnManager.getConn("extcad");
    stmt = con.createStatement();
    rset = stmt.executeQuery(wClause.toString());
    if (rset.next())
    dirPart= new DirPart(rset.getString("des_tipo_orgao"),rset.getString("cod_composicao"),rset.getString("num_partido"),rset.getString("nom_partido"),rset.getString("sgl_partido"),rset.getString("cod_localidade_tse"),rset.getString("nom_localidade"),rset.getString("des_endereco"),rset.getString("nom_bairro"),rset.getString("num_cep"),rset.getString("telefones"),rset.getString("fax"),rset.getString("email"),rset.getString("dat_constituicao"),rset.getString("dat_ini_vigencia"),rset.getString("dat_fim_vigencia"),rset.getString("num_protocolo"),rset.getString("dat_protocolo"),rset.getString("dat_prox_convencao"));
    catch (SQLException e)
    e.printStackTrace();
    System.out.println("sql:"+wClause);
    throw new NaoCompletouOperacaoException("Erro de banco de dados");
    finally
    try
    con.close();
    rset.close();
    stmt.close();
    } catch (SQLException e) {System.err.println("erro ao fechar conn "+e.getMessage() );}
    return dirPart;
    STACK TRACE:
    java.sql.SQLException: ORA-00942: table or view does not exist
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1674)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:538)
    at com.bitmechanic.sql.PooledStatement.executeQuery(PooledStatement.java:43)
    at justicaEleitoral.CPartDAO.getDirPartDoBD(CPartDAO.java:133)
    at justicaEleitoral.CPartDAO.getDirPart(CPartDAO.java:115)
    at partServlet.consultaPartido(partServlet.java:124)
    at partServlet.doGet(partServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)

    That�s that method indeed. Here goes the entire method code :
    public static DirPart getDirPartDoBD(String cod_composicao) throws NaoCompletouOperacaoException
    Connection con=null;
    Statement stmt=null;
    ResultSet rset=null;
    DirPart dirPart=null;
    String wClause =null;
    try
    wClause ="SELECT l.nom_localidade,to_char(co.dat_constituicao,'DD-MM-YY') dat_constituicao ,to_char(co.dat_ini_vigencia,'DD-MM-YY') dat_ini_vigencia ,to_char(co.dat_fim_vigencia,'DD-MM-YY') dat_fim_vigencia,co.num_protocolo,to_char(co.dat_protocolo,'DD-MM-YY') dat_protocolo,to_char(co.dat_prox_convencao,'DD-MM-YY') dat_prox_convencao ,o.cod_localidade_tse,co.cod_composicao,p.num_partido,p.nom_partido,p.sgl_partido,t.des_tipo_orgao,o.des_endereco,o.nom_bairro,o.num_cep,o.telefones,o.fax,o.email FROM ORGAO_PARTIDARIO O,MVW_PARTIDO p,COMPOSICAO_ORGAO CO, TIPO_ORGAO T,MVW_LOCALIDADE_UF l WHERE o.cod_localidade_tse=l.cod_localidade_tse and co.cod_composicao="+cod_composicao+" and p.num_partido=o.num_partido and co.cod_orgao=o.cod_orgao and co.tipo_orgao=t.tipo_orgao and co.ativa='S' order by p.sgl_partido";
    con=ConnManager.getConn("extcad");
    // con=ConnCad.getConnExt();
    stmt = con.createStatement();
    rset = stmt.executeQuery(wClause.toString());
    if (rset.next())
    dirPart= new DirPart(rset.getString("des_tipo_orgao"),rset.getString("cod_composicao"),rset.getString("num_partido"),rset.getString("nom_partido"),rset.getString("sgl_partido"),rset.getString("cod_localidade_tse"),rset.getString("nom_localidade"),rset.getString("des_endereco"),rset.getString("nom_bairro"),rset.getString("num_cep"),rset.getString("telefones"),rset.getString("fax"),rset.getString("email"),rset.getString("dat_constituicao"),rset.getString("dat_ini_vigencia"),rset.getString("dat_fim_vigencia"),rset.getString("num_protocolo"),rset.getString("dat_protocolo"),rset.getString("dat_prox_convencao"));
    catch (SQLException e)
    e.printStackTrace();
    System.out.println("sql:"+wClause);
    throw new NaoCompletouOperacaoException("Erro de banco de dados");
    finally
    try
    con.close();
    rset.close();
    stmt.close();
    } catch (SQLException e) {System.err.println("erro ao fechar conn "+e.getMessage() );}
    return dirPart;

  • SQLException Handling

    I am writing a program which wants to capture the unique constraint violation error when an insertion is performed.
    I think I can do so by checking the value of the exception.getErrorCode() when an SQLException. However, how do I know which value to check for? And, where can I get a list of the error codes for Oracle database?
    Really appreciate your help.
    Thanks in advance,
    SiowLing Kong

    The errorcode is the exact number of the oracle error code (positive numbers)
    eg. 54 = ROWLOCK
    You can found the documentation of the errorcodes on the oracle web side, or in the oracle documentation, which is shipped with the installation.
    I personaly use the online documentation of the oracle help or
    the product SQL*Codes from the webside www.oraxcel.com. This is a winhelp file with all oracle codes inside.
    so long
    ThK

  • Invalid Handle SQL Exception

    Everytime I call this method from my JSP page, I get the error Invalid Handle. I changed my query statement at the most bottom part to a hard-coded update statement (this one update wirtech.orders_temp set BOOKCODE ='12345678', QUANTITY = '150', SUPPLIER = 'rain', STAT = 'pending', FULFILLED = '0', CONSOLIDATED = '1', CONSOLIDATEID ='1' where POID = '10003) but i still get that error. I traced my program and found out the error comes out at After System.out.println("hereba2"+query);. That's the line before stmt.executeupdate(query); at the bottom part of the consolidatePOS method.
    Please help, we've been stuck here for one week already.
         public void consolidatePOS(Vector v, String code)
              try{
                   String poidfinal = "";
                   int y = 0;
                   int qty = 0;
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection(url, username, password);
                stmt = con.createStatement();
                System.out.println("before big while."+v.size());
                   while(y<v.size())
                query = "select QUANTITY from wirtech.orders_temp where POID = '"+v.elementAt(y)+"'";
                System.out.println("first stmt.execute");
                rs=stmt.executeQuery(query);
                System.out.println("inside medium while.");
                while (rs.next())
                     System.out.println("inside small while.");
                     qty = qty + rs.getInt("QUANTITY");
                if(y == v.size()-1)
                     poidfinal = ""+v.elementAt(y);
                y++;
                rs.close();
                System.out.println("after big while.");
                int ea = getConsolidateID();
                System.out.println("ea"+ea);
                System.out.println("here ba/!?");
                query = "update wirtech.orders_temp set BOOKCODE ='12345678', QUANTITY = '150', SUPPLIER = 'rain', STAT = 'pending', FULFILLED = '0', CONSOLIDATED = '1', CONSOLIDATEID ='1' where POID = '10003'";
                System.out.println("here ba2"+query);
                stmt.executeUpdate(query);
                System.out.println("after big while. LASTT");
                stmt.close(); con.close();
                } catch(Exception ex) {
                     System.out.println("error in consolidatePOS()" + ex);     
              public int getConsolidateID()
              {int x =0;
                   try {
                Class.forName(driver);
                con = DriverManager.getConnection(url, username, password);
                stmt = con.createStatement();
                query = "SELECT COUNT(DISTINCT CONSOLIDATEID) AS count FROM wirtech.orders_temp";
                rs = stmt.executeQuery(query);
                while (rs.next()) {
                    x = rs.getInt("count");
                rs.close();
                stmt.close();
                con.close();
            } catch (Exception e) {
                System.out.println("getTransactionCount has an Exception: " + e);
            }

    This is a complete guess! ... perhaps the
    rs.close();also closes the Statement (or invalidates it) which you use later to execute the update. The API does not seem to indicate this though:
    void close()
               throws SQLException
        Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
        Note: A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet object is also automatically closed when it is garbage collected. But perhaps it may still be worthwhile seeing if removing that close will fix the problem.

  • Invalid Handle Exception-What is the reason?

    I face with "Invalid Handle exception" (SQLException) while using the following code.
    Could anybody tell me the possible reasons/Situation the error rise?
    stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(SQLStmt);
         if(rs!=null){
    ResultSetMetaData rsm = rs.getMetaData();
         int totalcols = rsm.getColumnCount();
         Vector temp;
         while (rs.next()) {
         Vector temp = new Vector();
         for (int i = 1; i <= totalcols; i++) {
              String value = rs.getString(i);
              if (value == null) {
              value = "";
         temp.addElement(value);
         }//for loop ends here
         valueVector.addElement(temp);
         rs.close();
         stmt.close();     
    Thank you all

    Vector temp;
    while (rs.next()) {
    Vector temp = new Vector();Are you sure that this is the code you are running? The reason I ask is that I'm pretty sure that it won't compile, at least under JDK1.4. You should get a compile error something like "temp is already defined".
    If thats not the problem you need to find out on which line the error actually occurs. You can get this from the exception by calling the printStackTrace() method.
    Col

  • SQL Exception - Invalid Handle

    I am writing a program for a order company using java beans. I have everything working except when i try to add a new item into the database it throws a exception saying: invlaid handle. The code for that bean file is given below..any help will be really appreciated. The error is under setNewItem function on code: results = statement.executeQuery(select).
    package stockBeans;
    import java.sql.*;
    public class StockAccess
         private Connection connection;
         private Statement statement;
         private ResultSet results;
         public StockAccess() throws ClassNotFoundException
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              catch (ClassNotFoundException cnfEx)
                   throw new ClassNotFoundException(
                                  "Unable to locate JDBC driver!");
         public String getStockLevel(String code) throws SQLException
              int stockLevel;
              String returnValue="";
              boolean match=false;
              connectAndCreateStatement();
              results = statement.executeQuery("SELECT * FROM StockItems");          
              while((results.next())&&(match==false))
                   if(code.equalsIgnoreCase(results.getString(1)))
                        match=true;
                        stockLevel = results.getInt(3);
                        returnValue = Integer.toString(stockLevel);
              if(!match)
                   returnValue="error";
              disconnectFromDb();
              return returnValue;
         public void setNewItem(String code, String desc, int currentLvl,int reorderLvl,Float price)
                                       throws SQLException
              boolean found;
              connectAndCreateStatement();
              found = findMatch(code);
              if(found==false)
                   try
                        String select = "SELECT * FROM StockItems";
                        **results = statement.executeQuery(select);**
                        String insert = "INSERT INTO StockItems VALUES (" + "'" + code
                                            + "'" + "," + "'" + desc + "'" + "," +
                                            + currentLvl + "," reorderLvl "," price ")";
                        int result = statement.executeUpdate(insert);
                        System.out.print("Congratulation. Match Data Saved");
                   catch(SQLException sqlEx)
                        System.out.println("* Error Inserting Data! *" + sqlEx);
              else
                   System.out.println("\n Code Already Entered. Try Again \n");
         public void getStock()
                        throws SQLException
              connectAndCreateStatement();
              System.out.println();
              System.out.println("Code"+"\t\t"+" Description"
                        +"\t"+"Current Level"+"\t"+"Reorder Level"+"\t"+"Cost");
              results = statement.executeQuery("SELECT * FROM StockItems");
              while (results.next())
                   System.out.println(results.getString(1)
                                            +"\t\t"+results.getString(2)
                                            +"\t\t"+results.getInt(3)
                                            +"\t\t"+ results.getInt(4)
                                            +"\t\t"+results.getFloat(5));
         public boolean findMatch(String code)
                                       throws SQLException
              boolean found=false;
              connectAndCreateStatement();
              try
                   results = statement.executeQuery("SELECT * FROM StockItems");          
                   while(results.next()&& (found==false))
                        if(code.equalsIgnoreCase(results.getString(1)))
                             found=true;
                        else
                             found=false;
              catch(SQLException sqlEx)
                   System.out.println("Unable to retrieve data");
              disconnectFromDb();
              return found;     
         private void connectAndCreateStatement() throws SQLException
              try
                   connection = DriverManager.getConnection(
                                                 "jdbc:odbc:StockData","","");
                   //*** Change DSN name if yours is different! ***
              catch (SQLException sqlEx)
                   throw new SQLException("Unable to connect to database!");
              try
                   statement = connection.createStatement();
              catch (SQLException sqlEx)
                   throw new SQLException("Unable to create SQL statement!");
         private void disconnectFromDb() throws SQLException
              try
                   connection.close();
              catch (SQLException sqlEx)
                   throw new SQLException(
                             "Unable to disconnect from database!");
    }

    I have found the problem..i am closing the DB in findMatch function.
    Thank You.

  • Error Handling in a web service

    Hi,
    We are going through the process of producing some test web services, and was wondering if there is a way of handling errors so that a more meaningful message can be output instead of a SOAP Exception.
    For example if a number was passed in that was invalid, such as a negative number when only positive would be allowed. Is it possible to output a message that would say something like
    'Number input must be positive'
    instead of this type of error
    [SOAPException: faultCode=SOAP-ENV:Server; msg=ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at &quot;CDDEV.SQUARE_ROOT&quot;, line 6
    ORA-06512: at line 1
         java.lang.String mypackage3.Square_rootStub.get_square_root(java.math.BigDecimal)
              Square_rootStub.java:68
         void mypackage3.Class1.main(java.lang.String[])
              Class1.java:15
    This example was done using a PL/SQL web service, but equally using Java if you throw an exception for a negative number you get a NaN type error.
    Thanks
    Gary

    As the error is thrown by the PL/SQL Java wrapper, you possibly could capture it on the server side and throw a more meaningful message. What is happening is that java.sql.SQLException thrown on the server side by the Java PL/SQL wrappers is wrapped into a SOAP fault.
    If you were to catch it yourself before propagating it back, you could replace the string. Unfortunately, the java.sql.SQLException is strewn about the generated code so it is hard to isolate - it isn't exactly straight forward. Another avenue to consider might be to wrapper the stored procedure code Java wrapper itself and write your own exception handling where you set the string explicitly (remember the string value set in any exception is what is passed back in the SOAP fault).
    None of these are perfect, but perhaps they might give you some ideas ...
    Mike.

Maybe you are looking for