Most info. on Lester's problem:
*********************************
Filename WITH BufferOverFlowException
071006CLAIMS-1.pdf
The most evil thing happened with different filenames.
We tried to change the filename a bit. There will NOT have BufferOverflowException.
Filename WITHOUT BufferOverFlowException
071006CLAIMS-1..pdf or 071006CLAIMS-1.evil.pdf
These are programming steps caused the exception
1) read the whole file as a byte[] (8.56MB).
2) pass the byte[] to a
EJB (CMT) in weblogic.
3) weblogic try to save the byte[] to Sybase.
(jConnect (TM) for
JDBC(TM)/5.5(Build 25329)/P/EBF11937/JDK13/Fri Apr 30 2:16:56 2004).
4) throw java.nio.BufferOverflowException for this particular file only.
The problem caused:
Even though the Exception was catched, the transaction fallback, but the sybase DB still block this process.
The connection never relased unless you kill it.
Could any expert give us some comments?
Java bug? Weblogic bug? Sybase JDBC bug? Sybase DB bug?
Why there was BufferOverflowException?
The is the Exception thrown from java nio lib..
java.nio.BufferOverflowException
at java.nio.charset.CoderResult.throwException(CoderResult.java:259)
at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:340)
at java.lang.StringCoding.encode(StringCoding.java:374)
at java.lang.String.getBytes(String.java:573)
at com.sybase.jdbc2.utils.PureConverter.fromUnicode(PureConverter.java:54)
at com.sybase.jdbc2.tds.TdsDataOutputStream.toBytes(TdsDataOutputStream.java:912)
at com.sybase.jdbc2.tds.TdsOutputStream.stringToByte(TdsOutputStream.java:285)
at com.sybase.jdbc2.tds.LanguageToken.send(LanguageToken.java:56)
at com.sybase.jdbc2.tds.Tds.language(Tds.java:722)
at com.sybase.jdbc2.jdbc.SybStatement.sendQuery(SybStatement.java:1507)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.sendQuery(SybPreparedStatement.java:1230)
at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1681)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:115)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:147)
at com.xxxxx.xxxx.xxxxxxx.server.infoStoreDbAccess.doSavingImage(infoStoreDbAccess.java:5387)
at com.xxxxx.xxxx.xxxxxxx.server.infoStoreDbAccess.sendMessageWithBinFile(infoStoreDbAccess.java:3981)
at com.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean.sendMessageWithBinFile(Unknown Source)
at com.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean_afgo95_EOImpl.sendMessageWithBinFile(xxxxxBean_afgo95_EOImpl.java:1970)
at com.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean_afgo95_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
2006-07-14 22:00:48,805 ERROR -
xxx.xxxxx.xxxxxx.xxxxxxx.stub.DbConnectionException: java.nio.BufferOverflowException
at com.xxxxx.xxxx.xxxxxxx.server.infoStoreDbAccess.doSavingImage(infoStoreDbAccess.java:5411)
at com.xxxxx.xxxx.xxxxxxx.server.infoStoreDbAccess.sendMessageWithBinFile(infoStoreDbAccess.java:3981)
at com.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean.sendMessageWithBinFile(Unknown Source)
at com.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean_afgo95_EOImpl.sendMessageWithBinFile(xxxxxBean_afgo95_EOImpl.java:1970)
at com.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean_afgo95_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
2006-07-14 22:00:48,806 ERROR - [12] -
xxx.xxxxx.xxxx.xxxxxxx..stub.DbConnectionException: java.nio.BufferOverflowException
at xxx.xxxxx.xxxx.xxxxxxx.server.infoStoreDbAccess.doSavingImage(infoStoreDbAccess.java:5411)
at xxx.xxxxx.xxxx.xxxxxxx.server.infoStoreDbAccess.sendMessageWithBinFile(infoStoreDbAccess.java:3981)
at xxx.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean.sendMessageWithBinFile(Unknown Source)
at xxx.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean_afgo95_EOImpl.sendMessageWithBinFile(xxxxxBean_afgo95_EOImpl.java:1970)
at xxx.xxxxx.xxxx.xxxxxxx.session.xxxxx.xxxxxxxBean_afgo95_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
[ July 14, 2006: Message edited by: yeungsangsin ]
[ July 14, 2006: Message edited by: yeungsangsin ]