• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
StoredProcedures triggered by the model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

StoredProcedures triggered by the model


  • Subject: StoredProcedures triggered by the model
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Mon, 14 May 2007 17:22:33 +0200

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 com.webobjects.jdbcadaptor.JDBCChannel@bf34f4: illegal attempt to evaluateExpression while a fetch is in progress
at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContextI nformationAdded(EODatabaseContext.java:4685)
at com.webobjects.eoaccess.EODatabaseContext.performChanges (EODatabaseContext.java:6393)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingCo ntext(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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: StoredProcedures triggered by the model
      • From: Robert Walker <email@hidden>
  • Prev by Date: Re: how to do a product->product-type->product-attributes with non pre-determined product-attributes?
  • Next by Date: Re: Java Client future
  • Previous by thread: Re: Java Client future
  • Next by thread: Re: StoredProcedures triggered by the model
  • Index(es):
    • Date
    • Thread