Thread: RE: [cx-oracle-users] OCI-22054 error using cx_Oracle
Brought to you by:
atuining
From: Molina, G. <Ger...@sc...> - 2005-09-26 21:41:40
|
That did the trick! Thanks, Gerardo=20 -----Original Message----- From: cx-...@li... [mailto:cx-...@li...] On Behalf Of Anthony Tuininga Sent: Thursday, September 22, 2005 2:42 PM To: cx-...@li... Subject: Re: [cx-oracle-users] OCI-22054 error using cx_Oracle The reason this is happening is because you are doing the following: a) calling a procedure with out parameters that specify number b) passing in numbers which are integers Of course, Oracle is trying to return a floating point number at this point and is failing on converting the number back to an integer...... If you change all of your =3D 0 to =3D 0.0 the problem goes away. On 9/22/05, Molina, Gerardo <Ger...@sc...> wrote: > > > I'm getting the following error: > > Traceback (most recent call last): > File "./pydbconn.py", line 113, in ? > (bid, eid, > cx_Oracle.DatabaseError: OCI-22054: underflow error > > Google didn't turn up much on this error. > > Any help would be greatly appreciated. > > TIA, > Gerardo > > > Here is program listing: > > #!/usr/bin/env python > > # pydbconn > > # test sql connect > > import cx_Oracle > > user =3D 'perfstat' > pword =3D 'itsnotthis' > dbstring =3D 'TESTDB' > > connection =3D cx_Oracle.connect(user,pword,dbstring) > > bid =3D 11 > eid =3D 12 > dbid =3D 4275102739 > inst_num =3D 1 > para =3D 'NO' > > lhtr =3D 0 > bfwt =3D 0 > tran =3D 0 > chng =3D 0 > ucal =3D 0 > urol =3D 0 > rsiz =3D 0 > phyr =3D 0 > phyrd =3D 0 > phyrdl =3D 0 > phyw =3D 0 > ucom =3D 0 > prse =3D 0 > hprs =3D 0 > recr =3D 0 > gets =3D 0 > rlsr =3D 0 > rent =3D 0 > srtm =3D 0 > srtd =3D 0 > srtr =3D 0 > strn =3D 0 > lhr =3D 0 > #bc =3D '' > sp =3D '' > lb =3D '' > bs =3D '' > twt =3D 0 > logc =3D 0 > prscpu =3D 0 > tcpu =3D 0 > exe =3D 0 > prsela =3D 0 > bspm =3D 0 > espm =3D 0 > bfrm =3D 0 > efrm =3D 0 > blog =3D 0 > elog =3D 0 > bocur =3D 0 > eocur =3D 0 > dmsd =3D 0 > dmfc =3D 0 > dmsi =3D 0 > pmrv =3D 0 > pmpt =3D 0 > npmrv =3D 0 > npmpt =3D 0 > dbfr =3D 0 > dpms =3D 0 > dnpms =3D 0 > glsg =3D 0 > glag =3D 0 > glgt =3D 0 > glsc =3D 0 > glac =3D 0 > glct =3D 0 > glrl =3D 0 > gcdfr =3D 0 > gcge =3D 0 > gcgt =3D 0 > gccv =3D 0 > gcct =3D 0 > gccrrv =3D 0 > gccrrt =3D 0 > gccurv =3D 0 > gccurt =3D 0 > gccrsv =3D 0 > gccrbt =3D 0 > gccrft =3D 0 > gccrst =3D 0 > gccusv =3D 0 > gccupt =3D 0 > gccuft =3D 0 > gccust =3D 0 > msgsq =3D 0 > msgsqt =3D 0 > msgsqk =3D 0 > msgsqtk =3D 0 > msgrq =3D 0 > msgrqt =3D 0 > > # Call proc statspack.stat_changes > > cursor2 =3D connection.cursor() > > outbcVar =3D cursor2.var(cx_Oracle.STRING) outspVar =3D=20 > cursor2.var(cx_Oracle.STRING) outlbVar =3D = cursor2.var(cx_Oracle.STRING) > outbsVar =3D cursor2.var(cx_Oracle.STRING) > > cursor2.callproc('statspack.stat_changes', > (bid, eid, > dbid, inst_num, > para, > lhtr, bfwt, > tran, chng, > ucal, urol, > rsiz, > phyr, phyrd, > phyrdl, > phyw, ucom, > prse, hprs, > recr, gets, > rlsr, rent, > srtm, srtd, > srtr, strn, > lhr, outbcVar, > outspVar, outlbVar, > outbsVar, twt, > logc, prscpu, > tcpu, exe, > prsela, > bspm, espm, > bfrm, efrm, > blog, elog, > bocur, eocur, > dmsd, dmfc, > dmsi, > pmrv, pmpt, > npmrv, npmpt, > dbfr, > dpms, dnpms, > glsg, glag, > glgt, glsc, > glac, glct, > glrl, gcdfr, > gcge, gcgt, > gccv, gcct, > gccrrv, gccrrt, gccurv, gccurt, > gccrsv, > gccrbt, gccrft, > gccrst, gccusv, > gccupt, gccuft, > gccust, > msgsq, msgsqt, > msgsqk, msgsqtk, > msgrq, msgrqt )) ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Chimezie O. <chi...@gm...> - 2005-10-27 14:05:16
|
I've been struggling for some time to find an easy (non-convoluted) way to connect to Oracle 8,9, and 10g databases consistently from a Solaris 8 MP box. For some time I had been using DataDirects Oracle Wire Protocol drivers with UNIX ODBC and egenix's mxODBC. However, DataDirect's drivers (which do not require an Oracle Client install - which is the most attractive thing about them) have since exceeded my evaluation period, so I'm giving cx_Oracle a shot. Following directions from this thread (http://sourceforge.net/mailarchive/forum.php?thread_id=3D8719369&forum_id= =3D34464), I've installed the the Oracle Instant Client, installed the SDK package, modified the setup.py of cx_Oracle and was able to run python setup.py install w/out any errors: bash-2.03$ python setup.py install running install running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.solaris-2.8-sun4u-2.4 gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/OracleClient/rdbms/demo -I/usr/local/OracleClient/rdbms/public -I/usr/local/OracleClient/network/public -I/usr/local/OracleClient/sdk/include -I/usr/local/include/python2.4 -c cx_Oracle.c -o build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o -DBUILD_TIME=3D"October 27, 2005 10:01:17" In file included from /usr/local/OracleClient/sdk/include/oci.h:2327, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/oci1.h:148: warning: function declaration isn't a prototype In file included from /usr/local/OracleClient/sdk/include/ociap.h:206, from /usr/local/OracleClient/sdk/include/oci.h:2351, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/nzt.h:674: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2665: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2674: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2684: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2693: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2702: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2711: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2719: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2729: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2736: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2744: warning: function declaration isn't a prototype In file included from /usr/local/OracleClient/sdk/include/oci.h:2351, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/ociap.h:9952: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/ociap.h:9958: warning: function declaration isn't a prototype In file included from Variable.c:93, from Cursor.c:211, from Connection.c:303, from SessionPool.c:132, from cx_Oracle.c:73: DateTimeVar.c: In function `DateTimeVar_SetValue': DateTimeVar.c:81: warning: unused variable `status' creating build/lib.solaris-2.8-sun4u-2.4 gcc -shared build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o -L/usr/local/OracleClient/lib -L/usr/local/OracleClient -lclntsh -o build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -s running install_lib copying build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -> /usr/local/lib/python2.4/site-packages However, when I try to run any of the tests (or just try to import the newly installed cx_Oracle) I get the following symbol reference error: bash-2.03$ python test/test.py Traceback (most recent call last): File "test/test.py", line 3, in ? import cx_Oracle ImportError: ld.so.1: python: fatal: relocation error: file /usr/local/lib/python2.4/site-packages/cx_Oracle.so: symbol OCIHandleFree: referenced symbol not found I wouldn't expect the build process to complete if there were symbol reference issues, but I have the Instant Client binaries installed in /usr/local/OracleClient , the sdk package installed in /usr/local/OracleClient/sdk, my ORACLE_HOME variable points to /usr/local/OracleClient, and LD_LIBRARY_PATH includes /usr/local/OracleClient: bash-2.03$ env | grep LD_LIBRARY_PATH LD_LIBRARY_PATH=3D/programs/lsf/6.0/sparc-sol7-64/lib:/usr/dt/lib:/vol/orac= le/product/7.3.2/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pgsql/= lib:/usr/local/mysql/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pg= sql/lib:/usr/local/OracleClient bash-2.03$ env | grep ORACLE_HOME ORACLE_HOME=3D/usr/local/OracleClient I'm not sure why it's unable to resolve the symbol. Any help would be greatly appreciated Chimezie |