[Catalyst] ok against sqlite. Not working against Oracle81. Sequence problem.

David Rio Deiros drio at console.net
Mon Mar 6 21:04:16 CET 2006


Hi there,

I am still on my Quest to make my first serious catalyst application
to run on a solaris machine (Oracle 8.1 as a Database Engine).

The application works perfectly against sqlite (I developed it using
sqlite). But problems come when I try to deploy that in the production
environment which is SOlaris/Oracle.

I know this is probably a DBI problem but maybe someone on the list
has already faced this before.

I initially tried to use the CDBI helper to create my model against 
my two tables in the database. I run into a problem following that
approach. Since the database has a bunch of tables, and some of 
them doesn't follow the very basics of database normalization DBI
complained like crazy.

Following your advices I created my own Models in my main class 
using CDBI::Plain. Check the code of the main class here:

http://www.is04607.com/main.html

I can start the catalyst server without problems. Then I try the 
application. I have basic scaffolding on both tables of my 
application. So I point my browser to contest/list. It seems to 
work. Then I try to add a new entry and catalyst returns these:

iCaught exception in radio_advertising::Controller::Contest->do_add "DBD::Oracle::db prepare_cached failed: ORA-00923: FROM keyword not found where expected (DBD ERROR: error possibly near <*> indicator at char 34 in 'SELECT NEXTVAL ('contest_id_seq')
<*>') [for Statement "SELECT NEXTVAL ('contest_id_seq')
"] at /usr/local/lib/perl5/site_perl/5.8.3/Ima/DBI.pm line 381."

If you check the source code of my main class you'll see that I have
correctly defined the sequences that I have in both tables. 
I don't know why DBD::Oracle::db tries to run that code but
it is not a valid oracle statement.

Any help with this would be highly appreciated.

Thanks,

David





More information about the Catalyst mailing list