{"id":3152,"date":"2014-03-16T22:59:00","date_gmt":"2014-03-16T22:59:00","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/16\/problem-about-cx-oracle-collection-of-common-programming-errors\/"},"modified":"2014-03-16T22:59:00","modified_gmt":"2014-03-16T22:59:00","slug":"problem-about-cx-oracle-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/16\/problem-about-cx-oracle-collection-of-common-programming-errors\/","title":{"rendered":"problem about cx-oracle-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/0hIfS.png?s=32&amp;g=1\" \/><br \/>\nDanny Beckett<br \/>\ndjango centos mod-wsgi cx-oracle centos6<br \/>\nI\u00b4m having serious trouble to get Django to work with my Apache\/mod_wsgi installation accessing Oracle. I have this setup running on a CentOS 6 host, and I&#8217;m getting this error in my Apache logs:Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared object file: No such file or directoryIf I try to import cx_Oracle from the Python command line it works fine in both root and apache users. I set ORACLE_HOME and LD_LIBRARY_PATH ($ORACLE_HOME\/lib) correctly: in ~\/.bashrc, \/etc\/ld.so.c<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4df29033ed7d158a78da8b961d92d972?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nftartaggia<br \/>\ndjango apache oracle11g httpd cx-oracle<br \/>\nThis is my application environment:Redhat 6.0 Apache 2.2 Django 1.3.0 Python 2.6.6 cx_Oracle 5.1 mod_wsgi 3.2 Oracle DBMS 11.2 (on a different machine)Issue: accessing my django website from a web browser fails because cx_Oracle can&#8217;t acquire Oracle handle.Tests:running django-admin.py shell to query the db DOES WORK (running from a bash session with ORACLE_HOME and LD_LIBRARY_PATH vars set) running a custom script that adds ORACLE_HOME and LD_LIBRARY_PATH to os.environ and uses cx_Oracle to con<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4c136f8849c6485b666f4ac7caf75258?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSean McCully<br \/>\npython cx-oracle<br \/>\nMy python application is dying, this oracle trace file is being generated. I am using cx_Oracle, how do I go about using this trace file to resolve this crash?ora_18225_139690296567552.trc kpedbg_dmp_stack()+360&lt;-kpeDbgCrash()+192&lt;-kpureq2()+3194&lt;-OCIStmtPrepare2()+157&lt;-Cursor_InternalPrepare()+298&lt;-0000000000EA3010&lt;-0000000000EA3010&lt;-0000000000EA3010&lt;-0000000000EA3010&lt;-0000000000EA3010&lt;-0000000000EA3010&lt;-0000000000EA3010&lt;-0000000000EA3010&lt;-0000000000EA3010<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e4dae3397c4944b5efc8fd16f0584048?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDougman<br \/>\npython oracle pyodbc cx-oracle instantclient<br \/>\nI can connect to a Oracle 10g release 2 server using instant client. Using pyodbc and cx_Oracle.Using either module, I can execute a select query without any problems, but when I try to update a table, my program crashes.For example,SELECT * FROM table WHERE col1 = &#8216;value&#8217;; works fine.UPDATE table SET col2 = &#8216;value&#8217; WHERE col1 = &#8216;val&#8217;; does not workIs this a known limitation with instant client, or is there a problem with my installation?Thanks in advance for your help.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d0329c077d7d8b8570eca8d2d804e273?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nUniphase38<br \/>\npython cx-oracle<br \/>\nI&#8217;m trying to call an oracle pl\/sql function returning an oracle object by using cx_Oracle&#8217;s cursor.callfunc() but cannot bring it to work and found no help neither in the documentation nor on the net. my code:connection = cx_Oracle.connect(&#8216;myuser\/mypass@myservice&#8217;) cursor = connection.cursor() result = cursor.var(cx_Oracle.OBJECT) cursor.callfunc(&#8216;myfunction&#8217;, result , [an_arg]) Traceback (most recent call last):File &#8220;&#8230;&#8221;, line nn, in &lt;module&gt;result = cursor.var(cx_Oracle.OBJECT) TypeEr<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/193505336b9ae59838e1d0f97e3a02ea?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPat<br \/>\npython cx-oracle<br \/>\nFirst, the SQL that I&#8217;m dealing with:CREATE OR REPLACE TYPE address_t AS OBJECT ( street VARCHAR2(80), city VARCHAR2(80), state_abbr CHAR(2), zip_code DECIMAL(5) ) \/CREATE TABLE branch ( id DECIMAL(12) NOT NULL, address address_t PRIMARY KEY(id) ) \/I&#8217;ve verified that the data is correct in the database (after putting in some test data). I&#8217;m trying to now write a JSONEncoder for parsing the Oracle address_t type as a serializable JSON type. Here&#8217;s the function I&#8217;ve been<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/eec2e174897771bff4bf95039074b57e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMark<br \/>\npython osx oracle cx-oracle instantclient<br \/>\nSo I followed these directions here to install Oracle InstantClient,installing Oracle Instantclient on Mac OS\/X without setting environment variables?But when I try to install cx_oracle I get the following stack trace,python setup.py build running build running build_ext building &#8216;cx_Oracle&#8217; extension creating build creating build\/temp.macosx-10.6-universal-2.6-10g gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arc<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/142dbbce38e59d6b5e452ca6fcf725ef?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAndrew<br \/>\npython apache2 mingw lxml cx-oracle<br \/>\nwhen I launch my application with apache2+modwsgi I catch Exception Type: ImportError Exception Value: DLL load failed: The specified module could not be found.in linefrom lxml import etreewith Django dev server all works fine Visual C++ Redistributable 2008 installedDependency walker told that msvcrt90.dll is missed but there is same situation with cx_Oracle, but cx_Oracle&#8217;s dll loads correctany ideas?windows 2003 server 64bit and windows XP sp3 32bit python 2.7 32 bit cx_Oracle 5.0.4 32bitU<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8c7b9748906c198282f724f3ce772e42?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nnashr rafeeg<br \/>\npython cx-oracle<br \/>\nI am having issiues installing cx_oracle. I have installed oracle instantclient and cx_oracle oracle packages ones installed i am getting this error while importing cx_oracle. i am running ubuntu 11.10 as host. import cx_Oracle Traceback (most recent call last): File &#8220;&lt;console&gt;&#8221;, line 1, in &lt;module&gt; ImportError: \/usr\/lib\/python2.7\/dist-packages\/cx_Oracle.so: undefined symbol:PyUnicodeUCS2_AsEncodedStringany one have any idea how to resolve this issue cheers<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1186a46e65dbea4c8900d524c613f926?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ncwallenpoole<br \/>\npython cx-oracle<br \/>\nI&#8217;m trying to install the cx_Oracle for Python 2.6, but it is failing. I don&#8217;t know enough about C or MS Vis. Studio&#8217;s compiler to even approach fixing it myself.This is what is output on the command line:C:\\pydev\\cx_Oracle-5.0.1&gt;C:\\python26\\python setup.py install running install running build running build_ext building &#8216;cx_Oracle&#8217; extension C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\BIN\\cl.exe \/c \/nologo \/Ox \/MD \/W3 \/GS- \/DNDEBUG -IC:\\Oracle\\instantclient\\sdk\\include -IC:\\p ython26\\in<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/62a278879009d837b1d64fa011046183?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmnky9800n<br \/>\noracle cx-oracle ora-00911<br \/>\nI am using python 2.7 and the cx_Oracle module. When I try to run the following query:UPDATE bs_cartSET qty = qty + :moreBooksWHERE userid = :userID AND isbn = :bookNumber;IF SQL%ROWCOUNT = 0 THENINSERT INTO bs_cart(userid,isbn)VALUES(:userID,:bookNumber)using Cursor.execute() from cx_Oracle I get the following error:DatabaseError: ORA-00911: invalid characterWhen I put it in SQL plus it says:SP2-0734: unknown command beginning &#8220;IF SQL%ROW&#8230;&#8221; &#8211; rest of line ignored.I am trying to make the cart<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Danny Beckett django centos mod-wsgi cx-oracle centos6 I\u00b4m having serious trouble to get Django to work with my Apache\/mod_wsgi installation accessing Oracle. I have this setup running on a CentOS 6 host, and I&#8217;m getting this error in my Apache logs:Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared object file: No such file or directoryIf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3152","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3152"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3152\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}