Re: [cx-oracle-users] ORA-03127
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2011-09-02 04:21:46
|
Ok, I tried with an 11g Release 1 database and was unable to replicate this problem. Thanks for the patch but unfortunately what you suggested doesn't seem to match the code that I have for 5.1 -- which now uses the default character set and simply converts to Unicode as needed. I don't think your patch actually helps in this case. :-( I checked that the code does what it should for NCLOBs and it seems to do so -- with both the default encoding and the UTF8 encoding. I did discover, though, that there was nothing in the test suite for NCLOBS so I added some tests for that that mirror the ones for CLOB and BLOB. I also attempted to call connection.close() deliberately in order to see if I could get the same error but I was unable to do so. Could I ask you to try the new test suite (don't forget to build the new TestNCLOBs table which can be built by running SetupTest.sql in the test subdirectory) and let me know if you get the problem with that code? That might help determine if this is generically a problem or a specific set of queries/commands. Thanks. Anthony On Mon, Aug 29, 2011 at 8:15 AM, Mike Elson <Mik...@eu...> wrote: > I've also seen this issue. The problem occurs when Django reads from the field SESSION_DATA, type NCLOB, in table DJANGO_SESSION. In cx_Oracle 5.1 the function ExternalLobVar_InternalRead() calls OCILobRead() with csid set to 0, whereas in 5.0.4 csid was set to OCI_UTF16ID when reading NCLOB fields. This causes OCILobRead() to fail but it is not reported at the time, leaving the cursor in an incomplete state and eventually an exception is thrown when the connection is closed. > > The error doesn't occur when I connect to an Oracle 10 database with NLS_NCHAR_CHARACTERSET of "AL16UTF16" but it does occur with an Oracle 11 database with NLS_NCHAR_CHARACTERSET set to "UTF8". > > Hope this helps! I put together a small patch (attached) that makes the problem go away but I'm not sure it's the correct fix. > > Regards, Mike. > >> Hi, >> >> I looked at it. The error is referring to the fact that the operations >> on the connection are not yet complete. Since it is taking place on a >> close() you can simply NOT do the close and allow it to close on its >> own when it goes out of scope. There was a change made to >> cursor.close() which may affect this but it seems unlikely. It would >> be helpful if you can provide a script that demonstrates the problem >> so that I can figure out why this might be happening. Thanks. I >> certainly have never run into this myself and I am using Django with >> cx_Oracle quite heavily. >> >> Anthony >> >> 2011/8/25 Sławek Ehlert <slafs.e@...>: >> > Hi there! >> > >> > Can You look at >> > >> > https://groups.google.com/d/topic/django-users/P9brNKIFwgI/discussion >> > >> > Recently I saw a similar problem when using cx_Oracle 5.1 when switching >> > Django 1.3 (Python 2.6) to another Oracle database (after syncing it) on >> > 64bit platform. >> > >> > Downgrading to 5.0.4 "solved" the problem. >> > >> > Regards >> > >> > Sławek >> > >> > >> > ------------------------------------------------------------------------------ >> > EMC VNX: the world's simplest storage, starting under $10K >> > The only unified storage solution that offers unified management >> > Up to 160% more powerful than alternatives and 25% more efficient. >> > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev >> > _______________________________________________ >> > cx-oracle-users mailing list >> > cx-oracle-users@... >> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > >> > >> > > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |