| 
      
      
      From: Ben A. <be...@th...> - 2002-03-20 13:16:24
       | 
| I'm still working through the fruit example, and have hit another problem:
everything is fine, until the SQL Install stage.
I'm pretty sure I've followed the example exactly, but I get this error:
$ oi_manage --package fruit install_sql
[oi_manage]: Using (/export/home/openinteract) for 'base_dir'.
[oi_manage]: Using (/export/home/cares/test) for 'website_dir'.
Running install_sql...
=========================
OpenInteract::DBI::connect (41) >> DBI::connect >> Connected ok
OpenInteract::DBI::connect (41) >> DBI::connect >> Connected ok
WARNING executing manipulate_configuration for test_cares::Page
Cannot discover fields
 -> SELECT * FROM page WHERE 1 = 0
 -> DBD::Oracle::db prepare failed: ORA-00942: table or view does not exist
(DBD ERROR: OCIStmtExecute/Describe) at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/SPOPS/DBI.pm line 56.
Process will continue
Status of the packages requested for SQL install:
fruit (0.06)
  OK: 
      
      Structure:
        * Cannot execute table SQL
      CREATE TABLE fruit (
      id NUMBER(10),
      name VARCHAR2(255),
      taste VARCHAR2(255),
      price VARCHAR2(255)
      )
      
      Error: DBD::Oracle::db do failed: ORA-00955: name is
      already used by an existing object (DBD ERROR:
      OCIStmtExecute) at
      /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/SQL
      Install.pm line 136.
      
      Data: 
        * Error: Cannot create SPOPS object!
      Basic: DBD::Oracle::db prepare failed: ORA-00942:
      table or view does not exist (DBD ERROR:
      OCIStmtExecute/Describe) at
      /usr/local/lib/perl5/site_perl/5.6.1/SPOPS/SQLInterfa
      ce.pm line 116.
      
      Error: DBD::Oracle::db prepare failed: ORA-00942:
      table or view does not exist (DBD ERROR:
      OCIStmtExecute/Describe) at
      /usr/local/lib/perl5/site_perl/5.6.1/SPOPS/SQLInterfa
      ce.pm line 116.
      
      
What is the 'page' object it is trying to access in the database? Where does
it get this from?
----------------------------------------------------------------
Ben Avery			YouthNet UK	
Analyst/Programmer		2nd Floor
YouthNet UK			Broadmead House
Tel:+44 020 7925 2530		21 - 23 Panton Street
Fax:+44 020 7925 2830		London SW1Y 4DR              
e-mail:be...@th...
www.thesite.org.uk 
www.do-it.org.uk
www.youthnet.org.uk
----------------------------------------------------------------
 | 
| 
      
      
      From: Chris W. <ch...@cw...> - 2002-03-20 14:43:08
       | 
| On Wed, 2002-03-20 at 08:16, Ben Avery wrote: > I'm still working through the fruit example, and have hit another problem: > everything is fine, until the SQL Install stage. > > I'm pretty sure I've followed the example exactly, but I get this error: > > > $ oi_manage --package fruit install_sql > [oi_manage]: Using (/export/home/openinteract) for 'base_dir'. > [oi_manage]: Using (/export/home/cares/test) for 'website_dir'. > Running install_sql... > ========================= > > OpenInteract::DBI::connect (41) >> DBI::connect >> Connected ok > OpenInteract::DBI::connect (41) >> DBI::connect >> Connected ok > WARNING executing manipulate_configuration for test_cares::Page > Cannot discover fields > -> SELECT * FROM page WHERE 1 = 0 > -> DBD::Oracle::db prepare failed: ORA-00942: table or view does not exist > > (DBD ERROR: OCIStmtExecute/Describe) at > /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/SPOPS/DBI.pm line 56. > > Process will continue > Status of the packages requested for SQL install: Right -- this is one error (explained below). > fruit (0.06) > OK: > > Structure: > * Cannot execute table SQL > CREATE TABLE fruit ( > id NUMBER(10), > name VARCHAR2(255), > taste VARCHAR2(255), > price VARCHAR2(255) > ) > > Error: DBD::Oracle::db do failed: ORA-00955: name is > already used by an existing object (DBD ERROR: > OCIStmtExecute) at > /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/SQL > Install.pm line 136. This is the second error, and sounds like the fruit table already exists. BTW: Can you tell me the difference between 'varchar' and 'varchar2' in Oracle? Why did they use this datatype when every other database I've used has found 'varchar' sufficient for their needs? > Data: > * Error: Cannot create SPOPS object! > Basic: DBD::Oracle::db prepare failed: ORA-00942: > table or view does not exist (DBD ERROR: > OCIStmtExecute/Describe) at > /usr/local/lib/perl5/site_perl/5.6.1/SPOPS/SQLInterfa > ce.pm line 116. > > Error: DBD::Oracle::db prepare failed: ORA-00942: > table or view does not exist (DBD ERROR: > OCIStmtExecute/Describe) at > /usr/local/lib/perl5/site_perl/5.6.1/SPOPS/SQLInterfa > ce.pm line 116. This is the third error. I'd guess that maybe oracle expects a different table name? Does oracle use a user.table or schema.table syntax for referring to tables in a INSERT/SELECT fashion? What happens when you do a table descriptor operation in SQL-Plus? (Sorry for the inexact terminology, I'm not familiar with Oracle at all.) Do you see the 'fruit' table? What happens if you try to insert values to the 'fruit' table from the SQL-Plus tool? > What is the 'page' object it is trying to access in the database? Where does > it get this from? First error explained: This probably means you haven't run install_sql for all the other packages. When OI starts up it tries to dynamically find the fields in a number of tables, one of which is the 'page' table. However, if you do run 'install_sql' for the other packages you might run into the same issue. I might see if I can learn just enough about Oracle to try this myself. I think we still have an Oracle database instance running somewhere around here. Thanks, Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |