[Zope-DB] ORACLE STORAGE - Solaris

Matthew T. Kromer matt@zope.com
Tue, 03 Sep 2002 11:38:07 -0400

Michael Havard wrote:

> Problem: We have ZOPE running on Solaris. We have an Oracle database 
> as a content repository using the DCOracleStorage option. Without 
> using DCOracle2 and DCOracleStorage ZOPE starts without incident. With 
> the Oracle storage hooked up I get the following:
> 2002-09-03T14:27:57 PANIC(300) z2 Startup exception
> Traceback (innermost last):
>  File /home/usr1/zope/z2.py, line 497, in ?
>  File <string>, line 1, in ?
>  File /home/usr1/zope/lib/python/Zope/__init__.py, line 40, in ?
>  File /home/usr1/zope/custom_zodb.py, line 1, in ?
>    (Object: DCOracle2)
>  File 
> /home/usr1/zope/lib/python/DCOracle2/DCOracleStorage/__init__.py, li?
>  File /home/usr1/zope/lib/python/DCOracle2/DCOracleStorage/Full.py, 
> line 9?
> ImportError: cannot import name dbiRaw
> We do have this solution running fine on a Windows NT box it's only n 
> Solaris that I receive this particular error.
> Question: Any thoughts on why this might occur?

Two possiblities spring to mind.  The first is that the *storage* can't 
import DCOracle2, or it is importing a very old version.  This is 
probably naming inconsistancies biting you; I orignally called the outer 
directory "DCO2" but this was deemed nonintuitive (albeit I didnt think 
it was too bad).  The inner "DCOracle2" directory should be in your 
lib/python, not the outer.  The inner one is the actual DCOracle2 
module, the outer one is the Zope database adapter.

The second possibility is that the last three lines of DCOracle2.py 
don't read:

# API 1.0 dbiRaw column
def dbiRaw(string):
    return TypeCoercion(string, 'SQLT_LBI') # Make it a long binary

That should be there.  Certainly it is in CVS, and I dont think it's 
changed in a long time (like 15 months).

Based on your traceback, I'd say your problem is the first.  You can 
probably fix this by symlinking the directory ../DCOracle2 in 
DCOracleStorage, but you might want to end up moving the DCOracle2 
folder from lib/python to lib/python/Products, and symlinking 
lib/python/Products/DCOralce2/DCOracle2 to lib/python/DCOracle2 and 
lib/python/Products/DCOracle2/DCOracleStorage to