Thanks, Keith (he replied to me off list but I thought some list members may like to see the response, and he okayed that).
It wasn't so much my interest in that one bug but, as you note, the availability of a public resource. I did have access to the beta, but since we were passed that I just assumed you were referring to something else. I'm a partner as well (well, was, until just recently. I don't care for the new partner program and won't renew.) So the bottom line is that there is no bug report available publicly. I was just wanting to confirm that. /charlie -----Original Message----- From: Paap, Keith [mailto:[EMAIL PROTECTED]] Sent: Monday, October 15, 2001 8:34 AM To: '[EMAIL PROTECTED]' Subject: RE: JRun-Talk-List V1 #55 I got the detail from the beta site. I actually work for an alliance partner so I had access to the information so it's not available unless you have access to the beta site. Here's the bug I referenced. (sorry for the bad formatting but the web site isn't much better) Search Detail Bug Detail for Bug 27034 Submitted On 07/03/01 Description: NOTE: Original issue is below. Developer said the original issue was not actually the problem and had spoke to customer about it. The perforce entry below actually describes more of what the problem that was fixed: A customer was relying on database defaults, such that they would call create() on an entity bean's remote interface and the database would supply defaults for any values not specified in the INSERT statement. As a result the first business method would not reflect the default values, because Ejipt was assuming that the entity hadn't changed between create() and the first business method. =============== ORIGINAL ISSUE REPORT ====================================== When dbCon.setAutoCommit(false)is used in BMP entity bean, JRun EJB server doesn't set this to false. One customer wants to use 'for update' clause in SQL command in BMP entity bean in order to update CLOB datatype in Oracle. When this clause is used, db connection need to set AutoCommit to false. Otherwise it throws Oracle error message like 'java.sql.SQLException: ORA-01002: fetch out of sequence'. So the customer added this method, but JRun doesn't set it to false, which results in always true. So eventually JRun always throws this ORA-01002 SQLException. See next instruction about detail steps and BMP example. 7/6/2001: added by llin: This is because the ejipt doesn't implement autocommit in allaire/ejipt/_ejb/_Connection.java. However, Jrun does implement the autocommit in allaire\jrun\sql\ConnectionProxy.java. I did a quick modification to _ejb/_connection.java (copied the implementation from ConnectionProxy.java, and ignored the exception msg). The code is messy, and it take long time to execute, but it works. I am putting the code under \\uscamfilp003\rdpublic\Bugs\27034 in case some one want to look at it. To test it, put _connection.class under anydirectory\allaire\ejipt\_ejb, and add it to the system classpath(It must be before ejipt.jar) Go to Bug submit form Reported Configuration Product: JRun 3.1 Stub ID: Any Severity: Benign bug, has a workaround Reproducability: It happens each and every time OS: Windows 2000 Server Version: Browser: Microsoft IE Browser Version: null Web Server: Microsoft IIS Web Server Version: null DB Server: > > > > > > > > Oracle > > > > > > > > DB Version :null" Error Screen: /// server-err.log ////////// Commit Status after setAutoCommit(false) : true java.sql.SQLException: ORA-01002: fetch out of sequence at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311) at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:797) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1608) at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1758) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java :1805) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState ment.java:322) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatem ent.java:280) at sample.entity.bmp.CustomerBMPEJB.ejbLoad(CustomerBMPEJB.java:186) at allaire.ejipt._EntityContext._load(allaire/ejipt/_EntityContext.java:438) at allaire.ejipt._EntityObject._invoke(allaire/ejipt/_EntityObject.java:241) at allaire.ejipt._EntityObject._invoke(allaire/ejipt/_EntityObject.java:140) at allaire.ejipt._CallableObject.call(allaire/ejipt/_CallableObject.java:101) at allaire.ejipt._CallableStub._call(allaire/ejipt/_CallableStub.java:199) at sample.entity.bmp.CustomerBMPObject_Stub.getCustomerid(C:/JRun/3.1/servers/d efault/deploy/src/sample/entity/bmp/CustomerBMPObject_Stub.java:213) at jrun__ejb_client__find_customer_bmp2ejsp21._jspService(jrun__ejb_client__fin d_customer_bmp2ejsp21.java:56) at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39) at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228) at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196) at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416) at allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic e.java:1082) at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270) at allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis patcher.java:89) at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552) at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542) at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364) at allaire.jrun.jrpp.ProxyEndpoint.run(../jrpp/ProxyEndpoint.java:388) at allaire.jrun.ThreadPool.run(../ThreadPool.java:272) at allaire.jrun.WorkerThread.run(../WorkerThread.java:75) Exception: [15:19:46] java.lang.UnsupportedOperationException: Operation disallowed on pooled connections Attached Template: Here is all steps and some explanation code snippets. Environment : JRun 3.1. Oracle 8i, JDBC driver-classes12.zip Download : related zip file from \\uscamfilp003\rdpublic\Bugs *) JAR file includes all EJB java source codes. 1. Create JBDC datasource, name it 'CustomerDB' in JMC. CustomerDB table exists in ts_nimitz Oracle database. The table looks like this. SQL> desc customerdb Name Null? Type ----------------------------------------- -------- ------------ CUSTOMERID NOT NULL VARCHAR2(50) FIRSTNAME VARCHAR2(50) LASTNAME VARCHAR2(50) CUSTOMERINFO CLOB *) Make sure it has CLOB datatype. 2. Deploy sample_customer_bmp.jar in your target server. *) Make sure to put this line in your deploy.properties when to deploy ejb.allowedIdentities=all 3. Put find_customer_bmp.jsp in your application 4. Run find_customer_bmp.jsp in your application 5. Open the server-err.log file. Oracle error message will be found there. More detail information about this BMP ejb. package : sample.entity.bmp jar : sample_customer_bmp.jar JNDI name : CustomerEJB Focus : ejbLoad() method. Inside of ejbLoad() method, it will look like ... public void ejbLoad() { // To do here customerid = (String) context.getPrimaryKey(); Connection con = null; PreparedStatement pstmt = null; String sql = "SELECT * FROM CUSTOMERDB WHERE customerid=? for update"; try { con = ds.getConnection(); // Customized Transaction con.setAutoCommit(false); System.err.println("Commit Status after setAutoCommit(false) : "+con.getAutoCommit()); pstmt = con.prepareStatement(sql); pstmt.setString(1, customerid); ResultSet rs = pstmt.executeQuery(); if (rs.next()) { firstname = rs.getString("FIRSTNAME"); lastname = rs.getString("LASTNAME"); // CustomerInfo is Clob datatype Clob cb = rs.getClob("CUSTOMERINFO"); InputStream input = cb.getAsciiStream(); byte[] content = new byte[(int)cb.length()]; input.read(content); this.customerinfo = new String(content); } else { throw new NoSuchEntityException("Row not found:" + customerid); } System.err.println("AutoCommit Satus in ejbLoad() : " + con.getAutoCommit()); con.commit(); con.setAutoCommit(true); } catch(SQLException se) { se.printStackTrace(); try { if(con != null) con.rollback(); }catch(SQLException ser) { throw new EJBException("exception during rollback"+ser.getMessage()); } throw new EJBException("exception during ejbLoad"+se.getMessage()); } catch(IOException ie) { throw new EJBException("exception in input stream"); } finally{ try{ if(con != null) con.close(); } catch(SQLException se) { throw new EJBException("exception while closing connection"); } } System.out.println("["+(new java.util.Date())+"] CustomerBMP is loaded"); } // end of ejbLoad() ... When the customer use CLOB datatype with 'for update' clause, it requires con.setAutoCommit(false) first, and then do the operation and then commit. But in this case, JRun doesn't set it to false, so eventually it throws ORA-01002 SQLException. If they don't use 'for update' clause and db transaction(setAutoCommit()/commit()/rollback()), it works fine. But the customer's business rule requires to use 'for update' clause for updating CLOB data. URL: http:// QA Information: Verified?: Yes Date: 09/06/01" Classified as: Bug Bug Fixed?: 1 Date: 08/29/01 In (Release): http://beta.allaire.com -----Original Message----- From: Charles Arehart [mailto:[EMAIL PROTECTED]] Sent: Saturday, October 13, 2001 4:48 AM To: JRun-Talk Subject: bug reports (was "RE: AutoCommit bug with Connection pool") That's an interesting problem, and I hope someone offers a response to it. Can I ask, on a different topic, where you were able get access to the bug report? That would be interesting reading, I'm sure. Is it available publicly somewhere? /charlie -----Original Message----- From: Paap, Keith [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 4:59 PM To: JRun-Talk Subject: AutoCommit bug with Connection pool I posted this in the support forum and am also sending this out to the mailing list in case anyone has any suggestions. There is a problem getting the autocommit status set to false in JRun 3.1 (Bug 27034) After attempting to call a rollback() or commit() on the connection the following exception is thrown: java.lang.UnsupportedOperationException: Operation disallowed on pooled connections;at allaire.ejipt._ejb._Connection.commit(allaire/ejipt/_ejb/_Connection.java:26 5) Digging a little further into the problem report it appears as though the problem lies in the ability to setAutoCommit to false. It remains true at all times. The bug report status shows as closed and the severity is listed as a benign bug with a workaround. However no workaround is provided. Please let me know if anyone is aware of how I could implement a workaround. The response on the bug report states the following: "This is because the ejipt doesn't implement autocommit in allaire/ejipt/_ejb/_Connection.java. However, Jrun does implement the autocommit in allaire\jrun\sql\ConnectionProxy.java. I did a quick modification to _ejb/_connection.java (copied the implementation from ConnectionProxy.java, and ignored the exception msg). The code is messy, and it take long time to execute, but it works. I am putting the code under \\uscamfilp003\rdpublic\Bugs\27034 in case some one want to look at it." There is no mention of this fix being incorporated in any hotfix or future releases of JRun. This creates a problem since there are a number of business needs to be able to control the autocommit status of a connection. Based on the earlier posts in this thread, this was not a problem in JRun 3.0. Our next step will be to attempt to set up a 3.0 server and retest this code to see if we can continue with development. Other options might be to go so a separate pooling process by a 3rd party (JTurbo, others?). If anyone has any other suggestions please share. TIA Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
