Informix Error -4497: Event "name" is already declared in the class.
Cause and resolution
Event "name" is already declared in the class.
Two events in the same class cannot have the same name.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4497 fires when the same event name is declared more than once in one class — per the official guidance, two events in the same class can't share a name.
- The same event name declared twice within one class, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the duplicate declaration, or rename one of the two events.
Examples
A duplicate event declaration
CLASS Order
EVENT statusChanged
EVENT statusChanged
-- -4497: statusChanged is already declared above
END CLASS
Corrected
CLASS Order
EVENT statusChanged
END CLASS
Diagnostic Checks
- Check the class for more than one declaration of the same event name, and remove or rename the duplicate.
Related Errors / Related Topics
- -4025 — "Function "name" is already declared in the class." A closely related duplicate-declaration error, about functions rather than events.
An event name is declared twice in the same class — remove or rename the duplicate.