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

Mr.Slava Imeshev:Emergency:Need Patch For Weblogic6sp1

1 view
Skip to first unread message

sun

unread,
May 27, 2001, 9:40:25 PM5/27/01
to

Hi,Dear Mr.Slava Imeshev:
I meet the problem that only your patch can solved,please email me asap,I'm waittting
for it.Thank you anyway.

---sun

--------------------------------------------------
Subject: Re: WL6.0 sp1 PreparedStatement batch update problem
Date: 24 May 2001 02:04:44 -0800
From: "sun" <k...@netkiss.com.cn>
Newsgroup: weblogic.developer.interest.jdbc

Hi,I meet the same problem.I want this patch,can you attach this fix via email
to me? my email: k...@netkiss.com.cn Thanks anyway. ------sun "Slava Imeshev" <vime...@bea.com>
wrote:
>There is a bug in the new functionality in SP1. This bug is already
>fixed. The fix should appear in the next RP. I can send a standalone
>fix to those who will ask for it.
>
>Regards,
>
>Slava Imeshev
>
>"Gray" <ning...@verizon.com> wrote in message
>news:3b06...@newsgroups.bea.com...
>> Actually we found the same error with Oracle . on WLS6.0 without SP1
>> everthing works fine. When we add SP1 then we keep on having this annoying

>> problem. Also we are using DB2 JDBC driver to call stored procedure
>by
>using
>> callablestatement which is subinterface of preparestatement . The good
>thing
>> it is it working 99.99% of time.The bad thing is once it has problem
>, WLS
>> crashes and we get a core file . When trace the stack , it also points
>to
>> Preparestatement.
>>
>> "Paul Citarella" <pcita...@synapsemail.com> wrote in message
>> news:3aa82047$1...@newsgroups.bea.com...
>> > I'm experiencing what looks like a bug in the sp1 pool driver when
>trying
>> to
>> > implement JDBC2.0 batch updates with a PreparedStatement. The code
>ran
>> with
>> > no problems (and still does) on 6.0 without the service pack. It
>also
>> runs
>> > with no problems using the Oracle thin driver directly without a
>pool.
>It
>> > seems that there is an issue with closing the PreparedStatements
>properly
>> > and releasing the connections back to the pool after using batch
>updates.
>> > The code will execute (with no apparent errors) only once for each
>> > connection in my pool (4 times), and will then throw the following
>error:
>> >
>> > java.sql.SQLException: Missing IN or OUT parameter at index:: 1
>> >
>> > The interesting part is that the JDBC log actually does show errors
>for
>> the
>> > first 4 executions of the code, even though the code executes correctly
>> and
>> > the data actually gets inserted into the db. I ran this on both
>WL6.0
>and
>> > WL6.0 sp1 and compared the JDBC logs.
>> >
>> > JDBC log from WL6.0:
>> > ### This is the end of the transaction, the rest is not important
>> > DRVR OPER OracleConnection.commit()
>> > DRVR OPER OraclePreparedStatement.sendBatch()
>> > DRVR DBG1 Send batch: batch=1, m_currentRank=0
>> > DRVR OPER OraclePreparedStatement.sendBatch()
>> > DRVR DBG1 Send batch: batch=1, m_currentRank=0
>> > DRVR OPER OraclePreparedStatement.close()
>> > DRVR OPER OraclePreparedStatement.sendBatch()
>> > DRVR DBG1 Send batch: batch=1, m_currentRank=0
>> > DRVR OPER OracleStatement.close()
>> > DBAC FUNC DBData.cleanup()
>> > DRVR OPER OraclePreparedStatement.close()
>> > DRVR OPER OraclePreparedStatement.sendBatch()
>> > DRVR DBG1 Send batch: batch=1, m_currentRank=0
>> > DRVR OPER OracleStatement.close()
>> > DBAC FUNC DBData.cleanup()
>> > DBAC FUNC DBData.cleanup()
>> > DRVR FUNC OracleConnection.isClosed() returned false
>> > DRVR OPER OracleConnection.getAutoCommit() returned false
>> > DRVR OPER OracleConnection.rollback()
>> > DRVR OPER OracleConnection.setAutoCommit(autoCommit=true)
>> >
>> > JDBC log from WL6.0 sp1:
>> > DRVR OPER OracleConnection.commit()
>> > DRVR OPER OraclePreparedStatement.sendBatch()
>> > DRVR DBG1 Send batch: batch=1, m_currentRank=0
>> > DRVR OPER OraclePreparedStatement.sendBatch()
>> > DRVR DBG1 Send batch: batch=1, m_currentRank=0
>> > DRVR FUNC OraclePreparedStatement.clearParameters()
>> > DRVR FUNC OraclePreparedStatement.clearParameters()
>> > DRVR FUNC DBError.throwSqlException(errNum=89, obj=null)
>> > DRVR FUNC DBError.findMessage(errNum=89, obj=null)
>> > DRVR FUNC DBError.throwSqlException(reason="internal error",
>> SQLState=null,
>> > vendorCode=17089)
>> > SQLException: SQLState(null) vendor code(17089)
>> > java.sql.SQLException: internal error
>> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
>> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
>> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:219)
>> > at oracle.jdbc.dbaccess.DBDataSet.setDBItem(DBDataSet.java:310)
>> > at
>> >
>>
>oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedSta

