db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunitha Kambhampati (JIRA)" <derby-...@db.apache.org>
Subject [jira] Resolved: (DERBY-265) In Network Server retrieving BLOB values with autocommit off causes NullPointerException in INSANE build / AssertFailure in in BaseContainerHandle.getTransaction in SANE Build
Date Thu, 02 Jun 2005 21:24:56 GMT
     [ http://issues.apache.org/jira/browse/DERBY-265?page=all ]
     
Sunitha Kambhampati resolved DERBY-265:
---------------------------------------

    Resolution: Fixed

Committed revision 178803.

Fix includes
--    Adds check in  OverflowInputStream.initStream  to see if transaction of the container
handle is null and throws a StandardException with SQLState.DATA_CONTAINER_CLOSED
--    And at  the jdbc layer, this exception is wrapped with a user exception with an existing
 SQLState XJ073             (SQLState.BLOB_ACCESSED_AFTER_COMMIT) for both getBlob and getClob.
The error message corresponding to this sqlstate is  "The data in this Blob or Clob is no
longer available. Possible reasons are that its transaction committed, or its  connection
closed."
--   Removed the ASSERT in BaseContainerHandle.getTransaction() 

> In Network Server retrieving BLOB values with autocommit off causes NullPointerException
in INSANE build / AssertFailure in in BaseContainerHandle.getTransaction in SANE Build
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-265
>          URL: http://issues.apache.org/jira/browse/DERBY-265
>      Project: Derby
>         Type: Bug
>   Components: Network Server
>     Versions: 10.1.0.0
>     Reporter: Kathey Marsden
>     Assignee: Sunitha Kambhampati
>      Fix For: 10.1.0.0
>  Attachments: MsgNpe.java, MsgNpe2.java
>
> problem when retreiving rows with BLOB 
> values with network server with autocommit on.  The workaround 
> was to turn autocommit off.  The Problem manifested itself with 
> this trace but there was  an underlying NPE in the 
> derby.log
> java.lang.NullPointerException
>  at com.ibm.db2.jcc.c.md.a(md.java:289)
>  at 
> com.ibm.db2.jcc.c.SqlException.getMessage(SqlException.java:194)
>  at 
> java.lang.Throwable.getLocalizedMessage(Throwable.java:266)
>  at java.lang.Throwable.toString(Throwable.java:343)
>  at java.lang.String.valueOf(String.java:2131)
>  at java.io.PrintStream.print(PrintStream.java:462)
>  at java.io.PrintStream.println(PrintStream.java:599)
>  at java.lang.Throwable.printStackTrace(Throwable.java:461)
>  at java.lang.Throwable.printStackTrace(Throwable.java:451)
>  at temp.CloudscapeTest.<init>(CloudscapeTest.java:28)
>  at temp.CloudscapeTest.main(CloudscapeTest.java:92)
> When run with a SANE Build with the attached repro, the 
> derby.log shows this trace.
> }), Committing
> 2005-02-08 21:19:45.626 GMT Thread[DRDAConnThread_2,5,main] 
> (XID = 2845), (SESSIONID = 1), (DATABASE = toursDB), (DRDAID = 
> NF000001.G838-866941820371235014{10}), Executing prepared 
> statement: SELECT "MAP_ID", "MAP_NAME", "REGION", "AREA", 
> "PHOTO_FORMAT", "PICTURE" FROM "MAPS" :End prepared statement
> 2005-02-08 21:19:45.686 GMT Thread[DRDAConnThread_2,5,main] 
> (XID = 2845), (SESSIONID = 1), (DATABASE = toursDB), (DRDAID = 
> NF000001.G838-866941820371235014{10}), Executing prepared 
> statement: SELECT "MAP_ID", "MAP_NAME", "REGION", "AREA", 
> "PHOTO_FORMAT", "PICTURE" FROM "MAPS" :End prepared statement
> 2005-02-08 21:19:45.726 GMT Thread[DRDAConnThread_2,5,main] 
> (XID = 2845), (SESSIONID = 1), (DATABASE = toursDB), (DRDAID = 
> NF000001.G838-866941820371235014{10}), Committing
> 2005-02-08 21:19:45.726 GMT Thread[DRDAConnThread_2,5,main] 
> (XID = 2845), (SESSIONID = 1), (DATABASE = toursDB), (DRDAID = 
> NF000001.G838-866941820371235014{10}), Cleanup action starting
> 2005-02-08 21:19:45.726 GMT Thread[DRDAConnThread_2,5,main] 
> (XID = 2845), (SESSIONID = 1), (DATABASE = toursDB), (DRDAID = 
> NF000001.G838-866941820371235014{10}), Failed Statement is: 
> null
> org.apache.derby.iapi.services.sanity.AssertFailure: ASSERT 
> FAILED
> 	at 
> org.apache.derby.iapi.services.sanity.SanityManager.ASSERT(Sanit
> yManager.java:99)
> 	at 
> org.apache.derby.impl.store.raw.data.BaseContainerHandle.getTran
> saction(BaseContainerHandle.java:830)
> 	at 
> org.apache.derby.impl.store.raw.data.OverflowInputStream.initStr
> eam(OverflowInputStream.java:158)
> 	at 
> org.apache.derby.iapi.services.io.FormatIdInputStream.initStream
> (FormatIdInputStream.java:226)
> 	at 
> org.apache.derby.impl.jdbc.EmbedBlob.<init>(EmbedBlob.java:12
> 8)
> 	at 
> org.apache.derby.impl.jdbc.EmbedResultSet20.getBlob(EmbedResultS
> et20.java:1552)
> 	at 
> org.apache.derby.impl.drda.DRDAConnThread.writeFDODTA(DRDAConnTh
> read.java:5871)
> 	at 
> org.apache.derby.impl.drda.DRDAConnThread.writeQRYDTA(DRDAConnTh
> read.java:5754)
> 	at 
> org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDACo
> nnThread.java:595)
> 	at 
> org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.jav
> a:226)
> It seems that network server is somehow closing the resultset 
> or committing too early. This problem may be related to DERBY-213
> There seem to be some scenario in which Store throws this 
> ASSERTION instead of the proper user error if the blob is 
> accessed outside of the transaction, but we don't have a repro 
> outside of network server right now.
> This occurred with JCC 2.4. I have not tried it with derby client

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message