cx-oracle-users Mailing List for cx_Oracle (Page 39)
Brought to you by:
atuining
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark H. <mh...@pi...> - 2011-09-27 06:17:43
|
On 9/26/11 6:35 PM, Robert Lucente wrote: > I am new to Python and open source. Consequently, I am not sure what the > appropriate behaviors are. > > Have you guys ever heard of the book in the subject line and if so what did > you think of it? As a newbie, it seems a good book to at least get a list of > things to go think about. Haven't seen the book, but here's some small cx_Oracle snippets that might help you get started: http://markharrison.net/cx-oracle-demos |
From: Robert L. <rlu...@pi...> - 2011-09-27 01:35:35
|
I am new to Python and open source. Consequently, I am not sure what the appropriate behaviors are. Have you guys ever heard of the book in the subject line and if so what did you think of it? As a newbie, it seems a good book to at least get a list of things to go think about. |
From: Wong W. Meng-R. <r3...@fr...> - 2011-09-26 09:18:27
|
Hello there, I rebuilt python today, making it as a shared library instead of static library. The build was successful. Then I rebuilt cx_Oracle, linking it to the folder where libpython2.7.so and libttsh11.so was. I set the LD_LIBRARY_PATH to where libclntsh.so and the other 2 libraries are, and yet the cx_Oracle cannot be loaded from my python session. However, when I forced to load cx_Oracle using LD_PRELOAD=<path of cx_Oracle.so> python, I am able to import cx_Oracle, and able to connect to my database without issue. I am able to use the cursor and able to query and update data and perform the commit. Does it mean the python that I build is not "fully" shared? $ file cx_Oracle.so cx_Oracle.so: ELF-64 shared object file - IA64 $ ldd cx_Oracle.so cx_Oracle.so: libclntsh.so.11.1 => /opt/oracle/product/11.1.0/lib/libclntsh.so.11.1 libttsh11.so => /opt/oracle/product/11.1.0/lib/libttsh11.so libpython2.7.so => /home/r32813/Build/2.7.1/Python-2.7.1/libpython2.7.so libnnz11.so => /opt/oracle/product/11.1.0/lib/libnnz11.so libdl.so.1 => /usr/lib/hpux64/libdl.so.1 libm.so.1 => /usr/lib/hpux64/libm.so.1 libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1 libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1 libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1 libc.so.1 => /usr/lib/hpux64/libc.so.1 librt.so.1 => /usr/lib/hpux64/librt.so.1 libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1 librt.so.1 => /usr/lib/hpux64/librt.so.1 libdl.so.1 => /usr/lib/hpux64/libdl.so.1 libm.so.1 => /usr/lib/hpux64/libm.so.1 libc.so.1 => /usr/lib/hpux64/libc.so.1 libxti.so.1 => /usr/lib/hpux64/libxti.so.1 libuca.so.1 => /usr/lib/hpux64/libuca.so.1 libdl.so.1 => /usr/lib/hpux64/libdl.so.1 $ chatr cx_Oracle.so cx_Oracle.so: 64-bit ELF shared library shared library dynamic path search: LD_LIBRARY_PATH enabled first SHLIB_PATH enabled second embedded path enabled third /home/r32813/local/lib:/home/r32813/Build/2.7.1/Python-2.7.1:/opt/oracle/product/11.1.0 /lib:/opt/oracle/product/11.1.0 shared library list: libclntsh.so.11.1 libttsh11.so libpython2.7.so shared library mapped private disabled shared vtable support disabled explicit unloading enabled linkage table protection disabled segments: index type address flags size 7 text 4000000000000000 z---c- D (default) 8 data 6000000000000000 ---m-- D (default) kernel assisted branch prediction enabled lazy swap allocation for dynamic segments disabled nulptr dereferences trap disabled address space model: default caliper dynamic instrumentation disabled $ env | grep LD LD_LIBRARY_PATH=/opt/oracle/product/11.1.0/lib:/home/r32813/Build/2.7.1/Python-2.7.1 $ env | grep NLS NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK $ python Python 2.7.1 (r271:86832, Sep 26 2011, 15:58:44) [C] on hp-ux11 Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so $ LD_PRELOAD=/home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so python Python 2.7.1 (r271:86832, Sep 26 2011, 15:58:44) [C] on hp-ux11 Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle >>> connection=cx_Oracle.connect("gen812ora8/gen812db1ora8@DB1ORA9") >>> c = connection.cursor() >>> c.execute("select user_last_name from users where user_id='ftcs'") <__builtin__.OracleCursor on <cx_Oracle.Connection to gen812ora8@DB1ORA9>> >>> c.fetchall() [('XXXXX',)] >>> c.execute("update users set user_last_name='YYYYYY' where user_id='ftcs'") >>> connection.commit(); >>> c.execute("select user_last_name from users where user_id='ftcs'") <__builtin__.OracleCursor on <cx_Oracle.Connection to gen812ora8@DB1ORA9>> >>> c.fetchall() [('YYYYYY',)] >>> Regards, Wah Meng -----Original Message----- From: inkblotter [mailto:ink...@gm...] Sent: Sunday, September 25, 2011 4:20 AM To: cx-...@li... Subject: Re: [cx-oracle-users] cx_Oracle on HP-UX 11.31 ia64 built with aCC successfully but failed to load The difference between your chatr and mine I used python 2.5.1 and you used python 2.7.1 we both ran ia64 11.31 hpux my chatr and yours differ because mine includes these critical libraries libclntsh.so.11.1 libttsh11.so libpython2.5.so whereas yours only has the Oracle libclntsh.so but not the other two. when I run python, without LD_PRELOAD, I can import cx_Oracle successfully and you can't. Now well you may ask how I built that cx_Oracle.so on ia64? Sigh. I can't tell you exactly. I think when you rebuild python you must build it as a shared library, not as a static library, and pass it the ttsh11 as and extra library. and then you build cx_Oracle against that shared python library, maybe it works, maybe it doesn't. Blush. The plot is thicker. I think in later version of python, like your python 2.7.1, this trick won't work. Yes, you should always build python shared, not static. But even that doesn't make it work. That is why I suggested LD_PRELOAD to get to a point that works, however kludgey. LD_PRELOAD=<path_to $ORACLE_HOME/lib/libclntsh.so> python >> import cx_Oracle Or maybe LD_PRELOAD=<path to cx_Oracle.so> python instead. No space before or after the '=' sign. But python should be built shared, not static. On 09/19/2011 09:07 PM, Wong Wah Meng-R32813 wrote: > This is the output of file, ldd and chart, respectively. Can you help to elaborate what does it mean by using "LD_PRELOAD"? It gives me an error when I invoke it by appending LD_PRELOAD with the path of python. LD_PRELOAD is an invalid command when I separate the two. > > $ cp cx_Oracle-5.0/build/lib*/*.so $PYTHONPATH > $ which cx_Oracle.so > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > $ file `which cx_Oracle.so` > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: ELF-64 shared object file - IA64 > $ ldd `which cx_Oracle.so` > > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: > libclntsh.so.11.1 => /opt/oracle/product/11.1.0/lib/libclntsh.so.11.1 > libnnz11.so => /opt/oracle/product/11.1.0/lib/libnnz11.so > libdl.so.1 => /usr/lib/hpux64/libdl.so.1 > libm.so.1 => /usr/lib/hpux64/libm.so.1 > libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1 > libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1 > libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1 > libc.so.1 => /usr/lib/hpux64/libc.so.1 > libxti.so.1 => /usr/lib/hpux64/libxti.so.1 > libuca.so.1 => /usr/lib/hpux64/libuca.so.1 > libdl.so.1 => /usr/lib/hpux64/libdl.so.1 > > $ chatr `which cx_Oracle.so` > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: > 64-bit ELF shared library > shared library dynamic path search: > LD_LIBRARY_PATH enabled first > SHLIB_PATH enabled second > embedded path enabled third /opt/oracle/product/11.1.0/lib:/opt/oracle/product/11.1.0 > shared library list: > libclntsh.so.11.1 > shared library mapped private disabled > shared vtable support disabled > explicit unloading enabled > linkage table protection disabled > segments: > index type address flags size > 7 text 4000000000000000 z---c- D (default) > 8 data 6000000000000000 ---m-- D (default) > kernel assisted branch prediction enabled > lazy swap allocation for dynamic segments disabled > nulptr dereferences trap disabled > address space model: default > caliper dynamic instrumentation disabled > > $ which python > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python > $ LD_PRELOAD`which python` > sh: LD_PRELOAD/home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python: not found. > $ LD_PRELOAD `which python` > sh: LD_PRELOAD: not found. > > > Regards, > Wah Meng > > -----Original Message----- > From: inkblotter [mailto:ink...@gm...] > Sent: Tuesday, September 20, 2011 5:10 AM > To: cx-...@li... > Subject: Re: [cx-oracle-users] cx_Oracle on HP-UX 11.31 ia64 built with aCC successfully but failed to load > > > file /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > ldd /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > chatr /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > > On Itaium you may need to invoke python as LD_PRELOAD<path to python> and at the python prompt "import cx_Oracle" > > If that fails > try LD_PRELOAD $ORACLE_HOME/lib/libclntsh.so<path to python> and at the python prompt 'import cx_Oracle' > > > On 09/19/2011 01:25 AM, Wong Wah Meng-R32813 wrote: > >> Hello there, >> >> I have tried to build cx_Oracle on the platform specified in the subject of this email. >> >> My python is built with 64-bit option, using aCC. The cx_Oracle can be built. However, when I import that module, it just cannot load and it did not give any explicit indication what goes wrong. Does anyone know why? >> >> >> Regards, >> >> Wah Meng >> >> $ which python >> /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python >> $ python setup.py build >> running build >> running build_ext >> building 'cx_Oracle' extension >> creating build >> creating build/temp.hp-ux-B.11.31-ia64-2.7-11g >> cc +DD64 -Olimit 1500 -g -DNDEBUG -O +z -I/opt/oracle/product/11.1.0/rdbms/demo -I/opt/oracle/product/11.1.0/rdbms/public -I/home/r32813/Build/2.7.1/Python-2.7.1/Include -I/home/r32813/Build/2.7.1/Python-2.7.1/Lib/.. -c cx_Oracle.c -o build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.0 >> cc: warning 1913: `1500' does not exist or cannot be read >> "Connection.c", line 1016: warning #4232-D: conversion from "ub4 *" to a more >> strictly aligned type "void **" may cause misaligned access >> (dvoid**)&cacheSize, 0, OCI_ATTR_STMTCACHESIZE, >> ^ >> >> creating build/lib.hp-ux-B.11.31-ia64-2.7-11g >> ld -b build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -L/opt/oracle/product/11.1.0/lib -L/opt/oracle/product/11.1.0 -lclntsh -o build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so >> $ cp build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so $PYTHONPATH >> $ env | grep PYTHON >> PYTHONPATH=/home/r32813/Build/2.7.1/Python-2.7.1/Lib >> $ python >> Python 2.7.1 (r271:86832, Sep 19 2011, 14:12:09) [C] on hp-ux11 >> Type "help", "copyright", "credits" or "license" for more information. >> >> >>>>> import cx_Oracle >>>>> >>>>> >> Traceback (most recent call last): >> File "<stdin>", line 1, in<module> >> ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so >> >> >>>>> >>>>> >> # swlist -l product | grep Compiler >> >> ACXX C.06.26.EVAL HP C/aC++ Compiler >> C-ANSI-C C.06.26.EVAL HP C/aC++ Compiler >> COMPLIBS B.11.31 Compiler Support Libraries >> >> >> >> >> >> ------------------------------------------------------------------------------ >> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >> Learn about the latest advances in developing for the >> BlackBerry® mobile platform with sessions, labs& more. >> See new tools and technologies. Register for BlackBerry® DevCon today! >> http://p.sf.net/sfu/rim-devcon-copy1 >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Wong W. Meng-R. <r3...@fr...> - 2011-09-25 12:23:09
|
Thanks for your reply. Ok I will take a look at the aspect if of building python as a shared library not static. Also I will try out the LD_PRELOAD thing. I will post out my findings after trying It out. Regards, Wah Meng On Sep 25, 2011, at 4:21 AM, "inkblotter" <ink...@gm...> wrote: > The difference between your chatr and mine > > I used python 2.5.1 and you used python 2.7.1 > we both ran ia64 11.31 hpux > my chatr and yours differ because mine includes these critical libraries > libclntsh.so.11.1 > libttsh11.so > libpython2.5.so > whereas yours only has the Oracle libclntsh.so but not the other two. > when I run python, without LD_PRELOAD, I can import cx_Oracle > successfully and you can't. > > > Now well you may ask how I built that cx_Oracle.so on ia64? Sigh. > > I can't tell you exactly. I think when you rebuild python you must build > it as a shared library, not as a static library, and pass it the ttsh11 > as and extra library. and then you build cx_Oracle against that shared > python library, maybe it works, maybe it doesn't. > > Blush. The plot is thicker. I think in later version of python, like > your python 2.7.1, this trick won't work. Yes, you should always build > python shared, not static. But even that doesn't make it work. That is > why I suggested LD_PRELOAD to get to a point that works, however kludgey. > > LD_PRELOAD=<path_to $ORACLE_HOME/lib/libclntsh.so> python >>> import cx_Oracle > > Or maybe LD_PRELOAD=<path to cx_Oracle.so> python > instead. > > No space before or after the '=' sign. > > But python should be built shared, not static. > > > > > > On 09/19/2011 09:07 PM, Wong Wah Meng-R32813 wrote: >> This is the output of file, ldd and chart, respectively. Can you help to elaborate what does it mean by using "LD_PRELOAD"? It gives me an error when I invoke it by appending LD_PRELOAD with the path of python. LD_PRELOAD is an invalid command when I separate the two. >> >> $ cp cx_Oracle-5.0/build/lib*/*.so $PYTHONPATH >> $ which cx_Oracle.so >> /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so >> $ file `which cx_Oracle.so` >> /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: ELF-64 shared object file - IA64 >> $ ldd `which cx_Oracle.so` >> >> /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: >> libclntsh.so.11.1 => /opt/oracle/product/11.1.0/lib/libclntsh.so.11.1 >> libnnz11.so => /opt/oracle/product/11.1.0/lib/libnnz11.so >> libdl.so.1 => /usr/lib/hpux64/libdl.so.1 >> libm.so.1 => /usr/lib/hpux64/libm.so.1 >> libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1 >> libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1 >> libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1 >> libc.so.1 => /usr/lib/hpux64/libc.so.1 >> libxti.so.1 => /usr/lib/hpux64/libxti.so.1 >> libuca.so.1 => /usr/lib/hpux64/libuca.so.1 >> libdl.so.1 => /usr/lib/hpux64/libdl.so.1 >> >> $ chatr `which cx_Oracle.so` >> /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: >> 64-bit ELF shared library >> shared library dynamic path search: >> LD_LIBRARY_PATH enabled first >> SHLIB_PATH enabled second >> embedded path enabled third /opt/oracle/product/11.1.0/lib:/opt/oracle/product/11.1.0 >> shared library list: >> libclntsh.so.11.1 >> shared library mapped private disabled >> shared vtable support disabled >> explicit unloading enabled >> linkage table protection disabled >> segments: >> index type address flags size >> 7 text 4000000000000000 z---c- D (default) >> 8 data 6000000000000000 ---m-- D (default) >> kernel assisted branch prediction enabled >> lazy swap allocation for dynamic segments disabled >> nulptr dereferences trap disabled >> address space model: default >> caliper dynamic instrumentation disabled >> >> $ which python >> /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python >> $ LD_PRELOAD`which python` >> sh: LD_PRELOAD/home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python: not found. >> $ LD_PRELOAD `which python` >> sh: LD_PRELOAD: not found. >> >> >> Regards, >> Wah Meng >> >> -----Original Message----- >> From: inkblotter [mailto:ink...@gm...] >> Sent: Tuesday, September 20, 2011 5:10 AM >> To: cx-...@li... >> Subject: Re: [cx-oracle-users] cx_Oracle on HP-UX 11.31 ia64 built with aCC successfully but failed to load >> >> >> file /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so >> ldd /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so >> chatr /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so >> >> On Itaium you may need to invoke python as LD_PRELOAD<path to python> and at the python prompt "import cx_Oracle" >> >> If that fails >> try LD_PRELOAD $ORACLE_HOME/lib/libclntsh.so<path to python> and at the python prompt 'import cx_Oracle' >> >> >> On 09/19/2011 01:25 AM, Wong Wah Meng-R32813 wrote: >> >>> Hello there, >>> >>> I have tried to build cx_Oracle on the platform specified in the subject of this email. >>> >>> My python is built with 64-bit option, using aCC. The cx_Oracle can be built. However, when I import that module, it just cannot load and it did not give any explicit indication what goes wrong. Does anyone know why? >>> >>> >>> Regards, >>> >>> Wah Meng >>> >>> $ which python >>> /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python >>> $ python setup.py build >>> running build >>> running build_ext >>> building 'cx_Oracle' extension >>> creating build >>> creating build/temp.hp-ux-B.11.31-ia64-2.7-11g >>> cc +DD64 -Olimit 1500 -g -DNDEBUG -O +z -I/opt/oracle/product/11.1.0/rdbms/demo -I/opt/oracle/product/11.1.0/rdbms/public -I/home/r32813/Build/2.7.1/Python-2.7.1/Include -I/home/r32813/Build/2.7.1/Python-2.7.1/Lib/.. -c cx_Oracle.c -o build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.0 >>> cc: warning 1913: `1500' does not exist or cannot be read >>> "Connection.c", line 1016: warning #4232-D: conversion from "ub4 *" to a more >>> strictly aligned type "void **" may cause misaligned access >>> (dvoid**)&cacheSize, 0, OCI_ATTR_STMTCACHESIZE, >>> ^ >>> >>> creating build/lib.hp-ux-B.11.31-ia64-2.7-11g >>> ld -b build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -L/opt/oracle/product/11.1.0/lib -L/opt/oracle/product/11.1.0 -lclntsh -o build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so >>> $ cp build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so $PYTHONPATH >>> $ env | grep PYTHON >>> PYTHONPATH=/home/r32813/Build/2.7.1/Python-2.7.1/Lib >>> $ python >>> Python 2.7.1 (r271:86832, Sep 19 2011, 14:12:09) [C] on hp-ux11 >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> >>>>>> import cx_Oracle >>>>>> >>>>>> >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in<module> >>> ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so >>> >>> >>>>>> >>>>>> >>> # swlist -l product | grep Compiler >>> >>> ACXX C.06.26.EVAL HP C/aC++ Compiler >>> C-ANSI-C C.06.26.EVAL HP C/aC++ Compiler >>> COMPLIBS B.11.31 Compiler Support Libraries >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >>> Learn about the latest advances in developing for the >>> BlackBerry® mobile platform with sessions, labs& more. >>> See new tools and technologies. Register for BlackBerry® DevCon today! >>> http://p.sf.net/sfu/rim-devcon-copy1 >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >>> >>> >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure contains a >> definitive record of customers, application performance, security >> threats, fraudulent activity and more. Splunk takes this data and makes >> sense of it. Business sense. IT sense. Common sense. >> http://p.sf.net/sfu/splunk-d2dcopy1 >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure contains a >> definitive record of customers, application performance, security >> threats, fraudulent activity and more. Splunk takes this data and makes >> sense of it. Business sense. IT sense. Common sense. >> http://p.sf.net/sfu/splunk-d2dcopy1 >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2dcopy2 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: inkblotter <ink...@gm...> - 2011-09-24 20:20:25
|
The difference between your chatr and mine I used python 2.5.1 and you used python 2.7.1 we both ran ia64 11.31 hpux my chatr and yours differ because mine includes these critical libraries libclntsh.so.11.1 libttsh11.so libpython2.5.so whereas yours only has the Oracle libclntsh.so but not the other two. when I run python, without LD_PRELOAD, I can import cx_Oracle successfully and you can't. Now well you may ask how I built that cx_Oracle.so on ia64? Sigh. I can't tell you exactly. I think when you rebuild python you must build it as a shared library, not as a static library, and pass it the ttsh11 as and extra library. and then you build cx_Oracle against that shared python library, maybe it works, maybe it doesn't. Blush. The plot is thicker. I think in later version of python, like your python 2.7.1, this trick won't work. Yes, you should always build python shared, not static. But even that doesn't make it work. That is why I suggested LD_PRELOAD to get to a point that works, however kludgey. LD_PRELOAD=<path_to $ORACLE_HOME/lib/libclntsh.so> python >> import cx_Oracle Or maybe LD_PRELOAD=<path to cx_Oracle.so> python instead. No space before or after the '=' sign. But python should be built shared, not static. On 09/19/2011 09:07 PM, Wong Wah Meng-R32813 wrote: > This is the output of file, ldd and chart, respectively. Can you help to elaborate what does it mean by using "LD_PRELOAD"? It gives me an error when I invoke it by appending LD_PRELOAD with the path of python. LD_PRELOAD is an invalid command when I separate the two. > > $ cp cx_Oracle-5.0/build/lib*/*.so $PYTHONPATH > $ which cx_Oracle.so > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > $ file `which cx_Oracle.so` > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: ELF-64 shared object file - IA64 > $ ldd `which cx_Oracle.so` > > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: > libclntsh.so.11.1 => /opt/oracle/product/11.1.0/lib/libclntsh.so.11.1 > libnnz11.so => /opt/oracle/product/11.1.0/lib/libnnz11.so > libdl.so.1 => /usr/lib/hpux64/libdl.so.1 > libm.so.1 => /usr/lib/hpux64/libm.so.1 > libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1 > libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1 > libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1 > libc.so.1 => /usr/lib/hpux64/libc.so.1 > libxti.so.1 => /usr/lib/hpux64/libxti.so.1 > libuca.so.1 => /usr/lib/hpux64/libuca.so.1 > libdl.so.1 => /usr/lib/hpux64/libdl.so.1 > > $ chatr `which cx_Oracle.so` > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: > 64-bit ELF shared library > shared library dynamic path search: > LD_LIBRARY_PATH enabled first > SHLIB_PATH enabled second > embedded path enabled third /opt/oracle/product/11.1.0/lib:/opt/oracle/product/11.1.0 > shared library list: > libclntsh.so.11.1 > shared library mapped private disabled > shared vtable support disabled > explicit unloading enabled > linkage table protection disabled > segments: > index type address flags size > 7 text 4000000000000000 z---c- D (default) > 8 data 6000000000000000 ---m-- D (default) > kernel assisted branch prediction enabled > lazy swap allocation for dynamic segments disabled > nulptr dereferences trap disabled > address space model: default > caliper dynamic instrumentation disabled > > $ which python > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python > $ LD_PRELOAD`which python` > sh: LD_PRELOAD/home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python: not found. > $ LD_PRELOAD `which python` > sh: LD_PRELOAD: not found. > > > Regards, > Wah Meng > > -----Original Message----- > From: inkblotter [mailto:ink...@gm...] > Sent: Tuesday, September 20, 2011 5:10 AM > To: cx-...@li... > Subject: Re: [cx-oracle-users] cx_Oracle on HP-UX 11.31 ia64 built with aCC successfully but failed to load > > > file /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > ldd /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > chatr /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > > On Itaium you may need to invoke python as LD_PRELOAD<path to python> and at the python prompt "import cx_Oracle" > > If that fails > try LD_PRELOAD $ORACLE_HOME/lib/libclntsh.so<path to python> and at the python prompt 'import cx_Oracle' > > > On 09/19/2011 01:25 AM, Wong Wah Meng-R32813 wrote: > >> Hello there, >> >> I have tried to build cx_Oracle on the platform specified in the subject of this email. >> >> My python is built with 64-bit option, using aCC. The cx_Oracle can be built. However, when I import that module, it just cannot load and it did not give any explicit indication what goes wrong. Does anyone know why? >> >> >> Regards, >> >> Wah Meng >> >> $ which python >> /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python >> $ python setup.py build >> running build >> running build_ext >> building 'cx_Oracle' extension >> creating build >> creating build/temp.hp-ux-B.11.31-ia64-2.7-11g >> cc +DD64 -Olimit 1500 -g -DNDEBUG -O +z -I/opt/oracle/product/11.1.0/rdbms/demo -I/opt/oracle/product/11.1.0/rdbms/public -I/home/r32813/Build/2.7.1/Python-2.7.1/Include -I/home/r32813/Build/2.7.1/Python-2.7.1/Lib/.. -c cx_Oracle.c -o build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.0 >> cc: warning 1913: `1500' does not exist or cannot be read >> "Connection.c", line 1016: warning #4232-D: conversion from "ub4 *" to a more >> strictly aligned type "void **" may cause misaligned access >> (dvoid**)&cacheSize, 0, OCI_ATTR_STMTCACHESIZE, >> ^ >> >> creating build/lib.hp-ux-B.11.31-ia64-2.7-11g >> ld -b build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -L/opt/oracle/product/11.1.0/lib -L/opt/oracle/product/11.1.0 -lclntsh -o build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so >> $ cp build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so $PYTHONPATH >> $ env | grep PYTHON >> PYTHONPATH=/home/r32813/Build/2.7.1/Python-2.7.1/Lib >> $ python >> Python 2.7.1 (r271:86832, Sep 19 2011, 14:12:09) [C] on hp-ux11 >> Type "help", "copyright", "credits" or "license" for more information. >> >> >>>>> import cx_Oracle >>>>> >>>>> >> Traceback (most recent call last): >> File "<stdin>", line 1, in<module> >> ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so >> >> >>>>> >>>>> >> # swlist -l product | grep Compiler >> >> ACXX C.06.26.EVAL HP C/aC++ Compiler >> C-ANSI-C C.06.26.EVAL HP C/aC++ Compiler >> COMPLIBS B.11.31 Compiler Support Libraries >> >> >> >> >> >> ------------------------------------------------------------------------------ >> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >> Learn about the latest advances in developing for the >> BlackBerry® mobile platform with sessions, labs& more. >> See new tools and technologies. Register for BlackBerry® DevCon today! >> http://p.sf.net/sfu/rim-devcon-copy1 >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Wong W. Meng-R. <r3...@fr...> - 2011-09-22 09:47:52
|
Hi I sent this one a few days ago. Did you get this? Thanks in advance for reverting. :) =========================================================================================== This is the output of file, ldd and chart, respectively. Can you help to elaborate what does it mean by using "LD_PRELOAD"? It gives me an error when I invoke it by appending LD_PRELOAD with the path of python. LD_PRELOAD is an invalid command when I separate the two. $ cp cx_Oracle-5.0/build/lib*/*.so $PYTHONPATH $ which cx_Oracle.so /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so $ file `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: ELF-64 shared object file - IA64 $ ldd `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: libclntsh.so.11.1 => /opt/oracle/product/11.1.0/lib/libclntsh.so.11.1 libnnz11.so => /opt/oracle/product/11.1.0/lib/libnnz11.so libdl.so.1 => /usr/lib/hpux64/libdl.so.1 libm.so.1 => /usr/lib/hpux64/libm.so.1 libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1 libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1 libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1 libc.so.1 => /usr/lib/hpux64/libc.so.1 libxti.so.1 => /usr/lib/hpux64/libxti.so.1 libuca.so.1 => /usr/lib/hpux64/libuca.so.1 libdl.so.1 => /usr/lib/hpux64/libdl.so.1 $ chatr `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: 64-bit ELF shared library shared library dynamic path search: LD_LIBRARY_PATH enabled first SHLIB_PATH enabled second embedded path enabled third /opt/oracle/product/11.1.0/lib:/opt/oracle/product/11.1.0 shared library list: libclntsh.so.11.1 shared library mapped private disabled shared vtable support disabled explicit unloading enabled linkage table protection disabled segments: index type address flags size 7 text 4000000000000000 z---c- D (default) 8 data 6000000000000000 ---m-- D (default) kernel assisted branch prediction enabled lazy swap allocation for dynamic segments disabled nulptr dereferences trap disabled address space model: default caliper dynamic instrumentation disabled $ which python /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python $ LD_PRELOAD`which python` sh: LD_PRELOAD/home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python: not found. $ LD_PRELOAD `which python` sh: LD_PRELOAD: not found. Regards, Wah Meng -----Original Message----- From: inkblotter [mailto:ink...@gm...] Sent: Tuesday, September 20, 2011 5:10 AM To: cx-...@li... Subject: Re: [cx-oracle-users] cx_Oracle on HP-UX 11.31 ia64 built with aCC successfully but failed to load file /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so ldd /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so chatr /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so On Itaium you may need to invoke python as LD_PRELOAD<path to python> and at the python prompt "import cx_Oracle" If that fails try LD_PRELOAD $ORACLE_HOME/lib/libclntsh.so<path to python> and at the python prompt 'import cx_Oracle' |
From: Wong W. Meng-R. <r3...@fr...> - 2011-09-22 09:33:01
|
Hi I sent this one a few days ago. Did you get this? Thanks in advance for reverting. :) =========================================================================================== This is the output of file, ldd and chart, respectively. Can you help to elaborate what does it mean by using "LD_PRELOAD"? It gives me an error when I invoke it by appending LD_PRELOAD with the path of python. LD_PRELOAD is an invalid command when I separate the two. $ cp cx_Oracle-5.0/build/lib*/*.so $PYTHONPATH $ which cx_Oracle.so /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so $ file `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: ELF-64 shared object file - IA64 $ ldd `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: libclntsh.so.11.1 => /opt/oracle/product/11.1.0/lib/libclntsh.so.11.1 libnnz11.so => /opt/oracle/product/11.1.0/lib/libnnz11.so libdl.so.1 => /usr/lib/hpux64/libdl.so.1 libm.so.1 => /usr/lib/hpux64/libm.so.1 libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1 libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1 libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1 libc.so.1 => /usr/lib/hpux64/libc.so.1 libxti.so.1 => /usr/lib/hpux64/libxti.so.1 libuca.so.1 => /usr/lib/hpux64/libuca.so.1 libdl.so.1 => /usr/lib/hpux64/libdl.so.1 $ chatr `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: 64-bit ELF shared library shared library dynamic path search: LD_LIBRARY_PATH enabled first SHLIB_PATH enabled second embedded path enabled third /opt/oracle/product/11.1.0/lib:/opt/oracle/product/11.1.0 shared library list: libclntsh.so.11.1 shared library mapped private disabled shared vtable support disabled explicit unloading enabled linkage table protection disabled segments: index type address flags size 7 text 4000000000000000 z---c- D (default) 8 data 6000000000000000 ---m-- D (default) kernel assisted branch prediction enabled lazy swap allocation for dynamic segments disabled nulptr dereferences trap disabled address space model: default caliper dynamic instrumentation disabled $ which python /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python $ LD_PRELOAD`which python` sh: LD_PRELOAD/home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python: not found. $ LD_PRELOAD `which python` sh: LD_PRELOAD: not found. Regards, Wah Meng -----Original Message----- From: inkblotter [mailto:ink...@gm...] Sent: Tuesday, September 20, 2011 5:10 AM To: cx-...@li... Subject: Re: [cx-oracle-users] cx_Oracle on HP-UX 11.31 ia64 built with aCC successfully but failed to load file /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so ldd /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so chatr /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so On Itaium you may need to invoke python as LD_PRELOAD<path to python> and at the python prompt "import cx_Oracle" If that fails try LD_PRELOAD $ORACLE_HOME/lib/libclntsh.so<path to python> and at the python prompt 'import cx_Oracle' On 09/19/2011 01:25 AM, Wong Wah Meng-R32813 wrote: > Hello there, > > I have tried to build cx_Oracle on the platform specified in the subject of this email. > > My python is built with 64-bit option, using aCC. The cx_Oracle can be built. However, when I import that module, it just cannot load and it did not give any explicit indication what goes wrong. Does anyone know why? > > > Regards, > > Wah Meng > > $ which python > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python > $ python setup.py build > running build > running build_ext > building 'cx_Oracle' extension > creating build > creating build/temp.hp-ux-B.11.31-ia64-2.7-11g > cc +DD64 -Olimit 1500 -g -DNDEBUG -O +z -I/opt/oracle/product/11.1.0/rdbms/demo -I/opt/oracle/product/11.1.0/rdbms/public -I/home/r32813/Build/2.7.1/Python-2.7.1/Include -I/home/r32813/Build/2.7.1/Python-2.7.1/Lib/.. -c cx_Oracle.c -o build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.0 > cc: warning 1913: `1500' does not exist or cannot be read > "Connection.c", line 1016: warning #4232-D: conversion from "ub4 *" to a more > strictly aligned type "void **" may cause misaligned access > (dvoid**)&cacheSize, 0, OCI_ATTR_STMTCACHESIZE, > ^ > > creating build/lib.hp-ux-B.11.31-ia64-2.7-11g > ld -b build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -L/opt/oracle/product/11.1.0/lib -L/opt/oracle/product/11.1.0 -lclntsh -o build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so > $ cp build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so $PYTHONPATH > $ env | grep PYTHON > PYTHONPATH=/home/r32813/Build/2.7.1/Python-2.7.1/Lib > $ python > Python 2.7.1 (r271:86832, Sep 19 2011, 14:12:09) [C] on hp-ux11 > Type "help", "copyright", "credits" or "license" for more information. > >>>> import cx_Oracle >>>> > Traceback (most recent call last): > File "<stdin>", line 1, in<module> > ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > >>>> > # swlist -l product | grep Compiler > > ACXX C.06.26.EVAL HP C/aC++ Compiler > C-ANSI-C C.06.26.EVAL HP C/aC++ Compiler > COMPLIBS B.11.31 Compiler Support Libraries > > > > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs& more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users Regards, Wah Meng Genesis Wafermap Support Ticket: To report a problem: http://dyno.freescale.net/Question/QuestionMain3.asp?location=zmy02&category=&tickettype=6820 To request a service: http://dyno.freescale.net/Question/Questionmain3.asp?location=74&category=2&tickettype=6819 Or if it is related to EWM or DSA: http://dyno.freescale.net/Question/Questionmain3.asp?location=ZMY02&tickettype=6539 |
From: Wong W. Meng-R. <r3...@fr...> - 2011-09-20 02:07:56
|
This is the output of file, ldd and chart, respectively. Can you help to elaborate what does it mean by using "LD_PRELOAD"? It gives me an error when I invoke it by appending LD_PRELOAD with the path of python. LD_PRELOAD is an invalid command when I separate the two. $ cp cx_Oracle-5.0/build/lib*/*.so $PYTHONPATH $ which cx_Oracle.so /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so $ file `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: ELF-64 shared object file - IA64 $ ldd `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: libclntsh.so.11.1 => /opt/oracle/product/11.1.0/lib/libclntsh.so.11.1 libnnz11.so => /opt/oracle/product/11.1.0/lib/libnnz11.so libdl.so.1 => /usr/lib/hpux64/libdl.so.1 libm.so.1 => /usr/lib/hpux64/libm.so.1 libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1 libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1 libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1 libc.so.1 => /usr/lib/hpux64/libc.so.1 libxti.so.1 => /usr/lib/hpux64/libxti.so.1 libuca.so.1 => /usr/lib/hpux64/libuca.so.1 libdl.so.1 => /usr/lib/hpux64/libdl.so.1 $ chatr `which cx_Oracle.so` /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so: 64-bit ELF shared library shared library dynamic path search: LD_LIBRARY_PATH enabled first SHLIB_PATH enabled second embedded path enabled third /opt/oracle/product/11.1.0/lib:/opt/oracle/product/11.1.0 shared library list: libclntsh.so.11.1 shared library mapped private disabled shared vtable support disabled explicit unloading enabled linkage table protection disabled segments: index type address flags size 7 text 4000000000000000 z---c- D (default) 8 data 6000000000000000 ---m-- D (default) kernel assisted branch prediction enabled lazy swap allocation for dynamic segments disabled nulptr dereferences trap disabled address space model: default caliper dynamic instrumentation disabled $ which python /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python $ LD_PRELOAD`which python` sh: LD_PRELOAD/home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python: not found. $ LD_PRELOAD `which python` sh: LD_PRELOAD: not found. Regards, Wah Meng -----Original Message----- From: inkblotter [mailto:ink...@gm...] Sent: Tuesday, September 20, 2011 5:10 AM To: cx-...@li... Subject: Re: [cx-oracle-users] cx_Oracle on HP-UX 11.31 ia64 built with aCC successfully but failed to load file /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so ldd /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so chatr /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so On Itaium you may need to invoke python as LD_PRELOAD<path to python> and at the python prompt "import cx_Oracle" If that fails try LD_PRELOAD $ORACLE_HOME/lib/libclntsh.so<path to python> and at the python prompt 'import cx_Oracle' On 09/19/2011 01:25 AM, Wong Wah Meng-R32813 wrote: > Hello there, > > I have tried to build cx_Oracle on the platform specified in the subject of this email. > > My python is built with 64-bit option, using aCC. The cx_Oracle can be built. However, when I import that module, it just cannot load and it did not give any explicit indication what goes wrong. Does anyone know why? > > > Regards, > > Wah Meng > > $ which python > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python > $ python setup.py build > running build > running build_ext > building 'cx_Oracle' extension > creating build > creating build/temp.hp-ux-B.11.31-ia64-2.7-11g > cc +DD64 -Olimit 1500 -g -DNDEBUG -O +z -I/opt/oracle/product/11.1.0/rdbms/demo -I/opt/oracle/product/11.1.0/rdbms/public -I/home/r32813/Build/2.7.1/Python-2.7.1/Include -I/home/r32813/Build/2.7.1/Python-2.7.1/Lib/.. -c cx_Oracle.c -o build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.0 > cc: warning 1913: `1500' does not exist or cannot be read > "Connection.c", line 1016: warning #4232-D: conversion from "ub4 *" to a more > strictly aligned type "void **" may cause misaligned access > (dvoid**)&cacheSize, 0, OCI_ATTR_STMTCACHESIZE, > ^ > > creating build/lib.hp-ux-B.11.31-ia64-2.7-11g > ld -b build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -L/opt/oracle/product/11.1.0/lib -L/opt/oracle/product/11.1.0 -lclntsh -o build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so > $ cp build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so $PYTHONPATH > $ env | grep PYTHON > PYTHONPATH=/home/r32813/Build/2.7.1/Python-2.7.1/Lib > $ python > Python 2.7.1 (r271:86832, Sep 19 2011, 14:12:09) [C] on hp-ux11 > Type "help", "copyright", "credits" or "license" for more information. > >>>> import cx_Oracle >>>> > Traceback (most recent call last): > File "<stdin>", line 1, in<module> > ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > >>>> > # swlist -l product | grep Compiler > > ACXX C.06.26.EVAL HP C/aC++ Compiler > C-ANSI-C C.06.26.EVAL HP C/aC++ Compiler > COMPLIBS B.11.31 Compiler Support Libraries > > > > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs& more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: inkblotter <ink...@gm...> - 2011-09-19 21:09:57
|
file /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so ldd /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so chatr /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so On Itaium you may need to invoke python as LD_PRELOAD<path to python> and at the python prompt "import cx_Oracle" If that fails try LD_PRELOAD $ORACLE_HOME/lib/libclntsh.so<path to python> and at the python prompt 'import cx_Oracle' On 09/19/2011 01:25 AM, Wong Wah Meng-R32813 wrote: > Hello there, > > I have tried to build cx_Oracle on the platform specified in the subject of this email. > > My python is built with 64-bit option, using aCC. The cx_Oracle can be built. However, when I import that module, it just cannot load and it did not give any explicit indication what goes wrong. Does anyone know why? > > > Regards, > > Wah Meng > > $ which python > /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python > $ python setup.py build > running build > running build_ext > building 'cx_Oracle' extension > creating build > creating build/temp.hp-ux-B.11.31-ia64-2.7-11g > cc +DD64 -Olimit 1500 -g -DNDEBUG -O +z -I/opt/oracle/product/11.1.0/rdbms/demo -I/opt/oracle/product/11.1.0/rdbms/public -I/home/r32813/Build/2.7.1/Python-2.7.1/Include -I/home/r32813/Build/2.7.1/Python-2.7.1/Lib/.. -c cx_Oracle.c -o build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.0 > cc: warning 1913: `1500' does not exist or cannot be read > "Connection.c", line 1016: warning #4232-D: conversion from "ub4 *" to a more > strictly aligned type "void **" may cause misaligned access > (dvoid**)&cacheSize, 0, OCI_ATTR_STMTCACHESIZE, > ^ > > creating build/lib.hp-ux-B.11.31-ia64-2.7-11g > ld -b build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -L/opt/oracle/product/11.1.0/lib -L/opt/oracle/product/11.1.0 -lclntsh -o build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so > $ cp build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so $PYTHONPATH > $ env | grep PYTHON > PYTHONPATH=/home/r32813/Build/2.7.1/Python-2.7.1/Lib > $ python > Python 2.7.1 (r271:86832, Sep 19 2011, 14:12:09) [C] on hp-ux11 > Type "help", "copyright", "credits" or "license" for more information. > >>>> import cx_Oracle >>>> > Traceback (most recent call last): > File "<stdin>", line 1, in<module> > ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so > >>>> > # swlist -l product | grep Compiler > > ACXX C.06.26.EVAL HP C/aC++ Compiler > C-ANSI-C C.06.26.EVAL HP C/aC++ Compiler > COMPLIBS B.11.31 Compiler Support Libraries > > > > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs& more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Wong W. Meng-R. <r3...@fr...> - 2011-09-19 06:26:09
|
Hello there, I have tried to build cx_Oracle on the platform specified in the subject of this email. My python is built with 64-bit option, using aCC. The cx_Oracle can be built. However, when I import that module, it just cannot load and it did not give any explicit indication what goes wrong. Does anyone know why? Regards, Wah Meng $ which python /home/r32813/Build/2.7.1/Python-2.7.1/Lib/../python $ python setup.py build running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.hp-ux-B.11.31-ia64-2.7-11g cc +DD64 -Olimit 1500 -g -DNDEBUG -O +z -I/opt/oracle/product/11.1.0/rdbms/demo -I/opt/oracle/product/11.1.0/rdbms/public -I/home/r32813/Build/2.7.1/Python-2.7.1/Include -I/home/r32813/Build/2.7.1/Python-2.7.1/Lib/.. -c cx_Oracle.c -o build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.0 cc: warning 1913: `1500' does not exist or cannot be read "Connection.c", line 1016: warning #4232-D: conversion from "ub4 *" to a more strictly aligned type "void **" may cause misaligned access (dvoid**) &cacheSize, 0, OCI_ATTR_STMTCACHESIZE, ^ creating build/lib.hp-ux-B.11.31-ia64-2.7-11g ld -b build/temp.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.o -L/opt/oracle/product/11.1.0/lib -L/opt/oracle/product/11.1.0 -lclntsh -o build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so $ cp build/lib.hp-ux-B.11.31-ia64-2.7-11g/cx_Oracle.so $PYTHONPATH $ env | grep PYTHON PYTHONPATH=/home/r32813/Build/2.7.1/Python-2.7.1/Lib $ python Python 2.7.1 (r271:86832, Sep 19 2011, 14:12:09) [C] on hp-ux11 Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: Failed to load /home/r32813/Build/2.7.1/Python-2.7.1/Lib/cx_Oracle.so >>> # swlist -l product | grep Compiler ACXX C.06.26.EVAL HP C/aC++ Compiler C-ANSI-C C.06.26.EVAL HP C/aC++ Compiler COMPLIBS B.11.31 Compiler Support Libraries |
From: Anthony T. <ant...@gm...> - 2011-09-05 13:44:38
|
Hi, Most of the errors you are noticing below are due to the fact that the encoding you are using does not support the characters included in the test suite. You will need to use an encoding that does support them -- like UTF8. export NLS_LANG=.NTF8 is what I happen to use. In addition, I downloaded and installed 11.2.0.2 on my Linux box and am now able to get the errors reported earlier -- so now I can look into why this is happening and hopefully find a solution! Stay tuned. :-) Anthony On Mon, Sep 5, 2011 at 3:51 AM, Mike Elson <Mik...@eu...> wrote: > Hello Anthony, > > Thanks for looking into this. > I ran the test suite and saw some Unicode related errors, see the relevant section pasted below. > > The client is Suse Linux, Python 2.7.2 cx_Oracle svn revision #359 (no modifications) and the > database server parameters are: > > NLS_LANGUAGE AMERICAN > NLS_TERRITORY AMERICA > NLS_CURRENCY $ > NLS_ISO_CURRENCY AMERICA > NLS_NUMERIC_CHARACTERS ., > NLS_CHARACTERSET WE8MSWIN1252 > NLS_CALENDAR GREGORIAN > NLS_DATE_FORMAT DD-MON-RR > NLS_DATE_LANGUAGE AMERICAN > NLS_SORT BINARY > NLS_TIME_FORMAT HH.MI.SSXFF AM > NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM > NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR > NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR > NLS_DUAL_CURRENCY $ > NLS_COMP BINARY > NLS_LENGTH_SEMANTICS BYTE > NLS_NCHAR_CONV_EXCP FALSE > NLS_NCHAR_CHARACTERSET UTF8 > NLS_RDBMS_VERSION 11.2.0.2.0 > > Output from "python setup.py test": > > Running tests in UnicodeVar.py > testBindDifferentVar (UnicodeVar.TestUnicodeVar) > test binding a different variable on second execution ... FAIL > testBindInOutSetInputSizesByType (UnicodeVar.TestUnicodeVar) > test binding in/out with set input sizes defined (by type) ... ERROR > testBindInOutUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) > test binding in/out a unicode array (with arrayvar) ... ERROR > testBindInOutVarDirectSet (UnicodeVar.TestUnicodeVar) > test binding in/out with cursor.var() method ... ERROR > testBindNull (UnicodeVar.TestUnicodeVar) > test binding in a null ... ok > testBindOutSetInputSizesByType (UnicodeVar.TestUnicodeVar) > test binding out with set input sizes defined (by type) ... FAIL > testBindOutUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) > test binding out a unicode array (with arrayvar) ... FAIL > testBindOutVar (UnicodeVar.TestUnicodeVar) > test binding out with cursor.var() method ... FAIL > testBindUnicode (UnicodeVar.TestUnicodeVar) > test binding in a unicode ... ERROR > testBindUnicodeAfterNumber (UnicodeVar.TestUnicodeVar) > test binding in a unicode after setting input sizes to a number ... ERROR > testBindUnicodeArrayBySizes (UnicodeVar.TestUnicodeVar) > test binding in a unicode array (with setinputsizes) ... ERROR > testBindUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) > test binding in a unicode array (with arrayvar) ... ERROR > testBindUnicodeArrayDirect (UnicodeVar.TestUnicodeVar) > test binding in a unicode array ... ERROR > testCursorDescription (UnicodeVar.TestUnicodeVar) > test cursor description is accurate ... FAIL > testFetchAll (UnicodeVar.TestUnicodeVar) > test that fetching all of the data returns the correct results ... FAIL > testFetchMany (UnicodeVar.TestUnicodeVar) > test that fetching data in chunks returns the correct results ... FAIL > testFetchOne (UnicodeVar.TestUnicodeVar) > test that fetching a single row returns the correct results ... FAIL > testUnicodeLength (UnicodeVar.TestUnicodeVar) > test value length ... ERROR > testUnicodeMaximumReached (UnicodeVar.TestUnicodeVar) > test that an error is raised when maximum unicode length exceeded ... ok > > ====================================================================== > ERROR: testBindInOutSetInputSizesByType (UnicodeVar.TestUnicodeVar) > test binding in/out with set input sizes defined (by type) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 162, in testBindInOutSetInputSizesByType > value = u"InVal \u3041") > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3041' in position 6: ordinal not in range(128) > > ====================================================================== > ERROR: testBindInOutUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) > test binding in/out a unicode array (with arrayvar) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 116, in testBindInOutUnicodeArrayByVar > array.setvalue(0, originalData) > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) > > ====================================================================== > ERROR: testBindInOutVarDirectSet (UnicodeVar.TestUnicodeVar) > test binding in/out with cursor.var() method > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 179, in testBindInOutVarDirectSet > var.setvalue(0, u"InVal \u3041") > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3041' in position 6: ordinal not in range(128) > > ====================================================================== > ERROR: testBindUnicode (UnicodeVar.TestUnicodeVar) > test binding in a unicode > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 36, in testBindUnicode > value = u"Unicode \u3042 5") > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) > > ====================================================================== > ERROR: testBindUnicodeAfterNumber (UnicodeVar.TestUnicodeVar) > test binding in a unicode after setting input sizes to a number > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 56, in testBindUnicodeAfterNumber > value = u"Unicode \u3042 6") > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) > > ====================================================================== > ERROR: testBindUnicodeArrayBySizes (UnicodeVar.TestUnicodeVar) > test binding in a unicode array (with setinputsizes) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 91, in testBindUnicodeArrayBySizes > array = array) > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) > > ====================================================================== > ERROR: testBindUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) > test binding in a unicode array (with arrayvar) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 98, in testBindUnicodeArrayByVar > array.setvalue(0, [r[1] for r in self.rawData]) > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) > > ====================================================================== > ERROR: testBindUnicodeArrayDirect (UnicodeVar.TestUnicodeVar) > test binding in a unicode array > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 71, in testBindUnicodeArrayDirect > array = array) > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) > > ====================================================================== > ERROR: testUnicodeLength (UnicodeVar.TestUnicodeVar) > test value length > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 28, in testUnicodeLength > retval = returnValue) > UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 6: ordinal not in range(128) > > ====================================================================== > FAIL: testBindDifferentVar (UnicodeVar.TestUnicodeVar) > test binding a different variable on second execution > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 45, in testBindDifferentVar > self.failUnlessEqual(retval_1.getvalue(), u"Called \u3042") > AssertionError: u'Called ?' != u'Called \u3042' > - Called ? > ? ^ > + Called \u3042 > ? ^ > > > ====================================================================== > FAIL: testBindOutSetInputSizesByType (UnicodeVar.TestUnicodeVar) > test binding out with set input sizes defined (by type) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 153, in testBindOutSetInputSizesByType > self.failUnlessEqual(vars["value"].getvalue(), u"TSI \u3042") > AssertionError: u'TSI ?' != u'TSI \u3042' > - TSI ? > ? ^ > + TSI \u3042 > ? ^ > > > ====================================================================== > FAIL: testBindOutUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) > test binding out a unicode array (with arrayvar) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 136, in testBindOutUnicodeArrayByVar > self.failUnlessEqual(array.getvalue(), expectedData) > AssertionError: Lists differ: [u'Test out element ? # 1', u'... != [u'Test out element \u3042 # 1... > > First differing element 0: > Test out element ? # 1 > Test out element \u3042 # 1 > > Diff is 720 characters long. Set self.maxDiff to None to see it. > > ====================================================================== > FAIL: testBindOutVar (UnicodeVar.TestUnicodeVar) > test binding out with cursor.var() method > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 174, in testBindOutVar > self.failUnlessEqual(var.getvalue(), u"TSI (VAR) \u3042") > AssertionError: u'TSI (VAR) ?' != u'TSI (VAR) \u3042' > - TSI (VAR) ? > ? ^ > + TSI (VAR) \u3042 > ? ^ > > > ====================================================================== > FAIL: testCursorDescription (UnicodeVar.TestUnicodeVar) > test cursor description is accurate > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 207, in testCursorDescription > ('NULLABLECOL', cx_Oracle.UNICODE, 50, 100, 0, 0, 1) ]) > AssertionError: Lists differ: [('INTCOL', <type 'cx_Oracle.N... != [('INTCOL', <type 'cx_Oracle.N... > > First differing element 1: > ('UNICODECOL', <type 'cx_Oracle.UNICODE'>, 20, 60, 0, 0, 0) > ('UNICODECOL', <type 'cx_Oracle.UNICODE'>, 20, 40, 0, 0, 0) > > Diff is 815 characters long. Set self.maxDiff to None to see it. > > ====================================================================== > FAIL: testFetchAll (UnicodeVar.TestUnicodeVar) > test that fetching all of the data returns the correct results > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 212, in testFetchAll > self.failUnlessEqual(self.cursor.fetchall(), self.rawData) > AssertionError: Lists differ: [(1, u'Unicode ? 1', u'Fixed U... != [(1, u'Unicode \u3042 1', u'Fi... > > First differing element 0: > (1, u'Unicode ? 1', u'Fixed Unicode 1 ', u'Nullable 1') > (1, u'Unicode \u3042 1', u'Fixed Unicode 1 ', u'Nullable 1') > > Diff is 1806 characters long. Set self.maxDiff to None to see it. > > ====================================================================== > FAIL: testFetchMany (UnicodeVar.TestUnicodeVar) > test that fetching data in chunks returns the correct results > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 218, in testFetchMany > self.failUnlessEqual(self.cursor.fetchmany(3), self.rawData[0:3]) > AssertionError: Lists differ: [(1, u'Unicode ? 1', u'Fixed U... != [(1, u'Unicode \u3042 1', u'Fi... > > First differing element 0: > (1, u'Unicode ? 1', u'Fixed Unicode 1 ', u'Nullable 1') > (1, u'Unicode \u3042 1', u'Fixed Unicode 1 ', u'Nullable 1') > > [(1, > - u'Unicode ? 1', > ? ^ > > + u'Unicode \u3042 1', > ? ^^^^^^ > > u'Fixed Unicode 1 ', > u'Nullable 1'), > - (2, u'Unicode ? 2', u'Fixed Unicode 2 ', None), > ? ^ > > + (2, u'Unicode \u3042 2', u'Fixed Unicode 2 ', None), > ? ^^^^^^ > > (3, > - u'Unicode ? 3', > ? ^ > > + u'Unicode \u3042 3', > ? ^^^^^^ > > u'Fixed Unicode 3 ', > u'Nullable 3')] > > > ====================================================================== > FAIL: testFetchOne (UnicodeVar.TestUnicodeVar) > test that fetching a single row returns the correct results > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "test/UnicodeVar.py", line 231, in testFetchOne > self.failUnlessEqual(self.cursor.fetchone(), self.dataByKey[3]) > AssertionError: Tuples differ: (3, u'Unicode ? 3', u'Fixed Un... != (3, u'Unicode \u3042 3', u'Fix... > > First differing element 1: > Unicode ? 3 > Unicode \u3042 3 > > - (3, u'Unicode ? 3', u'Fixed Unicode 3 ', u'Nullable 3') > + (3, > + u'Unicode \u3042 3', > + u'Fixed Unicode 3 ', > + u'Nullable 3') > > ---------------------------------------------------------------------- > Ran 19 tests in 5.071s > > > -----Original Message----- > From: Anthony Tuininga [mailto:ant...@gm...] > Sent: Friday, September 02, 2011 6:22 AM > To: cx-...@li... > Subject: Re: [cx-oracle-users] ORA-03127 > > 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 >> >> > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Mike E. <Mik...@eu...> - 2011-09-05 10:18:24
|
Hello Anthony, Thanks for looking into this. I ran the test suite and saw some Unicode related errors, see the relevant section pasted below. The client is Suse Linux, Python 2.7.2 cx_Oracle svn revision #359 (no modifications) and the database server parameters are: NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET WE8MSWIN1252 NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_NCHAR_CHARACTERSET UTF8 NLS_RDBMS_VERSION 11.2.0.2.0 Output from "python setup.py test": Running tests in UnicodeVar.py testBindDifferentVar (UnicodeVar.TestUnicodeVar) test binding a different variable on second execution ... FAIL testBindInOutSetInputSizesByType (UnicodeVar.TestUnicodeVar) test binding in/out with set input sizes defined (by type) ... ERROR testBindInOutUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) test binding in/out a unicode array (with arrayvar) ... ERROR testBindInOutVarDirectSet (UnicodeVar.TestUnicodeVar) test binding in/out with cursor.var() method ... ERROR testBindNull (UnicodeVar.TestUnicodeVar) test binding in a null ... ok testBindOutSetInputSizesByType (UnicodeVar.TestUnicodeVar) test binding out with set input sizes defined (by type) ... FAIL testBindOutUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) test binding out a unicode array (with arrayvar) ... FAIL testBindOutVar (UnicodeVar.TestUnicodeVar) test binding out with cursor.var() method ... FAIL testBindUnicode (UnicodeVar.TestUnicodeVar) test binding in a unicode ... ERROR testBindUnicodeAfterNumber (UnicodeVar.TestUnicodeVar) test binding in a unicode after setting input sizes to a number ... ERROR testBindUnicodeArrayBySizes (UnicodeVar.TestUnicodeVar) test binding in a unicode array (with setinputsizes) ... ERROR testBindUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) test binding in a unicode array (with arrayvar) ... ERROR testBindUnicodeArrayDirect (UnicodeVar.TestUnicodeVar) test binding in a unicode array ... ERROR testCursorDescription (UnicodeVar.TestUnicodeVar) test cursor description is accurate ... FAIL testFetchAll (UnicodeVar.TestUnicodeVar) test that fetching all of the data returns the correct results ... FAIL testFetchMany (UnicodeVar.TestUnicodeVar) test that fetching data in chunks returns the correct results ... FAIL testFetchOne (UnicodeVar.TestUnicodeVar) test that fetching a single row returns the correct results ... FAIL testUnicodeLength (UnicodeVar.TestUnicodeVar) test value length ... ERROR testUnicodeMaximumReached (UnicodeVar.TestUnicodeVar) test that an error is raised when maximum unicode length exceeded ... ok ====================================================================== ERROR: testBindInOutSetInputSizesByType (UnicodeVar.TestUnicodeVar) test binding in/out with set input sizes defined (by type) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 162, in testBindInOutSetInputSizesByType value = u"InVal \u3041") UnicodeEncodeError: 'ascii' codec can't encode character u'\u3041' in position 6: ordinal not in range(128) ====================================================================== ERROR: testBindInOutUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) test binding in/out a unicode array (with arrayvar) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 116, in testBindInOutUnicodeArrayByVar array.setvalue(0, originalData) UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) ====================================================================== ERROR: testBindInOutVarDirectSet (UnicodeVar.TestUnicodeVar) test binding in/out with cursor.var() method ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 179, in testBindInOutVarDirectSet var.setvalue(0, u"InVal \u3041") UnicodeEncodeError: 'ascii' codec can't encode character u'\u3041' in position 6: ordinal not in range(128) ====================================================================== ERROR: testBindUnicode (UnicodeVar.TestUnicodeVar) test binding in a unicode ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 36, in testBindUnicode value = u"Unicode \u3042 5") UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) ====================================================================== ERROR: testBindUnicodeAfterNumber (UnicodeVar.TestUnicodeVar) test binding in a unicode after setting input sizes to a number ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 56, in testBindUnicodeAfterNumber value = u"Unicode \u3042 6") UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) ====================================================================== ERROR: testBindUnicodeArrayBySizes (UnicodeVar.TestUnicodeVar) test binding in a unicode array (with setinputsizes) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 91, in testBindUnicodeArrayBySizes array = array) UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) ====================================================================== ERROR: testBindUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) test binding in a unicode array (with arrayvar) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 98, in testBindUnicodeArrayByVar array.setvalue(0, [r[1] for r in self.rawData]) UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) ====================================================================== ERROR: testBindUnicodeArrayDirect (UnicodeVar.TestUnicodeVar) test binding in a unicode array ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 71, in testBindUnicodeArrayDirect array = array) UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 8: ordinal not in range(128) ====================================================================== ERROR: testUnicodeLength (UnicodeVar.TestUnicodeVar) test value length ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 28, in testUnicodeLength retval = returnValue) UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 6: ordinal not in range(128) ====================================================================== FAIL: testBindDifferentVar (UnicodeVar.TestUnicodeVar) test binding a different variable on second execution ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 45, in testBindDifferentVar self.failUnlessEqual(retval_1.getvalue(), u"Called \u3042") AssertionError: u'Called ?' != u'Called \u3042' - Called ? ? ^ + Called \u3042 ? ^ ====================================================================== FAIL: testBindOutSetInputSizesByType (UnicodeVar.TestUnicodeVar) test binding out with set input sizes defined (by type) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 153, in testBindOutSetInputSizesByType self.failUnlessEqual(vars["value"].getvalue(), u"TSI \u3042") AssertionError: u'TSI ?' != u'TSI \u3042' - TSI ? ? ^ + TSI \u3042 ? ^ ====================================================================== FAIL: testBindOutUnicodeArrayByVar (UnicodeVar.TestUnicodeVar) test binding out a unicode array (with arrayvar) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 136, in testBindOutUnicodeArrayByVar self.failUnlessEqual(array.getvalue(), expectedData) AssertionError: Lists differ: [u'Test out element ? # 1', u'... != [u'Test out element \u3042 # 1... First differing element 0: Test out element ? # 1 Test out element \u3042 # 1 Diff is 720 characters long. Set self.maxDiff to None to see it. ====================================================================== FAIL: testBindOutVar (UnicodeVar.TestUnicodeVar) test binding out with cursor.var() method ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 174, in testBindOutVar self.failUnlessEqual(var.getvalue(), u"TSI (VAR) \u3042") AssertionError: u'TSI (VAR) ?' != u'TSI (VAR) \u3042' - TSI (VAR) ? ? ^ + TSI (VAR) \u3042 ? ^ ====================================================================== FAIL: testCursorDescription (UnicodeVar.TestUnicodeVar) test cursor description is accurate ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 207, in testCursorDescription ('NULLABLECOL', cx_Oracle.UNICODE, 50, 100, 0, 0, 1) ]) AssertionError: Lists differ: [('INTCOL', <type 'cx_Oracle.N... != [('INTCOL', <type 'cx_Oracle.N... First differing element 1: ('UNICODECOL', <type 'cx_Oracle.UNICODE'>, 20, 60, 0, 0, 0) ('UNICODECOL', <type 'cx_Oracle.UNICODE'>, 20, 40, 0, 0, 0) Diff is 815 characters long. Set self.maxDiff to None to see it. ====================================================================== FAIL: testFetchAll (UnicodeVar.TestUnicodeVar) test that fetching all of the data returns the correct results ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 212, in testFetchAll self.failUnlessEqual(self.cursor.fetchall(), self.rawData) AssertionError: Lists differ: [(1, u'Unicode ? 1', u'Fixed U... != [(1, u'Unicode \u3042 1', u'Fi... First differing element 0: (1, u'Unicode ? 1', u'Fixed Unicode 1 ', u'Nullable 1') (1, u'Unicode \u3042 1', u'Fixed Unicode 1 ', u'Nullable 1') Diff is 1806 characters long. Set self.maxDiff to None to see it. ====================================================================== FAIL: testFetchMany (UnicodeVar.TestUnicodeVar) test that fetching data in chunks returns the correct results ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 218, in testFetchMany self.failUnlessEqual(self.cursor.fetchmany(3), self.rawData[0:3]) AssertionError: Lists differ: [(1, u'Unicode ? 1', u'Fixed U... != [(1, u'Unicode \u3042 1', u'Fi... First differing element 0: (1, u'Unicode ? 1', u'Fixed Unicode 1 ', u'Nullable 1') (1, u'Unicode \u3042 1', u'Fixed Unicode 1 ', u'Nullable 1') [(1, - u'Unicode ? 1', ? ^ + u'Unicode \u3042 1', ? ^^^^^^ u'Fixed Unicode 1 ', u'Nullable 1'), - (2, u'Unicode ? 2', u'Fixed Unicode 2 ', None), ? ^ + (2, u'Unicode \u3042 2', u'Fixed Unicode 2 ', None), ? ^^^^^^ (3, - u'Unicode ? 3', ? ^ + u'Unicode \u3042 3', ? ^^^^^^ u'Fixed Unicode 3 ', u'Nullable 3')] ====================================================================== FAIL: testFetchOne (UnicodeVar.TestUnicodeVar) test that fetching a single row returns the correct results ---------------------------------------------------------------------- Traceback (most recent call last): File "test/UnicodeVar.py", line 231, in testFetchOne self.failUnlessEqual(self.cursor.fetchone(), self.dataByKey[3]) AssertionError: Tuples differ: (3, u'Unicode ? 3', u'Fixed Un... != (3, u'Unicode \u3042 3', u'Fix... First differing element 1: Unicode ? 3 Unicode \u3042 3 - (3, u'Unicode ? 3', u'Fixed Unicode 3 ', u'Nullable 3') + (3, + u'Unicode \u3042 3', + u'Fixed Unicode 3 ', + u'Nullable 3') ---------------------------------------------------------------------- Ran 19 tests in 5.071s -----Original Message----- From: Anthony Tuininga [mailto:ant...@gm...] Sent: Friday, September 02, 2011 6:22 AM To: cx-...@li... Subject: Re: [cx-oracle-users] ORA-03127 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 > > ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
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 > > |
From: Mike E. <Mik...@eu...> - 2011-08-29 14:36:19
|
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 > > > > > |
From: Matej R. <mr...@gm...> - 2011-08-29 07:43:07
|
Hello, I am using cx_Oracle 5.1 with Oracle 11g and I'm having some difficulties with retrieving NCLOB data from Objects. I have an object defined as: test_obj( id number, data NCLOB) While retrieving data from database, I get normal cx_Oracle.OBJECT, but when I try getattr(object, "data") I get the following error: cx_Oracle.NotSupportedError: ExternalObjectVar_GetAttributeValue(): unhandled data type 112 Is this not yet supported in cx_Oracle? Regards, Matej Repinc |
From: Anthony T. <ant...@gm...> - 2011-08-25 18:23:58
|
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 <sl...@gm...>: > 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-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Sławek E. <sl...@gm...> - 2011-08-25 12:13:49
|
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 |
From: <prz...@po...> - 2011-08-12 07:52:58
|
On Thu, Aug 11, 2011 at 02:13:16PM +0200, prz...@po... wrote: > Hello, > > I am trying to run some sql query using cx_oracle (CentOS). > When I run this query using sqlplus I get the result. > When I try to run the same query using cx_oracle I get: > Traceback (most recent call last): > File "./ar2-select.py", line 67, in <module> > order by 1") > cx_Oracle.DatabaseError: ORA-00937: not a single-group group function > > Can anybody tell me why is that ? Thank you for your answers: indeed I did some mistake rewriting this query into cx_oracle - I compared it again with the original query and found a mistake. Thanks again. Regards Przemek ---------------------------------------------------------------- Zarabiasz 4 tys./miesiac? Damy wiecej! Sprawdz >> http://linkint.pl/f2a0f |
From: Chris G. <chr...@to...> - 2011-08-11 18:44:37
|
It's very likely a problem with the query you're running - nothing to do with Python. But you don't show the query so impossible to say. Try running the same query in SQL*Plus On 11 August 2011 13:13, <prz...@po...> wrote: > Hello, > > I am trying to run some sql query using cx_oracle (CentOS). > When I run this query using sqlplus I get the result. > When I try to run the same query using cx_oracle I get: > Traceback (most recent call last): > File "./ar2-select.py", line 67, in <module> > order by 1") > cx_Oracle.DatabaseError: ORA-00937: not a single-group group function > > Can anybody tell me why is that ? > > Regards > Przemyslaw Bak (przemol) > -- > http://przemol.blogspot.com/ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------- > Najwieksza baza samochodow nowych i uzywanych > Sprawdz >> http://linkint.pl/f2a0b > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. > http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Andreas M. <and...@we...> - 2011-08-11 16:53:27
|
Hi, I guess there is a difference between the environment sqlplus is running in and cx_oracle. And that is causing some kind of implicit type conversion error. But who knows with this little sql snippet and information. Best regards Andreas Mock > -----Original Message----- > From: prz...@po... [mailto:prz...@po...] > Sent: Thursday, August 11, 2011 2:13 PM > To: cx-...@li... > Subject: [cx-oracle-users] ORA-00937: not a single-group group function > > Hello, > > I am trying to run some sql query using cx_oracle (CentOS). > When I run this query using sqlplus I get the result. > When I try to run the same query using cx_oracle I get: > Traceback (most recent call last): > File "./ar2-select.py", line 67, in <module> > order by 1") > cx_Oracle.DatabaseError: ORA-00937: not a single-group group function > > Can anybody tell me why is that ? > > Regards > Przemyslaw Bak (przemol) > -- > http://przemol.blogspot.com/ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------- > Najwieksza baza samochodow nowych i uzywanych > Sprawdz >> http://linkint.pl/f2a0b > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. > http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: <prz...@po...> - 2011-08-11 12:13:30
|
Hello, I am trying to run some sql query using cx_oracle (CentOS). When I run this query using sqlplus I get the result. When I try to run the same query using cx_oracle I get: Traceback (most recent call last): File "./ar2-select.py", line 67, in <module> order by 1") cx_Oracle.DatabaseError: ORA-00937: not a single-group group function Can anybody tell me why is that ? Regards Przemyslaw Bak (przemol) -- http://przemol.blogspot.com/ ---------------------------------------------------------------- Najwieksza baza samochodow nowych i uzywanych Sprawdz >> http://linkint.pl/f2a0b |
From: Anthony T. <ant...@gm...> - 2011-07-17 03:49:01
|
Hi, First, if you can at all do so, please upgrade to 10.2. It will make your life a whole lot simpler. :-) 10.1 will work with cx_Oracle BUT you cannot use the 10g release as I build against 10.2 and there are a few things that won't work properly because of the differences between the two releases. If you build yourself with the 10.1 client then it will build and work properly for you. You can make use of the 9i build if one is available but as you can see I no longer build those either so you'll have to find someone else to build for you as I no longer have 9i or 10.1 and I have no intention of installing them any longer. Sorry! See below for a few other notes. On Sat, Jul 16, 2011 at 3:23 AM, bagheera <neo...@go...> wrote: > > Hi, i need to use cx_oracle with oracle 10.1.0.4 client, but any recent > release doesn't work, i can't succesfully import cx_oracle. I have found > information that i might use cx_oracle for 9i, so i installed python 2.6.6 > and cx_oracle 4.4.1 for oracle 9i and it does work, i mean i can import > module. Unfortunatly i can't revice data from my queries. > > On most recent version of cx_oracle for oracle 10.2, python 2.7 my > query.fetchall() gives result: > > [('889476',), ('864365',), ('886811',), ('886054',), ('885968',)] > > but when i try to execute that on other machine, with oracle client 10.1, > python 2.6 and cx_oracle 4.4.1, i get: > > > cursor.execute(zapytanie) > [<cx_Oracle.STRING with value [None, None, None, None, None, None, None, > None, N > one, None, None, None, None, None, None, None, None, None, None, None, > None, Non > e, None, None, None, None, None, None, None, None, None, None, None, None, > None, > None, None, None, None, None, None, None, None, None, None, None, None, > None, N > one, None]>] Hmm, here you do an execute() whereas in the first one you do a fetchall(). Can you show the entire script? > now, what are my options, is there new cx_oracle compiled to work with > python 2.7 and oracle client 10.1? > or in previous versions of cx_oracle fetching data was completed in any > other way than in recent verions and i'm doing sth wrong? Perhaps. I know in newer versions of cx_Oracle you can do this: for row in cursor.execute(some_query) but in previous releases you had to do this: cursor.execute(some_query) for row in cursor Hope that helps at least a little! Anthony |
From: bagheera <neo...@go...> - 2011-07-16 09:29:20
|
Hi, i need to use cx_oracle with oracle 10.1.0.4 client, but any recent release doesn't work, i can't succesfully import cx_oracle. I have found information that i might use cx_oracle for 9i, so i installed python 2.6.6 and cx_oracle 4.4.1 for oracle 9i and it does work, i mean i can import module. Unfortunatly i can't revice data from my queries. On most recent version of cx_oracle for oracle 10.2, python 2.7 my query.fetchall() gives result: [('889476',), ('864365',), ('886811',), ('886054',), ('885968',)] but when i try to execute that on other machine, with oracle client 10.1, python 2.6 and cx_oracle 4.4.1, i get: >>> cursor.execute(zapytanie) [<cx_Oracle.STRING with value [None, None, None, None, None, None, None, None, N one, None, None, None, None, None, None, None, None, None, None, None, None, Non e, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, N one, None]>] now, what are my options, is there new cx_oracle compiled to work with python 2.7 and oracle client 10.1? or in previous versions of cx_oracle fetching data was completed in any other way than in recent verions and i'm doing sth wrong? -- Linux User |
From: bagheera <neo...@go...> - 2011-07-16 09:23:33
|
Hi, i need to use cx_oracle with oracle 10.1.0.4 client, but any recent release doesn't work, i can't succesfully import cx_oracle. I have found information that i might use cx_oracle for 9i, so i installed python 2.6.6 and cx_oracle 4.4.1 for oracle 9i and it does work, i mean i can import module. Unfortunatly i can't revice data from my queries. On most recent version of cx_oracle for oracle 10.2, python 2.7 my query.fetchall() gives result: [('889476',), ('864365',), ('886811',), ('886054',), ('885968',)] but when i try to execute that on other machine, with oracle client 10.1, python 2.6 and cx_oracle 4.4.1, i get: cursor.execute(zapytanie) [<cx_Oracle.STRING with value [None, None, None, None, None, None, None, None, N one, None, None, None, None, None, None, None, None, None, None, None, None, Non e, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, N one, None]>] now, what are my options, is there new cx_oracle compiled to work with python 2.7 and oracle client 10.1? or in previous versions of cx_oracle fetching data was completed in any other way than in recent verions and i'm doing sth wrong? -- Linux User |
From: bagheera <neo...@go...> - 2011-07-16 09:22:34
|
test -- Linux User |