>> > tement.java:2502)
>> > at
>> >
>>
>weblogic.jdbc.common.internal.ConnectionEnv.dropStatement(ConnectionEnv.java

>> > :500)
>> > at weblogic.jdbcbase.pool.Statement.close(Statement.java:74)
>> > at report.JSReportServlet.doReport(JSReportServlet.java:178)
>> > at report.JSReportServlet.service(JSReportServlet.java:76)
>> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> > at
>> >
>>
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

>> > :213)
>> > at
>> >
>>
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo

>> > ntext.java:1265)
>> > at
>> >
>>
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java

>> > :1622)
>> > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
>> > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>> > DRVR FUNC OracleConnection.isClosed() returned false
>> > DRVR OPER OracleConnection.getAutoCommit() returned false
>> > DRVR OPER OracleConnection.rollback()
>> > DRVR OPER OracleConnection.setAutoCommit(autoCommit=true)
>> >
>> > The driver seems to be encountering an internal error when
>> > "OraclePreparedStatement.clearParameters()" is called twice by the
>driver.
>> > BUT, why is it getting called at all? It doesn't get called in the
>WL6.0
>> > pool driver. It only calls "OraclePreparedStatement.close()", which
>makes
>> > sense. Also, the code does never calls clearParameters(). It seems
>like
>> > the pool driver is not closing the PreparedStatements properly, and
>is
>> > returning "damaged" connections to the pool. Then when one of these
>> > "damaged" connections gets used again, it throws an error that does
>not
>> make
>> > sense. IS THIS A BUG?
>> >
>> > Here's my set up:
>> >
>> > WL 6.0 sp1 on Windows NT
>> > Oracle 8.1.6 on same machine
>> > Connection pool "thinOraclePool" as follows:
>> > DriverName="oracle.jdbc.driver.OracleDriver"
>> > URL="jdbc:oracle:thin:@mymachine:1521:ORA1
>> > Properties="user=blah;password=blah;dll=ocijdbc8;protocol=thin"
>> > InitialCapacity="4"
>> > CapacityIncrement="2"
>> > LoginDelaySeconds="1"
>> > MaxCapacity="10"
>> > RefreshMinutes="5"
>> > TestTableName="dual"
>> >
>> > And here's the code (it's part of a user tracking app):
>> >
>> > Driver myDriver = (Driver)
>> >
>> > Class.forName("weblogic.jdbc.pool.Driver").newInstance();
>> > conn = myDriver.connect("jdbc:weblogic:pool:thinOraclePool",
>> > null);
>> > conn.setAutoCommit(false);
>> >
>> > // Insert client IP and session ID into db
>> > pstmt2 = conn.prepareStatement("INSERT INTO IMP_INFO
>"
>> > + "(ID, IMP_ID, NAME, VALUE) VALUES
>> > (IMP_INFO_ID.NEXTVAL, "
>> > + "1245, ?, ?)");
>> > pstmt2.setString(1, "Client");
>> > pstmt2.setString(2, request.getRemoteAddr());
>> > pstmt2.addBatch();
>> > pstmt2.setString(1, "Session ID");
>> > pstmt2.setString(2, sessionID);
>> > pstmt2.addBatch();
>> >
>> > // Insert HTTP header info into db
>> > String[] headerNames = {"Referer", "User-agent", "Cookie"};
>> > for (int i=0; i < headerNames.length; i++) {
>> > pstmt2.setString(1, headerNames[i]);
>> > pstmt2.setString(2, request.getHeader(headerNames[i]));
>> > pstmt2.addBatch();
>> > }
>> >
>> > // Insert query string parameters into db
>> > Enumeration paramNames = request.getParameterNames();
>> > while (paramNames.hasMoreElements()) {
>> > String name = paramNames.nextElement().toString();
>> > String values[] =
>request.getParameterValues(name);
>> >
>> > for (int i=0;i<values.length;i++) {
>> > pstmt2.setString(1, name);
>> > pstmt2.setString(2, values[i]);
>> > pstmt2.addBatch();
>> > }
>> > }
>> >
>> > int[] results = pstmt2.executeBatch();
>> > conn.commit();
>> > } catch (Exception e) {
>> > if (Debug.LOGGING_ENABLED) Debug.print("First catch block:
>"
>+
>> > e);
>> > try {
>> > conn.rollback();
>> > } catch (Exception e2) {
>> > if (Debug.LOGGING_ENABLED) Debug.print("Second catch
>> block:
>> > " + e2);
>> > }
>> > } finally {
>> > try {
>> > pstmt2.close();
>> > conn.close();
>> > } catch (Exception e) {
>> > if (Debug.LOGGING_ENABLED) Debug.print("Second finally
>> > block: " + e);
>> > }
>> > }
>> >
>> >
>>
>>
>
>


0 new messages