Hi all,

I have a problem with my Derby database connexion :
------------------------------
Exception in thread "Timer-1" com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.DerbyPlugIn$DerbyExpression: "INSERT INTO Entry(....) Next exception:SQL State:23503 -- error code: 20000 -- msg: INSERT on table 'ENTRY' caused a violation of foreign key constraint 'ENTRY_USERPORTAL_FK' for key (15). The statement has been rolled back. Next exception:SQL Warning:01J01 -- error code: 10000 -- msg: Database 'myDatabase' not created, connection made to existing database instead. at com .webobjects .eoaccess .EODatabaseContext ._exceptionWithDatabaseContextInformationAdded(EODatabaseContext.java: 4685) at com .webobjects .eoaccess.EODatabaseContext.performChanges(EODatabaseContext.java:6393) at com .webobjects .eocontrol .EOObjectStoreCoordinator .saveChangesInEditingContext(EOObjectStoreCoordinator.java:415) at com .webobjects .eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3226)
        at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981)
        at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903)
        at com.company.client.Application$2.run(Application.java:1465)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
------------------------------

I don't know where this error come from.
I try to insert an object in the database, then another object. Then link these two objects, and finally saveChanges, but I get this exception. If I insert an object, save changes. Then the other object, save changes. And finally link these objects, save changes, all work..

I think there is a problem with creation of my database, I don't really know what is the best way to do that, it's a little strange. Or is it a problem with my editing context ? I use ERXEC.newEditingContext

Database config :
        Prototype : EOJDBCPrototypes
        Adaptor : JDBC
        URL = jdbc:derby:myDatabase;create=true
        Driver = org.apache.derby.jdbc.EmbeddedDriver

Thanks for your help
_______________________________________________
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