[Zope] DCOracle2 broken due to inability to map library
Paul Browning
paul.browning@bristol.ac.uk
Mon, 25 Nov 2002 22:57:35 -0000
--On 25 November 2002 19:19 +0000 Webmaster <Webmaster@luton.ac.uk> wrote:
> We are trying to implement DCOracle2 (ZOracleDA seemed to require too
> many other products to get it to work)
In my experience you should always:
1. Make sure you have the Oracle client libraries installed and
configured correcly (i.e. sqlplus should be working against
a remote database).
2. Then get DCOracle2 working with Python
3. Then get ZOracleDA working with DCOracle2
You don't say which platform but ....
> and keeps triping up on the
> inability to map library libclntsh.so.8.0
... this sounds like in might be Unix.
The key is ensuring that the Oracle env variables are
available to the shell when you do steps 2 and 3 above.
I.e.
export ORACLE_HOME=/u01/app/oracle/product/8.1.7 (or whatever)
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
So for Step 2 do
python2.1 install.py
inside the DCOracle2 directory (which you may have
renamed to ZOracleDA).
Then you can do (from with the DCOracle2 or ZOracleDA directory)
cp -r DCOracle2 <your_path_to>/site-packages
which I think guarantees that python will always be
able to import DCOracle2.
Now the clincher to making ZOracleDA to work (Step 3) is to
edit your Zope start script to be something like this:
#! /bin/sh
reldir=`dirname $0`
INST_HOME=`cd $reldir; pwd`
export INST_HOME
export ORACLE_HOME=/u01/app/oracle/product/8.1.7
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
exec /usr/bin/python2.1 \
$INST_HOME/z2.py \
-D "$@" &
>
> Has anyone had success connecting to an Oracle DB from zope?
It's one of the hardest Products to install but well worth
it when you eventually score ....
> If so how
> did *you* do it, and are there any obvious mistakes we are making.
> (apart from the obvious one of trying to connect to an Oracle DB in the
> first place). Are there any other product we can use?
Well you can start messing with ODBC but I wouldn't go there.
Paul
--
The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK
E-mail: paul.browning@bristol.ac.uk URL: http://www.bris.ac.uk/