[Zope-DB] ZOracleDB strange error

Johnny Wezel j@netfeed.ch
Tue, 11 Feb 2003 10:07:11 +0100 (CET)


I finally got Oracle 9i up and compiled ZOracleDA. When I tried to test
it using this simple query:

SELECT * FROM ALL_TABLES WHERE OWNER = 'PATENT';

I got this error in the sql test page:

Error, oci.error: (911, 'ORA-00911: invalid character\n')

and this strange error message in the Zope log:

Exception Type  oci.error

Exception Value <html><head><title>Patent Tables</title></head><body
bgcolor="#FFFFFF"> <html> <BODY BGCOLOR="#FFFFFF" LINK="#000099"
VLINK="#555555"> <table cellpadding="0" cellspacing="0" width="100%"
border="0"> <tr> <td bgcolor="#000000" rowspan="5" width="10%"
valign="bottom" align="left">&nbsp;&nbsp;<img src="/p_/sp" width="2"
height="1" alt="" /> </td> <td bgcolor="#000000" colspan="24"><img
src="/p_/sp" width="1" height="5" alt="" /></td> </tr> <tr> <td
bgcolor="#ffffff" rowspan="2" valign="top" align="left"><img
src="/p_/ltab" width="5" height="5" alt="" /></td> <td
bgcolor="#ffffff"><img src="/p_/sp" width="1" height="2" alt="" /></td>
<td bgcolor="#ffffff" rowspan="2" valign="top" align="right"><img
src="/p_/rtab" width="5" height="5" alt="" /></td> <td bgcolor="#000000"
rowspan="4"><img src="/p_/sp" width="2" height="1" alt="" /></td> <td
bgcolor="#efefef" rowspan="2" valign="top" align="left"><img
src="/p_/ltab" width="5" height="5" alt="" /></td> <td
bgcolor="#efefef"><img src="/p_/sp" width="1" height="2" alt="" /></td>
<td bgcolor="#efefef" rowspan="2" valign="top" align="right"><img
src="/p_/rtab" width="5" height="5" alt="" /></td> <td bgcolor="#000000"
rowspan="4"><img src="/p_/sp" width="2" height="1" alt="" /></td> <td
bgcolor="#efefef" rowspan="2" valign="top" align="left"><img
src="/p_/ltab" width="5" height="5" alt="" /></td> <td
bgcolor="#efefef"><img src="/p_/sp" width="1" height="2" alt="" /></td>
<td bgcolor="#efefef" rowspan="2" valign="top" align="right"><img
src="/p_/rtab" width="5" height="5" alt="" /></td> <td bgcolor="#000000"
rowspan="4"><img src="/p_/sp" width="2" height="1" alt="" /></td> <td
bgcolor="#efefef" rowspan="2" valign="top" align="left"><img
src="/p_/ltab" width="5" height="5" alt="" /></td> <td
bgcolor="#efefef"><img src="/p_/sp" width="1" height="2" alt="" /></td>
<td bgcolor="#efefef" rowspan="2" valign="top" align="right"><img
src="/p_/rtab" width="5" height="5" alt="" /></td> <td bgcolor="#000000"
rowspan="4"><img src="/p_/sp" width="2" height="1" alt="" /></td> <td
bgcolor="#efefef" rowspan="2" valign="top" align="left"><img
src="/p_/ltab" width="5" height="5" alt="" /></td> <td
bgcolor="#efefef"><img src="/p_/sp" width="1" height="2" alt="" /></td>
<td bgcolor="#efefef" rowspan="2" valign="top" align="right"><img
src="/p_/rtab" width="5" height="5" alt="" /></td> <td bgcolor="#000000"
rowspan="4"><img src="/p_/sp" width="2" height="1" alt="" /></td> <td
bgcolor="#efefef" rowspan="2" valign="top" align="left"><img
src="/p_/ltab" width="5" height="5" alt="" /></td> <td
bgcolor="#efefef"><img src="/p_/sp" width="1" height="2" alt="" /></td>
<td bgcolor="#efefef" rowspan="2" valign="top" align="right"><img
src="/p_/rtab" width="5" height="5" alt="" /></td> <td bgcolor="#000000"
rowspan="4"><img src="/p_/sp" width="2" height="1" alt="" /></td> </tr>
<tr> <td bgcolor="#ffffff" valign="bottom" class="tab-small"
align="center"><font face="Verdana, Arial, Helvetica" size="1"
color="#000000">&nbsp;<a href="manage_main"><span style="color:
#000000;"><strong>Edit</strong></span></a>&nbsp;</font></td> <td
bgcolor="#efefef" valign="bottom" class="tab-small" align="center"><font
face="Verdana, Arial, Helvetica" size="1" color="#000000">&nbsp;<a
href="manage_testForm"><span style="color:
#000000;"><strong>Test</strong></span></a>&nbsp;</font></td> <td
bgcolor="#efefef" valign="bottom" class="tab-small" align="center"><font
face="Verdana, Arial, Helvetica" size="1" color="#000000">&nbsp;<a
href="manage_advancedForm"><span style="color:
#000000;"><strong>Advanced</strong></span></a>&nbsp;</font></td> <td
bgcolor="#efefef" valign="bottom" class="tab-small" align="center"><font
face="Verdana, Arial, Helvetica" size="1" color="#000000">&nbsp;<a
href="manage_access"><span style="color:
#000000;"><strong>Security</strong></span></a>&nbsp;</font></td> <td
bgcolor="#efefef" valign="bottom" class="tab-small" align="center"><font
face="Verdana, Arial, Helvetica" size="1" color="#000000">&nbsp;<a
href="manage_UndoForm"><span style="color:
#000000;"><strong>Undo</strong></span></a>&nbsp;</font></td> <td
bgcolor="#efefef" valign="bottom" class="tab-small" align="center"><font
face="Verdana, Arial, Helvetica" size="1" color="#000000">&nbsp;<a
href="manage_owner"><span style="color:
#000000;"><strong>Ownership</strong></span></a>&nbsp;</font></td> </tr>
<tr> <td colspan="3" bgcolor="#ffffff"><img src="/p_/sp" width="2"
height="1" alt="" /></td> <td colspan="3" bgcolor="#efefef"><img
src="/p_/sp" width="2" height="1" alt="" /></td> <td colspan="3"
bgcolor="#efefef"><img src="/p_/sp" width="2" height="1" alt="" /></td>
<td colspan="3" bgcolor="#efefef"><img src="/p_/sp" width="2" height="1"
alt="" /></td> <td colspan="3" bgcolor="#efefef"><img src="/p_/sp"
width="2" height="1" alt="" /></td> <td colspan="3"
bgcolor="#efefef"><img src="/p_/sp" width="2" height="1" alt="" /></td>
</tr> <tr> <td colspan="3" bgcolor="#ffffff"><img src="/p_/sp" width="2"
height="1" alt="" /></td> <td colspan="3" bgcolor="#c0c0c0"><img
src="/p_/sp" width="2" height="1" alt="" /></td> <td colspan="3"
bgcolor="#c0c0c0"><img src="/p_/sp" width="2" height="1" alt="" /></td>
<td colspan="3" bgcolor="#c0c0c0"><img src="/p_/sp" width="2" height="1"
alt="" /></td> <td colspan="3" bgcolor="#c0c0c0"><img src="/p_/sp"
width="2" height="1" alt="" /></td> <td colspan="3"
bgcolor="#c0c0c0"><img src="/p_/sp" width="2" height="1" alt="" /></td>
</tr> </table> <br /> <table width="100%" cellspacing="0"
cellpadding="2" border="0"> <tr class="location-bar"> <td align="left"
valign="top"> <div class="std-text"> <img
src="/misc_/ZSQLMethods/sqlmethod.gif" alt="Z SQL Method" border="0" />
<strong> Z SQL Method at <a href="/manage_workspace">&nbsp;/</a><a
href="/patent/manage_workspace">patent</a>/<a class="strong-link"
href="/patent/patent%20tables/manage_workspace">patent tables</a>
</strong> </div> </td> <td align="right" valign="top"> <div
class="std-text"> <a
href="http://localhost:8080/HelpSys?help_url=/Control_Panel/Products/ZSQLMethods/Help/Z-SQL-Method_Edit.stx"onClick="window.open('http://localhost:8080/HelpSys?help_url=/Control_Panel/Products/ZSQLMethods/Help/Z-SQL-Method_Edit.stx','zope_help','width=600,height=500,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes');return false;" onMouseOver="window.status='Open online help'; return
true;" onMouseOut="window.status=''; return true;">Help!</a> </div>
</td> </tr> </table> <hr> <strong>Error, <em>oci.error</em>:</strong>
(911, 'ORA-00911: invalid character\n') <hr><strong>SQL
used:</strong><br> <pre> select * from all_tables where owner =
'PATENT'; </pre> <hr> </body></html> </body></html>

