1. Is this the technique you are using to trigger your stored procedures:

http://developer.apple.com/documentation/WebObjects/UsingEOModeler/ 6WorkingWithEntities/chapter_6_section_5.html#//apple_ref/doc/uid/ TP30001018-CH206-BABGBCJE

2. Are your stored procedures doing something more complex than assigning a simple incrementing integer primary key? I'm only asking in case you are unaware that OpenBase provides a plug-in for supporting native primary key generation. You can specify the OpenBasePKPlugIn in your connection dictionary, and include the OpenBasePKPlugin framework in your project. Doing so will eliminate the need for the EO_PK_TABLE and have OpenBase provided PKs natively to EOF.

On May 14, 2007, at 11:22 AM, Florijan Stamenkovic wrote:

Hi all,


I am trying to get some stored procedures performing after insertion of new records. The stored procedures generate unique number for records. That reason why I am using stored procedures is that the generation can only be done properly on the SQL level. The procedures themselves are functional. I ran them many times from the OpenBase cmd line, no problems.

Now I am trying to get WO to automatically invoke them, by defining and triggering them in the model. However, when I call saveChanges () on an editing context, which should trigger the stored procedure, I get the following exception:

com.webobjects.eoaccess.EOGeneralAdaptorException: evaluateExpression: com.webobjects.jdbcadaptor.JDBCChannel [EMAIL PROTECTED]: illegal attempt to evaluateExpression while a fetch is in progress at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContex tInformationAdded(EODatabaseContext.java:4685) at com.webobjects.eoaccess.EODatabaseContext.performChanges (EODatabaseContext.java:6393) at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditing Context(EOObjectStoreCoordinator.java:415) at com.webobjects.eocontrol.EOEditingContext.saveChanges (EOEditingContext.java:3226) at com.havaso.dvis.server.AdminUserCreator.createAdminUsers (AdminUserCreator.java:181)
        at com.havaso.dvis.server.Application.<init>(Application.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
at com.webobjects.appserver.WOApplication.main(WOApplication.java: 323)
        at com.havaso.dvis.server.Application.main(Application.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:71)

No changes are saved to the database.

Separately, both the code and the stored procedure perform as expected. But after adding the trigger in the model, this is the outcome. Anyone has an idea why?

Thanks,
Flor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/robertwalker1% 40mac.com

This email sent to [EMAIL PROTECTED]

--
Robert Walker
[EMAIL PROTECTED]



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to