cx-oracle-users Mailing List for cx_Oracle (Page 57)
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: Seth F. <se...@be...> - 2010-03-18 00:19:16
|
I've been looking around finding different sets of instructions for getting cx_Oracle installed on my Mac. I am hoping I don't need to do something drastic like change OS or python versions, but I'm running out of things to try. My environment is OS 10.5.8. Python 2.6.2. I've tried different variants of the oracle clients, 10, 11, instant client basic+sdk+sqlplus (and sqlplus is working). Does anyone have any insight into what might be wrong? seths-macbook-pro:appschecker seth$ python -c 'import cx_Oracle' Traceback (most recent call last): File "<string>", line 1, in <module> File "build/bdist.macosx-10.3-fat/egg/cx_Oracle.py", line 7, in <module> File "build/bdist.macosx-10.3-fat/egg/cx_Oracle.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/seth/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.3-fat.egg-tmp/cx_Oracle.so, 2): Symbol not found: _OCIAttrGet Referenced from: /Users/seth/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.3-fat.egg-tmp/cx_Oracle.so Expected in: dynamic lookup A hopeful thanks in advance, ~seth |
From: Anthony T. <ant...@gm...> - 2010-03-17 21:04:33
|
2010/3/17 juhui <ph...@gm...>: > thanks you all. > I added the apache user to dba group. it doesn't work. > I find the stupid xx set the directory permission to drwx------ 。。 > after change the related dirs permission。 > The error information changed! > > Unable to acquire Oracle environment handle > > is this issue cause by mismach cx_Oracle version and oracle client version? Possibly. Or it could be that you haven't set your ORACLE_HOME properly. Check all your environment variables as well as your compatibility. Anthony |
thanks you all. I added the apache user to dba group. it doesn't work. I find the stupid xx set the directory permission to drwx------ 。。 after change the related dirs permission。 *The error information changed!* Unable to acquire Oracle environment handle is this issue cause by mismach cx_Oracle version and oracle client version? 在 2010年3月17日 下午10:44,Graham Hagger <g.h...@gm...>写道: > >From the looks of things, Jani's suggestion - to add the apache user to > the dba group, should fix this issue. > > gpasswd -a apache dba > > then restart apache. > > 2010/3/17 juhui <ph...@gm...> > > I have added $ORACLE_HOME/lib to ld.so.conf when I install cx_oracle. and >> cx_Oracle runs well under python shell module . >> follow you advice I added these two lines to /etc/sysconfig/httpd >> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/oracle/product/10.2.0/lib:/usr/lib >> >> ORACLE_HOME=/home/oracle/product/10.2.0 >> then restart apache. >> >> the error still happen. >> :( >> >> 在 2010年3月17日 下午10:24,Graham Hagger <g.h...@gm...>写道: >> >> On a RHEL/CentOS system, add the path to the $ORACLE_HOME/lib directory to >>> /etc/ld.so.conf and run ldconfig as root. That'll ensure the libraries are >>> picked up correctly by 90% of the software that needs them. >>> >>> For apache to work properly (and thus php etc) set the appropriate >>> environment variables (ORACLE_HOME, TNS_ADMIN, NLS_LANG etc) in >>> /etc/sysconfig/httpd >>> >>> Hope that helps, >>> >>> Graham >>> >>> 2010/3/17 Jani Tiainen <re...@gm...> >>> >>> On 03/17/2010 03:53 PM, juhui wrote: >>>> > hi >>>> > >>>> > I am using a redhat-4 64 bit box. I have installed >>>> > apache+python+mod_python+django+cx_Oracle。 >>>> > >>>> > I can run import cx_Oracle in python shell model. And my project >>>> > depends on cx_Oracle runs well with manage.py runserver. >>>> > >>>> > when I try run Django project with apache+python_mod with oracle >>>> > database. I got MOD_PYTHON ERROR . >>>> > >>>> > the error info is: >>>> > >>>> > TemplateSyntaxError: Caught ImproperlyConfigured while rendering: >>>> > Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared >>>> > object file: No such file or directory >>>> > >>>> >>>> Your apache doesn't get all necessary environment variables to find >>>> Oracle shared libraries, namely libclntsh.so.10.1 this time. You might >>>> need to add to your apache config LD_LIBRARY_PATH (or somewhere else >>>> where apache will pick it up) to point your oracle installation dir. >>>> >>>> Also you might need ORACLE_HOME to point in the correct place as well. >>>> >>>> -- >>>> >>>> Jani Tiainen >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Download Intel® Parallel Studio Eval >>>> Try the new software tools for yourself. Speed compiling, find bugs >>>> proactively, and fine-tune applications for parallel performance. >>>> See why Intel Parallel Studio got high marks during beta. >>>> http://p.sf.net/sfu/intel-sw-dev >>>> _______________________________________________ >>>> cx-oracle-users mailing list >>>> cx-...@li... >>>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >>> >> >> >> -- >> LB can FlY >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > -- LB can FlY |
From: Graham H. <g.h...@gm...> - 2010-03-17 14:44:37
|
>From the looks of things, Jani's suggestion - to add the apache user to the dba group, should fix this issue. gpasswd -a apache dba then restart apache. 2010/3/17 juhui <ph...@gm...> > I have added $ORACLE_HOME/lib to ld.so.conf when I install cx_oracle. and > cx_Oracle runs well under python shell module . > follow you advice I added these two lines to /etc/sysconfig/httpd > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/oracle/product/10.2.0/lib:/usr/lib > > ORACLE_HOME=/home/oracle/product/10.2.0 > then restart apache. > > the error still happen. > :( > > 在 2010年3月17日 下午10:24,Graham Hagger <g.h...@gm...>写道: > > On a RHEL/CentOS system, add the path to the $ORACLE_HOME/lib directory to >> /etc/ld.so.conf and run ldconfig as root. That'll ensure the libraries are >> picked up correctly by 90% of the software that needs them. >> >> For apache to work properly (and thus php etc) set the appropriate >> environment variables (ORACLE_HOME, TNS_ADMIN, NLS_LANG etc) in >> /etc/sysconfig/httpd >> >> Hope that helps, >> >> Graham >> >> 2010/3/17 Jani Tiainen <re...@gm...> >> >> On 03/17/2010 03:53 PM, juhui wrote: >>> > hi >>> > >>> > I am using a redhat-4 64 bit box. I have installed >>> > apache+python+mod_python+django+cx_Oracle。 >>> > >>> > I can run import cx_Oracle in python shell model. And my project >>> > depends on cx_Oracle runs well with manage.py runserver. >>> > >>> > when I try run Django project with apache+python_mod with oracle >>> > database. I got MOD_PYTHON ERROR . >>> > >>> > the error info is: >>> > >>> > TemplateSyntaxError: Caught ImproperlyConfigured while rendering: >>> > Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared >>> > object file: No such file or directory >>> > >>> >>> Your apache doesn't get all necessary environment variables to find >>> Oracle shared libraries, namely libclntsh.so.10.1 this time. You might >>> need to add to your apache config LD_LIBRARY_PATH (or somewhere else >>> where apache will pick it up) to point your oracle installation dir. >>> >>> Also you might need ORACLE_HOME to point in the correct place as well. >>> >>> -- >>> >>> Jani Tiainen >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >> >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > -- > LB can FlY > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
I have added $ORACLE_HOME/lib to ld.so.conf when I install cx_oracle. and cx_Oracle runs well under python shell module . follow you advice I added these two lines to /etc/sysconfig/httpd LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/oracle/product/10.2.0/lib:/usr/lib ORACLE_HOME=/home/oracle/product/10.2.0 then restart apache. the error still happen. :( 在 2010年3月17日 下午10:24,Graham Hagger <g.h...@gm...>写道: > On a RHEL/CentOS system, add the path to the $ORACLE_HOME/lib directory to > /etc/ld.so.conf and run ldconfig as root. That'll ensure the libraries are > picked up correctly by 90% of the software that needs them. > > For apache to work properly (and thus php etc) set the appropriate > environment variables (ORACLE_HOME, TNS_ADMIN, NLS_LANG etc) in > /etc/sysconfig/httpd > > Hope that helps, > > Graham > > 2010/3/17 Jani Tiainen <re...@gm...> > > On 03/17/2010 03:53 PM, juhui wrote: >> > hi >> > >> > I am using a redhat-4 64 bit box. I have installed >> > apache+python+mod_python+django+cx_Oracle。 >> > >> > I can run import cx_Oracle in python shell model. And my project >> > depends on cx_Oracle runs well with manage.py runserver. >> > >> > when I try run Django project with apache+python_mod with oracle >> > database. I got MOD_PYTHON ERROR . >> > >> > the error info is: >> > >> > TemplateSyntaxError: Caught ImproperlyConfigured while rendering: >> > Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared >> > object file: No such file or directory >> > >> >> Your apache doesn't get all necessary environment variables to find >> Oracle shared libraries, namely libclntsh.so.10.1 this time. You might >> need to add to your apache config LD_LIBRARY_PATH (or somewhere else >> where apache will pick it up) to point your oracle installation dir. >> >> Also you might need ORACLE_HOME to point in the correct place as well. >> >> -- >> >> Jani Tiainen >> >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > -- LB can FlY |
From: Jani T. <re...@gm...> - 2010-03-17 14:27:15
|
On 03/17/2010 04:21 PM, juhui wrote: > thanks for you reply. > I have added > LD_LIBRARY_PATH & ORACLE_HOME to /etc/profile. > and the values are: > > ro...@la...:[/root]echo $LD_LIBRARY_PATH > /home/oracle/product/10.2.0/lib:/usr/lib > ro...@la...:[/root]echo $ORACLE_HOME > /home/oracle/product/10.2.0 > ro...@la...:[/root]ls -l > /home/oracle/product/10.2.0/lib/libclntsh.so.10.1 > -rwxr-x--- 1 oracle dba 21188349 May 13 2009 > /home/oracle/product/10.2.0/lib/libclntsh.so.10.1 > > is it Permission issue? > Exception Value: Error loading cx_Oracle module: libclntsh.so.10.1: > cannot open shared object file: Permission denied ^^^ As exception states... Most probably Apache runs under other user than oracle and that user is not part of dba group. So either expand permissions or add apache user to dba group. > > > 在 2010年3月17日 下午10:06,Jani Tiainen <re...@gm... > <mailto:re...@gm...>>写道: > > On 03/17/2010 03:53 PM, juhui wrote: > > hi > > > > I am using a redhat-4 64 bit box. I have installed > > apache+python+mod_python+django+cx_Oracle。 > > > > I can run import cx_Oracle in python shell model. And my project > > depends on cx_Oracle runs well with manage.py runserver. > > > > when I try run Django project with apache+python_mod with oracle > > database. I got MOD_PYTHON ERROR . > > > > the error info is: > > > > TemplateSyntaxError: Caught ImproperlyConfigured while rendering: > > Error loading cx_Oracle module: libclntsh.so.10.1: cannot open > shared > > object file: No such file or directory > > > > Your apache doesn't get all necessary environment variables to find > Oracle shared libraries, namely libclntsh.so.10.1 this time. You might > need to add to your apache config LD_LIBRARY_PATH (or somewhere else > where apache will pick it up) to point your oracle installation dir. > > Also you might need ORACLE_HOME to point in the correct place as well. > > -- > > Jani Tiainen > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > <mailto:cx-...@li...> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > -- > LB can FlY > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Graham H. <g.h...@gm...> - 2010-03-17 14:25:02
|
On a RHEL/CentOS system, add the path to the $ORACLE_HOME/lib directory to /etc/ld.so.conf and run ldconfig as root. That'll ensure the libraries are picked up correctly by 90% of the software that needs them. For apache to work properly (and thus php etc) set the appropriate environment variables (ORACLE_HOME, TNS_ADMIN, NLS_LANG etc) in /etc/sysconfig/httpd Hope that helps, Graham 2010/3/17 Jani Tiainen <re...@gm...> > On 03/17/2010 03:53 PM, juhui wrote: > > hi > > > > I am using a redhat-4 64 bit box. I have installed > > apache+python+mod_python+django+cx_Oracle。 > > > > I can run import cx_Oracle in python shell model. And my project > > depends on cx_Oracle runs well with manage.py runserver. > > > > when I try run Django project with apache+python_mod with oracle > > database. I got MOD_PYTHON ERROR . > > > > the error info is: > > > > TemplateSyntaxError: Caught ImproperlyConfigured while rendering: > > Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared > > object file: No such file or directory > > > > Your apache doesn't get all necessary environment variables to find > Oracle shared libraries, namely libclntsh.so.10.1 this time. You might > need to add to your apache config LD_LIBRARY_PATH (or somewhere else > where apache will pick it up) to point your oracle installation dir. > > Also you might need ORACLE_HOME to point in the correct place as well. > > -- > > Jani Tiainen > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
thanks for you reply. I have added LD_LIBRARY_PATH & ORACLE_HOME to /etc/profile. and the values are: ro...@la...:[/root]echo $LD_LIBRARY_PATH /home/oracle/product/10.2.0/lib:/usr/lib ro...@la...:[/root]echo $ORACLE_HOME /home/oracle/product/10.2.0 ro...@la...:[/root]ls -l /home/oracle/product/10.2.0/lib/libclntsh.so.10.1 -rwxr-x--- 1 oracle dba 21188349 May 13 2009 /home/oracle/product/10.2.0/lib/libclntsh.so.10.1 is it Permission issue? --------------------------------- traceback info below: --------------------------------- Environment: Request Method: GET Request URL: http://172.16.96.251/djangoapps/ Django Version: 1.2 beta 1 SVN-12801 Python Version: 2.6.0 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'djangoapps.out_resume'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/usr/local/djtrunk/django/core/handlers/base.py" in get_response 80. response = middleware_method(request) File "/usr/local/djtrunk/django/contrib/sessions/middleware.py" in process_request 10. engine = import_module(settings.SESSION_ENGINE) File "/usr/local/djtrunk/django/utils/importlib.py" in import_module 35. __import__(name) File "/usr/local/djtrunk/django/contrib/sessions/backends/db.py" in <module> 3. from django.contrib.sessions.models import Session File "/usr/local/djtrunk/django/contrib/sessions/models.py" in <module> 4. from django.db import models File "/usr/local/djtrunk/django/db/__init__.py" in <module> 75. connection = connections[DEFAULT_DB_ALIAS] File "/usr/local/djtrunk/django/db/utils.py" in __getitem__ 91. backend = load_backend(db['ENGINE']) File "/usr/local/djtrunk/django/db/utils.py" in load_backend 32. return import_module('.base', backend_name) File "/usr/local/djtrunk/django/utils/importlib.py" in import_module 35. __import__(name) File "/usr/local/djtrunk/django/db/backends/oracle/base.py" in <module> 27. raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e) Exception Type: ImproperlyConfigured at /djangoapps/ Exception Value: Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared object file: Permission denied 在 2010年3月17日 下午10:06,Jani Tiainen <re...@gm...>写道: > On 03/17/2010 03:53 PM, juhui wrote: > > hi > > > > I am using a redhat-4 64 bit box. I have installed > > apache+python+mod_python+django+cx_Oracle。 > > > > I can run import cx_Oracle in python shell model. And my project > > depends on cx_Oracle runs well with manage.py runserver. > > > > when I try run Django project with apache+python_mod with oracle > > database. I got MOD_PYTHON ERROR . > > > > the error info is: > > > > TemplateSyntaxError: Caught ImproperlyConfigured while rendering: > > Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared > > object file: No such file or directory > > > > Your apache doesn't get all necessary environment variables to find > Oracle shared libraries, namely libclntsh.so.10.1 this time. You might > need to add to your apache config LD_LIBRARY_PATH (or somewhere else > where apache will pick it up) to point your oracle installation dir. > > Also you might need ORACLE_HOME to point in the correct place as well. > > -- > > Jani Tiainen > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- LB can FlY |
From: Jani T. <re...@gm...> - 2010-03-17 14:07:10
|
On 03/17/2010 03:53 PM, juhui wrote: > hi > > I am using a redhat-4 64 bit box. I have installed > apache+python+mod_python+django+cx_Oracle。 > > I can run import cx_Oracle in python shell model. And my project > depends on cx_Oracle runs well with manage.py runserver. > > when I try run Django project with apache+python_mod with oracle > database. I got MOD_PYTHON ERROR . > > the error info is: > > TemplateSyntaxError: Caught ImproperlyConfigured while rendering: > Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared > object file: No such file or directory > Your apache doesn't get all necessary environment variables to find Oracle shared libraries, namely libclntsh.so.10.1 this time. You might need to add to your apache config LD_LIBRARY_PATH (or somewhere else where apache will pick it up) to point your oracle installation dir. Also you might need ORACLE_HOME to point in the correct place as well. -- Jani Tiainen |
From: juhui <ph...@gm...> - 2010-03-17 13:53:41
|
hi I am using a redhat-4 64 bit box. I have installed apache+python+mod_python+django+cx_Oracle。 I can run import cx_Oracle in python shell model. And my project depends on cx_Oracle runs well with manage.py runserver. when I try run Django project with apache+python_mod with oracle database. I got MOD_PYTHON ERROR . the error info is: TemplateSyntaxError: Caught ImproperlyConfigured while rendering: Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared object file: No such file or directory any Idea? -- LB can FlY |
From: Michael B. <mi...@zz...> - 2010-03-15 15:34:03
|
Anthony Tuininga wrote: > Well, the reason this mode was added is partly historical. While I was > converting the internals of cx_Oracle to be able to support Python 3.x > and Unicode I decided that the best way to do so was to add this mode > so that I could test everything in Python 2.x before even having to > consider Python 3.x and its own set of quirks. That worked out very > well and I decided to leave it in place as a convenience to those who > wish to use Unicode throughout without porting to Python 3.x. When I learned about this flag, it seemed apparent to me that the mode was created just to test Py3's behavior under 2x, and in that sense it is appropriate that it work the way it does. The issue I have is that one of my users feels that this mode must be used in a production Python 2.x application. I'm not aware of what the rationale would be for this. I'd rather not have SQLAlchemy needing to support this mode of operation in 2x (note that in 3x, all strings are unicodes by default so it is not an issue on that side), since it adds some conditionals to the internals that are superfluous in almost all cases. My fear is that this user thinks the only way to get "unicode" back in results (for their other cx_oracle, non-SQLAlchemy applications running in the same environment) is through this flag, which as you've mentioned below is not the case. So perhaps something helpful here would be some documentation note from the creator of cx_oracle that WITH_UNICODE mode doesn't buy you anything in a production application that you can't get in easier ways, its only for a specific kind of testing. > I'm not sure what you are referring to with the > "rigidity and arguable bugginess on the connect/statement/bind > parameter side" > but be aware that Oracle has a "unicode" mode and in > that mode only Unicode data will be accepted. If I were to accept > strings I would have to convert them to Unicode in some fashion -- and > that implies knowing the encoding which I can't claim to know. It is rigid in that even the strings passed to connect() cannot be plain Python strings, nor can the statements passed to execute() - strings that in the overwhelmingly vast majority of cases will be simple ascii values. I am not aware of any other driver with this limitation, including some that are all-unicode, such as Pysqlite. It is standard practice for a unicode aware application to treat plain bytestrings as ascii (or whatever the default encoding of the interpreter is set up with). If the bytestring contains non-ascii then it raises an error. Running the string through the unicode() builtin with no other arguments provides this effect. It is "arguably buggy" regarding my previous test case, passing in a plain bytestring returns back a hex-encoded string in a roundtrip, and not the exact same thing you passed in. I'm not too concerned about it but you can be sure that others would find it to be surprising. Based on my experience with Python drivers, the ideal "unicode" behavior includes that Python unicode objects are accepted for all operations, including the connect arguments, the statement, and the bind parameter keys and values, in which case the underlying mechanics of Oracle encoding handle the details. But arguments passed as strings are decoded from the platform's default encoding, using unicode(x) or similar, and will immediately raise if this is not the case. All result strings are returned as unicode regardless of source. Drivers which provide this behavior include Pysqlite, pg8000, and pyodbc. These are the easiest drivers for us to support in SQLAlchemy w.r.t encoding issues. > Note that there is another solution to getting all data returned as > Unicode if that is what is desired. You can use "normal" or > "non-Unicode" mode and simply specify a connection output type handler > that tells cx_Oracle that all strings should be returned as Unicode. > See the sample "ReturnUnicode.py" as an example. In that case, > cx_Oracle will insist upon strings for connect strings, SQL > statements, etc. -- but will accept Unicode for bind parameters and > will return Unicode in result sets. Again, this is simply due to the > way that the OCI deals with Unicode for what it terms "metadata". This is good to know and I will look into using this method for SQLAlchemy's default behavior with Oracle, as anything that removes the need for us to encode/decode on the Python side improves performance for us. thanks for your answers ! - mike |
From: Anthony T. <ant...@gm...> - 2010-03-15 14:32:51
|
On Sat, Mar 13, 2010 at 1:54 PM, Michael Bayer <mi...@zz...> wrote: > First, a bug report involving WITH_UNICODE mode. I only am familiar with this option as one of my users (i.e. of SQLAlchemy) insists he must use this mode in production. > > cx_Oracle is generally pretty good at loudly rejecting non-unicode objects in this mode, unless you send across a string as a bind: > > import cx_Oracle > > conn = cx_Oracle.connect( > dsn = u'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.248.131)(PORT=1521)))(CONNECT_DATA=(SID=xe)))', > password=u'tiger', > user=u'scott' > ) > > cursor = conn.cursor() > > cursor.execute(u"select :name from dual", {'name':u'some name'}) > result = cursor.fetchall()[0][0] > assert result == u'some name', result # passes > > cursor.execute(u"select :name from dual", {'name':'some name'}) > result = cursor.fetchall()[0][0] > assert result == u'some name', result # does not raise an exception. Returns: 736F6D65206E616D65 > > > In SQLAlchemy, we're going to ensure that a plain string never gets passed, but it still seems inconsistent and dangerous that cx_Oracle simply corrupts the data in some circumstances. For this reason I'm planning on having SQLA issue a huge warning when the presence of this flag is detected, that they must never stray from the confines of SQLA's bind handling or fear the wrath of odd hex-encoded data being generated without their knowledge. Ok, this is not a "bug" but a "feature". :-) In Python 3.x strings are considered "binary" data and so Python 2.x in Unicode mode is doing the same. That could, however, be turned off and in Unicode mode insist that buffer objects be passed -- or the call to cx_Oracle.Binary() be used. I'd appreciate other people's feedback on whether this would be considered an improvement or not. I can see both sides of the argument, though. > Secondly, detecting that WITH_UNICODE was used is a trick ! Right now I just check that the version >= 5 and that cx_Oracle.UNICODE does not exist. It would be nice if an explicit bit of information were available to detect this mode. That is the only way to do so, currently. I could add a "WITH_UNICODE" boolean flag at the module level if that would be considered helpful. > and thirdly, *why* is this mode, in its current form, even available in Python 2.x ? The fact that it returns Python unicodes in result sets in all cases is great, and very useful. But the rigidity and arguable bugginess on the connect/statement/bind parameter side doesn't seem to have any clear rationale. It would be more performant and easier on the outside world if the unicode(x) call took place within cx_oracle's native guts and not within pure-Python libraries that wish to sanitize input. Well, the reason this mode was added is partly historical. While I was converting the internals of cx_Oracle to be able to support Python 3.x and Unicode I decided that the best way to do so was to add this mode so that I could test everything in Python 2.x before even having to consider Python 3.x and its own set of quirks. That worked out very well and I decided to leave it in place as a convenience to those who wish to use Unicode throughout without porting to Python 3.x. That is also the primary reason for allowing strings to be treated as binary data in Unicode mode. I'm not sure what you are referring to with the "rigidity and arguable bugginess on the connect/statement/bind parameter side" but be aware that Oracle has a "unicode" mode and in that mode only Unicode data will be accepted. If I were to accept strings I would have to convert them to Unicode in some fashion -- and that implies knowing the encoding which I can't claim to know. Thus the reason for in Unicode mode ONLY accepting Unicode data and all strings are therefore treated as binary data. Maybe that will help you understand the decisions made and the reasons behind some of the "rigidity". Note that there is another solution to getting all data returned as Unicode if that is what is desired. You can use "normal" or "non-Unicode" mode and simply specify a connection output type handler that tells cx_Oracle that all strings should be returned as Unicode. See the sample "ReturnUnicode.py" as an example. In that case, cx_Oracle will insist upon strings for connect strings, SQL statements, etc. -- but will accept Unicode for bind parameters and will return Unicode in result sets. Again, this is simply due to the way that the OCI deals with Unicode for what it terms "metadata". Hopefully I've helped answer your questions and concerns! Anthony |
From: Michael B. <mi...@zz...> - 2010-03-13 21:21:22
|
First, a bug report involving WITH_UNICODE mode. I only am familiar with this option as one of my users (i.e. of SQLAlchemy) insists he must use this mode in production. cx_Oracle is generally pretty good at loudly rejecting non-unicode objects in this mode, unless you send across a string as a bind: import cx_Oracle conn = cx_Oracle.connect( dsn = u'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.248.131)(PORT=1521)))(CONNECT_DATA=(SID=xe)))', password=u'tiger', user=u'scott' ) cursor = conn.cursor() cursor.execute(u"select :name from dual", {'name':u'some name'}) result = cursor.fetchall()[0][0] assert result == u'some name', result # passes cursor.execute(u"select :name from dual", {'name':'some name'}) result = cursor.fetchall()[0][0] assert result == u'some name', result # does not raise an exception. Returns: 736F6D65206E616D65 In SQLAlchemy, we're going to ensure that a plain string never gets passed, but it still seems inconsistent and dangerous that cx_Oracle simply corrupts the data in some circumstances. For this reason I'm planning on having SQLA issue a huge warning when the presence of this flag is detected, that they must never stray from the confines of SQLA's bind handling or fear the wrath of odd hex-encoded data being generated without their knowledge. Secondly, detecting that WITH_UNICODE was used is a trick ! Right now I just check that the version >= 5 and that cx_Oracle.UNICODE does not exist. It would be nice if an explicit bit of information were available to detect this mode. and thirdly, *why* is this mode, in its current form, even available in Python 2.x ? The fact that it returns Python unicodes in result sets in all cases is great, and very useful. But the rigidity and arguable bugginess on the connect/statement/bind parameter side doesn't seem to have any clear rationale. It would be more performant and easier on the outside world if the unicode(x) call took place within cx_oracle's native guts and not within pure-Python libraries that wish to sanitize input. - mike |
From: Anthony T. <ant...@gm...> - 2010-02-16 03:53:23
|
On Sun, Feb 14, 2010 at 1:08 AM, Mark Harrison <mh...@pi...> wrote: > Of course, we all know that cx_Oracle is the best thing > since sliced bread for Oracle users. :-) > But did you know that cx_OracleTools is the best thing since > cx_Oracle? :-) :-) > We've been tidying up some of our installation procedures, > and I noticed that there's not an installation script > for cx_OracleTools. > > Here's one. it does a couple of things besides the obvious > one of copying files to some public area: > > 1. it renames the files from Tool.py to Tool. > > 2. it puts Options.py into $LIB/cx_OracleTools/Options.py > for tidyness' sake. > > 3. it adds a #! line. > > I also fixed up <raise "msg"> to <raise Exception("msg")> > for 2.6 happiness. Patches attached. Hi Mark, I've already made these changes (switching from string based exception to Exception based exceptions) in Subversion trunk. In addition, I have the ability (using cx_Freeze) to generate binaries that can be installed -- either raw binaries or as an MSI package on Windows or an RPM package on Linux. Its been WAAAY too long since I have released a new version of cx_OracleTools. I keep planning on doing one but something else keeps getting in the way. :-) Hopefully I'll have a chance to do so sometime relatively soon..... I just need to finish off what I'm up to now and not find something else to do before I'm finished! :-) Please take a look at what I have in Subversion trunk right now and let me know if any of your changes would still be preferable. I did a quick scan myself but I may have missed something. Thanks! Anthony |
From: Mark H. <mh...@pi...> - 2010-02-14 08:43:14
|
Of course, we all know that cx_Oracle is the best thing since sliced bread for Oracle users. But did you know that cx_OracleTools is the best thing since cx_Oracle? We've been tidying up some of our installation procedures, and I noticed that there's not an installation script for cx_OracleTools. Here's one. it does a couple of things besides the obvious one of copying files to some public area: 1. it renames the files from Tool.py to Tool. 2. it puts Options.py into $LIB/cx_OracleTools/Options.py for tidyness' sake. 3. it adds a #! line. I also fixed up <raise "msg"> to <raise Exception("msg")> for 2.6 happiness. Patches attached. |
From: Anthony T. <ant...@gm...> - 2010-02-08 15:09:58
|
On Sun, Feb 7, 2010 at 3:43 AM, Doug Henderson <djh...@te...> wrote: > On 2010-02-04 23:23, Anthony Tuininga wrote: >> What is cx_Oracle? >> >> cx_Oracle is a Python extension module that allows access to Oracle and >> conforms to the Python database API 2.0 specifications with a few >> exceptions. >> >> >> Where do I get it? >> >> http://cx-oracle.sourceforge.net >> >> >> What's new? >> >> 1) Added support for 64-bit Windows. >> >> 2) Added support for Python 3.1 and dropped support for Python 3.0. >> >> 3) Added support for keyword arguments in cursor.callproc() and >> cursor.callfunc(). >> >> 4) Added documentation for the UNICODE and FIXED_UNICODE variable types. >> >> 5) Added extra link arguments required for Mac OS X as suggested by >> Jason Woodward. >> >> 6) Added additional error codes to the list of error codes that raise >> OperationalError rather than DatabaseError. >> >> 7) Fixed calculation of display size for strings with national >> database character sets that are not the default AL16UTF16. >> >> 8) Moved the resetting of the setinputsizes flag before the binding >> takes place so that if an error takes place and a new statement is >> prepared subsequently, spurious errors will not occur. >> >> 9) Fixed compilation with Oracle 10g Release 1. >> >> 10) Tweaked documentation based on feedback from a number of people. >> >> 11) Added support for running the test suite using "python setup.py test" >> >> 12) Added support for setting the CLIENT_IDENTIFIER value in the >> v$session table for connections. >> >> 13) Added exception when attempting to call executemany() with arrays >> which is not supported by the OCI. >> >> 14) Fixed bug when converting from decimal would result in OCI-22062 >> because the locale decimal point was not a period. Thanks to Amaury >> Forgeot d'Arc for the solution to this problem. >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > Anthony, > > At least some of the cx_Oracle 5.0.3 windows installers that I > downloaded from sourceforge are missing the cx_Oracle.pyd file. I tried > cx_Oracle-5.0.3-10g.win32-py2.6.msi and > cx_Oracle-5.0.3-11g.win32-py2.6.msi. The .MSI files are 32KB smaller > than the 5.0.2 versions. Also, 7-Zip shows that this file is missing > from the archives. Yes, as it turns out all of the Windows installers had the same problem. Argh! This is thanks to the fact that I am using a custom build directory and there is a bug in distutils that prevents this from being seen when building an MSI or an RPM. The RPM packages are built on a virtual machine at home since I use Fedora there, not CentOS -- so they weren't affected. At work, though, I was given a new machine and I forgot to fix the bug before making the release. My apologies for the difficulties. I'd love to see this bug fixed: http://bugs.python.org/issue1109963 Anthony |
From: Doug H. <djh...@te...> - 2010-02-07 10:58:33
|
On 2010-02-04 23:23, Anthony Tuininga wrote: > What is cx_Oracle? > > cx_Oracle is a Python extension module that allows access to Oracle and > conforms to the Python database API 2.0 specifications with a few > exceptions. > > > Where do I get it? > > http://cx-oracle.sourceforge.net > > > What's new? > > 1) Added support for 64-bit Windows. > > 2) Added support for Python 3.1 and dropped support for Python 3.0. > > 3) Added support for keyword arguments in cursor.callproc() and > cursor.callfunc(). > > 4) Added documentation for the UNICODE and FIXED_UNICODE variable types. > > 5) Added extra link arguments required for Mac OS X as suggested by > Jason Woodward. > > 6) Added additional error codes to the list of error codes that raise > OperationalError rather than DatabaseError. > > 7) Fixed calculation of display size for strings with national > database character sets that are not the default AL16UTF16. > > 8) Moved the resetting of the setinputsizes flag before the binding > takes place so that if an error takes place and a new statement is > prepared subsequently, spurious errors will not occur. > > 9) Fixed compilation with Oracle 10g Release 1. > > 10) Tweaked documentation based on feedback from a number of people. > > 11) Added support for running the test suite using "python setup.py test" > > 12) Added support for setting the CLIENT_IDENTIFIER value in the > v$session table for connections. > > 13) Added exception when attempting to call executemany() with arrays > which is not supported by the OCI. > > 14) Fixed bug when converting from decimal would result in OCI-22062 > because the locale decimal point was not a period. Thanks to Amaury > Forgeot d'Arc for the solution to this problem. > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > Anthony, At least some of the cx_Oracle 5.0.3 windows installers that I downloaded from sourceforge are missing the cx_Oracle.pyd file. I tried cx_Oracle-5.0.3-10g.win32-py2.6.msi and cx_Oracle-5.0.3-11g.win32-py2.6.msi. The .MSI files are 32KB smaller than the 5.0.2 versions. Also, 7-Zip shows that this file is missing from the archives. TIA, Doug -- Doug Henderson Calgary, Alberta, Canada |
From: Anthony T. <ant...@gm...> - 2010-02-05 06:24:01
|
What is cx_Oracle? cx_Oracle is a Python extension module that allows access to Oracle and conforms to the Python database API 2.0 specifications with a few exceptions. Where do I get it? http://cx-oracle.sourceforge.net What's new? 1) Added support for 64-bit Windows. 2) Added support for Python 3.1 and dropped support for Python 3.0. 3) Added support for keyword arguments in cursor.callproc() and cursor.callfunc(). 4) Added documentation for the UNICODE and FIXED_UNICODE variable types. 5) Added extra link arguments required for Mac OS X as suggested by Jason Woodward. 6) Added additional error codes to the list of error codes that raise OperationalError rather than DatabaseError. 7) Fixed calculation of display size for strings with national database character sets that are not the default AL16UTF16. 8) Moved the resetting of the setinputsizes flag before the binding takes place so that if an error takes place and a new statement is prepared subsequently, spurious errors will not occur. 9) Fixed compilation with Oracle 10g Release 1. 10) Tweaked documentation based on feedback from a number of people. 11) Added support for running the test suite using "python setup.py test" 12) Added support for setting the CLIENT_IDENTIFIER value in the v$session table for connections. 13) Added exception when attempting to call executemany() with arrays which is not supported by the OCI. 14) Fixed bug when converting from decimal would result in OCI-22062 because the locale decimal point was not a period. Thanks to Amaury Forgeot d'Arc for the solution to this problem. |
From: Anthony T. <ant...@gm...> - 2010-02-04 17:47:28
|
Hi, Currently the only way to return Oracle objects is via select statements. There is no mechanism to define the output area which is what is needed to be able to populate OUT objects from PL/SQL. Its on my list of things to do -- but my list is very long and since I don't have any current need for it myself it tends to settle towards the bottom of the pile, unfortunately. That said, its the top priority major item in my opinion. I have always been interested in advanced queuing myself and this question has come up many times over the past years. Short answer: not anytime in the next couple of months but I should have more time available in the summer anyway -- crossing fingers and toes! :-) Anthony On Thu, Feb 4, 2010 at 4:31 AM, Pablo Stapff <pab...@gm...> wrote: > Hi again, > > I saw a similar question from 2005, so I would like to know if > something changed in the meantime: > > We want to use python with Oracle Advanced Queuing, and I would like > to know if it possible (and how) to return oracle objects in python > bind variables. I saw tests returning objects from selects but nothing > from PL/SQL blocks. > > In the following example the message is returned using each attribute, > and I would like to return the whole message as an object > > The message definition: > > CREATE TYPE message_resp_typ AS object( > success NUMBER, > stdout BLOB, > stderr BLOB, > attachment BLOB > ) > / > > the python code: > > c = db.cursor() > l_success = c.var(cx_Oracle.NUMBER) > l_stdout = c.var(cx_Oracle.BLOB) > l_stderr = c.var(cx_Oracle.BLOB) > l_attachment = c.var(cx_Oracle.BLOB) > c.execute(''' > DECLARE > dequeue_options DBMS_AQ.dequeue_options_t; > message_properties DBMS_AQ.message_properties_t; > message_handle RAW(16); > message message_resp_typ; > BEGIN > dequeue_options.navigation := DBMS_AQ.FIRST_MESSAGE; > dequeue_options.correlation := :v_correlation; > DBMS_AQ.DEQUEUE( > queue_name => :v_queue, > dequeue_options => dequeue_options, > message_properties => message_properties, > payload => message, > msgid => message_handle); > :v_success := message.success; > :v_stdout := message.stdout; > :v_stderr := message.stderr; > :v_attachment := message.attachment; > END;''', > v_queue = queue, > v_correlation = id, > v_success = l_success, > v_stdout = l_stdout, > v_stderr = l_stderr, > v_attachment = l_attachment > ) > > Can please someone give me some advice or an example? > > Thanks in advance > Pablo > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Pablo S. <pab...@gm...> - 2010-02-04 11:31:47
|
Hi again, I saw a similar question from 2005, so I would like to know if something changed in the meantime: We want to use python with Oracle Advanced Queuing, and I would like to know if it possible (and how) to return oracle objects in python bind variables. I saw tests returning objects from selects but nothing from PL/SQL blocks. In the following example the message is returned using each attribute, and I would like to return the whole message as an object The message definition: CREATE TYPE message_resp_typ AS object( success NUMBER, stdout BLOB, stderr BLOB, attachment BLOB ) / the python code: c = db.cursor() l_success = c.var(cx_Oracle.NUMBER) l_stdout = c.var(cx_Oracle.BLOB) l_stderr = c.var(cx_Oracle.BLOB) l_attachment = c.var(cx_Oracle.BLOB) c.execute(''' DECLARE dequeue_options DBMS_AQ.dequeue_options_t; message_properties DBMS_AQ.message_properties_t; message_handle RAW(16); message message_resp_typ; BEGIN dequeue_options.navigation := DBMS_AQ.FIRST_MESSAGE; dequeue_options.correlation := :v_correlation; DBMS_AQ.DEQUEUE( queue_name => :v_queue, dequeue_options => dequeue_options, message_properties => message_properties, payload => message, msgid => message_handle); :v_success := message.success; :v_stdout := message.stdout; :v_stderr := message.stderr; :v_attachment := message.attachment; END;''', v_queue = queue, v_correlation = id, v_success = l_success, v_stdout = l_stdout, v_stderr = l_stderr, v_attachment = l_attachment ) Can please someone give me some advice or an example? Thanks in advance Pablo |
From: László M. <la...@mo...> - 2010-01-29 15:49:51
|
On Fri, Jan 29, 2010 at 3:35 PM, Anthony Tuininga <ant...@gm...> wrote: > On Fri, Jan 29, 2010 at 7:02 AM, László Monda <la...@mo...> wrote: >> Yeah, I use the 32 bit version of Oracle XE because 1) I couldn't find >> the bloody download link for the 64 bit version and because 2) I've >> heard that the 64 bit version of Oracle is pretty damn instable. > > Hmm, I haven't heard that the 64-bit version of Oracle is unstable. We > use it here at work and it seems to work just fine. If you have links > that suggest otherwise I'd be happy to read them -- rather than > discover them first hand. :-) I don't know about the specific issues personally, but I've heard about them from a colleague who is pretty experienced about Oracle related issues. >> In the meantime I've managed to solve the issue by using the RPM as >> outlined in http://monda.hu/blog/2010/01/29/installing-cx_oracle-on-ubuntu-karmic-koala-64-bit/ >> but I'm still interested in how to build it from source. > > Sure. You installed a 64-bit client and you are using that. You could > build from source using that as well. Just make sure you also have the > instant client development package installed as well. > > The main point is that you must use a 32-bit Python, 32-bit Oracle > client and 32-bit cx_Oracle or a 64-bit Python, 64-bit Oracle client > and 64-bit cx_Oracle. You can't mix and match. Considering the devastating effect of all the suckage I faced today, I'd rather ignore this one as I succeeded to install cx_Oracle using the rpm :) Thank you and take care! > Anthony > >> On Fri, Jan 29, 2010 at 5:27 AM, Anthony Tuininga >> <ant...@gm...> wrote: >>> Hmm, looks like perhaps you have the 32-bit version of Oracle XE? Note >>> the message about skipping an incompatible library. >>> >>> On Thu, Jan 28, 2010 at 4:05 PM, László Monda <la...@mo...> wrote: >>>> Hi List, >>>> >>>> I'm using Ubuntu Linux, Karmic Koala, the 64 bit version and Oracle XE >>>> 10.2.0.1.0 >>>> >>>> Here's what "python setup.py build" outputs: >>>> >>>> running build >>>> running build_ext >>>> building 'cx_Oracle' extension >>>> gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >>>> build/temp.linux-x86_64-2.6-10g/cx_Oracle.o >>>> -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib >>>> -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server -lclntsh -o >>>> build/lib.linux-x86_64-2.6-10g/cx_Oracle.so >>>> /usr/bin/ld: skipping incompatible >>>> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so >>>> when searching for -lclntsh >>>> /usr/bin/ld: cannot find -lclntsh >>>> collect2: ld returned 1 exit status >>>> error: command 'gcc' failed with exit status 1 >>>> >>>> Thanks in advance! >>>> >>>> -- >>>> László Monda <http://monda.hu> >>>> >>>> ------------------------------------------------------------------------------ >>>> The Planet: dedicated and managed hosting, cloud storage, colocation >>>> Stay online with enterprise data centers and the best network in the business >>>> Choose flexible plans and management services without long-term contracts >>>> Personal 24x7 support from experience hosting pros just a phone call away. >>>> http://p.sf.net/sfu/theplanet-com >>>> _______________________________________________ >>>> cx-oracle-users mailing list >>>> cx-...@li... >>>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>>> >>> >>> ------------------------------------------------------------------------------ >>> The Planet: dedicated and managed hosting, cloud storage, colocation >>> Stay online with enterprise data centers and the best network in the business >>> Choose flexible plans and management services without long-term contracts >>> Personal 24x7 support from experience hosting pros just a phone call away. >>> http://p.sf.net/sfu/theplanet-com >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >> >> >> >> -- >> László Monda <http://monda.hu> >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- László Monda <http://monda.hu> |
From: Anthony T. <ant...@gm...> - 2010-01-29 14:43:14
|
On Fri, Jan 29, 2010 at 7:02 AM, László Monda <la...@mo...> wrote: > Yeah, I use the 32 bit version of Oracle XE because 1) I couldn't find > the bloody download link for the 64 bit version and because 2) I've > heard that the 64 bit version of Oracle is pretty damn instable. Hmm, I haven't heard that the 64-bit version of Oracle is unstable. We use it here at work and it seems to work just fine. If you have links that suggest otherwise I'd be happy to read them -- rather than discover them first hand. :-) > In the meantime I've managed to solve the issue by using the RPM as > outlined in http://monda.hu/blog/2010/01/29/installing-cx_oracle-on-ubuntu-karmic-koala-64-bit/ > but I'm still interested in how to build it from source. Sure. You installed a 64-bit client and you are using that. You could build from source using that as well. Just make sure you also have the instant client development package installed as well. The main point is that you must use a 32-bit Python, 32-bit Oracle client and 32-bit cx_Oracle or a 64-bit Python, 64-bit Oracle client and 64-bit cx_Oracle. You can't mix and match. Anthony > On Fri, Jan 29, 2010 at 5:27 AM, Anthony Tuininga > <ant...@gm...> wrote: >> Hmm, looks like perhaps you have the 32-bit version of Oracle XE? Note >> the message about skipping an incompatible library. >> >> On Thu, Jan 28, 2010 at 4:05 PM, László Monda <la...@mo...> wrote: >>> Hi List, >>> >>> I'm using Ubuntu Linux, Karmic Koala, the 64 bit version and Oracle XE >>> 10.2.0.1.0 >>> >>> Here's what "python setup.py build" outputs: >>> >>> running build >>> running build_ext >>> building 'cx_Oracle' extension >>> gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >>> build/temp.linux-x86_64-2.6-10g/cx_Oracle.o >>> -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib >>> -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server -lclntsh -o >>> build/lib.linux-x86_64-2.6-10g/cx_Oracle.so >>> /usr/bin/ld: skipping incompatible >>> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so >>> when searching for -lclntsh >>> /usr/bin/ld: cannot find -lclntsh >>> collect2: ld returned 1 exit status >>> error: command 'gcc' failed with exit status 1 >>> >>> Thanks in advance! >>> >>> -- >>> László Monda <http://monda.hu> >>> >>> ------------------------------------------------------------------------------ >>> The Planet: dedicated and managed hosting, cloud storage, colocation >>> Stay online with enterprise data centers and the best network in the business >>> Choose flexible plans and management services without long-term contracts >>> Personal 24x7 support from experience hosting pros just a phone call away. >>> http://p.sf.net/sfu/theplanet-com >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > > > -- > László Monda <http://monda.hu> > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: László M. <la...@mo...> - 2010-01-29 14:02:25
|
Yeah, I use the 32 bit version of Oracle XE because 1) I couldn't find the bloody download link for the 64 bit version and because 2) I've heard that the 64 bit version of Oracle is pretty damn instable. In the meantime I've managed to solve the issue by using the RPM as outlined in http://monda.hu/blog/2010/01/29/installing-cx_oracle-on-ubuntu-karmic-koala-64-bit/ but I'm still interested in how to build it from source. On Fri, Jan 29, 2010 at 5:27 AM, Anthony Tuininga <ant...@gm...> wrote: > Hmm, looks like perhaps you have the 32-bit version of Oracle XE? Note > the message about skipping an incompatible library. > > On Thu, Jan 28, 2010 at 4:05 PM, László Monda <la...@mo...> wrote: >> Hi List, >> >> I'm using Ubuntu Linux, Karmic Koala, the 64 bit version and Oracle XE >> 10.2.0.1.0 >> >> Here's what "python setup.py build" outputs: >> >> running build >> running build_ext >> building 'cx_Oracle' extension >> gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >> build/temp.linux-x86_64-2.6-10g/cx_Oracle.o >> -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib >> -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server -lclntsh -o >> build/lib.linux-x86_64-2.6-10g/cx_Oracle.so >> /usr/bin/ld: skipping incompatible >> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so >> when searching for -lclntsh >> /usr/bin/ld: cannot find -lclntsh >> collect2: ld returned 1 exit status >> error: command 'gcc' failed with exit status 1 >> >> Thanks in advance! >> >> -- >> László Monda <http://monda.hu> >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- László Monda <http://monda.hu> |
From: Anthony T. <ant...@gm...> - 2010-01-29 04:28:00
|
Hmm, looks like perhaps you have the 32-bit version of Oracle XE? Note the message about skipping an incompatible library. On Thu, Jan 28, 2010 at 4:05 PM, László Monda <la...@mo...> wrote: > Hi List, > > I'm using Ubuntu Linux, Karmic Koala, the 64 bit version and Oracle XE > 10.2.0.1.0 > > Here's what "python setup.py build" outputs: > > running build > running build_ext > building 'cx_Oracle' extension > gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-x86_64-2.6-10g/cx_Oracle.o > -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib > -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server -lclntsh -o > build/lib.linux-x86_64-2.6-10g/cx_Oracle.so > /usr/bin/ld: skipping incompatible > /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so > when searching for -lclntsh > /usr/bin/ld: cannot find -lclntsh > collect2: ld returned 1 exit status > error: command 'gcc' failed with exit status 1 > > Thanks in advance! > > -- > László Monda <http://monda.hu> > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: László M. <la...@mo...> - 2010-01-29 00:03:00
|
Hi List, I'm using Ubuntu Linux, Karmic Koala, the 64 bit version and Oracle XE 10.2.0.1.0 Here's what "python setup.py build" outputs: running build running build_ext building 'cx_Oracle' extension gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6-10g/cx_Oracle.o -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server -lclntsh -o build/lib.linux-x86_64-2.6-10g/cx_Oracle.so /usr/bin/ld: skipping incompatible /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so when searching for -lclntsh /usr/bin/ld: cannot find -lclntsh collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Thanks in advance! -- László Monda <http://monda.hu> |