Traceback (innermost last):

    * Module ZPublisher.Publish, line 98, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 39, in call_object
    * Module Shared.DC.ZRDB.DA, line 328, in manage_test
    * Module Shared.DC.ZRDB.DA, line 306, in manage_test
    * Module Shared.DC.ZRDB.DA, line 421, in __call__
    * Module Products.ZOracleDA.db, line 190, in query
    * Module Products.ZOracleDA.db, line 161, in query
    * Module Products.ZOracleDA.DCOracle.ociCurs, line 298, in execute
    * Module Products.ZOracleDA.DCOracle.ociCurs, line 221, in _parse
    * Module Products.ZOracleDA.DCOracle.ociCurs, line 109, in _error


All the HTML was in the error message. Here is the info about Zope from
the control panel:

Zope Version   (Zope 2.6.0 (binary release, python 2.1, linux2-x86),
python 2.1.3, linux2)
Python Version  2.1.3 (#1, Sep 19 2002, 13:15:46) [GCC egcs-2.91.66
19990314/Linux (egcs-1.1.2 release)]
System Platform linux2
SOFTWARE_HOME   /opt/Zope-2.6.0-linux2-x86/lib/python
ZOPE_HOME       /opt/Zope-2.6.0-linux2-x86
INSTANCE_HOME   /opt/Zope-2.6.0-linux2-x86
CLIENT_HOME     /opt/Zope-2.6.0-linux2-x86/var

Cheers,
Johnny Wezel