ORA-04098: trigger is invalid and failed re-validation
when running the cfwheels test suite under oracle you encounter the following with Railo (maybe also with ACF)
Problem: ORA-04098: trigger ‘WHEELSTESTDB.BI_USERS’ is invalid and failed re-validation
Solution: no whitespace can be in the cfquery tag.
This will cause the error:
<cfquery name=”loc.query” datasource=”#application.wheels.dataSourceName#”>
CREATE TRIGGER bi_#loc.i# BEFORE INSERT ON #loc.i# FOR EACH ROW BEGIN SELECT #loc.seq#.nextval INTO :NEW.<cfif loc.i IS “photogalleries”>photogalleryid<cfelseif loc.i IS “photogalleryphotos”>photogalleryphotoid<cfelse>id</cfif> FROM dual; END;
</cfquery>
change the cfquery to this:
<cfquery name=”loc.query” datasource=”#application.wheels.dataSourceName#”>CREATE TRIGGER bi_#loc.i# BEFORE INSERT ON #loc.i# FOR EACH ROW BEGIN SELECT #loc.seq#.nextval INTO :NEW.<cfif loc.i IS “photogalleries”>photogalleryid<cfelseif loc.i IS “photogalleryphotos”>photogalleryphotoid<cfelse>id</cfif> FROM dual; END;</cfquery>
leave a comment