Derby problem
Derby problem
- Subject: Derby problem
- From: WebObjects - Anazys <email@hidden>
- Date: Wed, 2 Sep 2009 02:42:20 +0200
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden