Re: Error with Cross-Model/Database Relationship
Re: Error with Cross-Model/Database Relationship
- Subject: Re: Error with Cross-Model/Database Relationship
- From: Chuck Hill <email@hidden>
- Date: Mon, 8 Dec 2008 11:39:48 -0800
On Dec 8, 2008, at 11:36 AM, Tonny Staunsbrink wrote:
I had a similar problem and was never able to fix it. The solution
was to make the foreign keys visible and create the faults in my own
code.
I have a feeling that it is a bug in handling cross-database
relationships where the destination object is part of an inheritance
structure. I see that ERXEntityDependencyOrderingDelegate is what is
throwing the error... maybe the bug is in there?
It is just reporting it:
public boolean
databaseContextShouldHandleDatabaseException(EODatabaseContext dbCtxt,
Throwable exception)
{
// Useful for debugging
if ( ! (exception instanceof EOGeneralAdaptorException))
{
logger.error("Unexpected non-EOGeneralAdaptorException
exception", exception);
}
return true;
}
Chuck
Dave
Dec 02 08:24:34 BakeryManagementJavaClient[60404]
(ERXNSLogLog4jBridge.java:46) DEBUG NSLog - === Begin Internal
Transaction
Dec 02 08:24:34 BakeryManagementJavaClient[60404]
(ERXNSLogLog4jBridge.java:46) DEBUG NSLog - evaluateExpression:
<com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression:
"SELECT t0.External_Lot_Code_ID, t0.External_Lot_Code_Value,
t0.External_Part_Number, t0.Lot_Code_ID FROM dbo.MSDynamics_Lot_Code
t0 WHERE UPPER(t0.External_Lot_Code_Value) LIKE UPPER(?) ESCAPE '\'"
withBindings: 1:"8P31808269%"(externalLotCodeValue)>
Dec 02 08:24:37 BakeryManagementJavaClient[60404]
(ERXNSLogLog4jBridge.java:46) DEBUG NSLog - 45 row(s) processed
Dec 02 08:24:37 BakeryManagementJavaClient[60404]
(ERXNSLogLog4jBridge.java:46) DEBUG NSLog - === Commit Internal
Transaction
Dec 02 08:24:37 BakeryManagementJavaClient[60404]
(ERXDatabaseContextDelegate.java:153) INFO
er.transaction.adaptor.Exceptions - Database Exception occured:
java.lang.IllegalStateException: The object with globalID
_EOIntegralKeyGlobalID[LotCode (java.lang.Long)143937] could not be
found in the database. This could be result of a referential
integrity problem with the database. An empty fault could not be
created because the object's class could not be determined (e.g. the
GID is temporary or it is for an abstract entity).
Dec 02 08:24:37 BakeryManagementJavaClient[60404]
(ERXEntityDependencyOrderingDelegate.java:69) ERROR
com.webobjects.eoaccess.ERXEntityDependencyOrderingDelegate -
Unexpected non-EOGeneralAdaptorException exception
java.lang.IllegalStateException: The object with globalID
_EOIntegralKeyGlobalID[LotCode (java.lang.Long)143937] could not be
found in the database. This could be result of a referential
integrity problem with the database. An empty fault could not be
created because the object's class could not be determined (e.g. the
GID is temporary or it is for an abstract entity).
at
com
.webobjects
.eoaccess
.EODatabaseContext._fetchSingleObject(EODatabaseContext.java:3583)
at
com
.webobjects
.eoaccess
.EODatabaseContext
._objectFaultWithSnapshotRelationshipEditingContext
(EODatabaseContext.java:2532)
at
com
.webobjects
.eoaccess
.EODatabaseContext
.initializeObjectRowEntityEditingContext(EODatabaseContext.java:2433)
at
com
.webobjects
.eoaccess.EODatabaseContext.initializeObject(EODatabaseContext.java:
3734)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.initializeObject(EOObjectStoreCoordinator.java:646)
at
com
.webobjects
.eocontrol.EOEditingContext.initializeObject(EOEditingContext.java:
3805)
at er.extensions.eof.ERXEC.initializeObject(ERXEC.java:1047)
at com.webobjects.eoaccess.EODatabaseChannel
$
_EODatabaseChannelFetchResult
.initializeObjects(EODatabaseChannel.java:478)
at
com
.webobjects
.eoaccess
.EODatabaseContext
._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:
3240)
at
com
.webobjects
.eoaccess
.EODatabaseContext
.objectsWithFetchSpecification(EODatabaseContext.java:3346)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:539)
at
com
.webobjects
.eocontrol
.EOEditingContext
.objectsWithFetchSpecification(EOEditingContext.java:4114)
at
er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1109)
at
com
.webobjects
.eocontrol
.EOEditingContext
.objectsWithFetchSpecification(EOEditingContext.java:4500)
_______________________________________________
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
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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