You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by "Vince S." <vi...@outlook.com> on 2020/04/28 20:54:43 UTC

Error resolving fault for ObjectId: and state (hollow)

I am getting the following exception:

Caused by: org.apache.cayenne.FaultFailureException: [v.3.0-SNAPSHOT Aug 26 2011 14:27:54] Error resolving fault for ObjectId: <ObjectId:User, USERID=0> and state (hollow). Possible cause - matching row is missing from the database.
at org.apache.cayenne.BaseContext.prepareForAccess(BaseContext.java:171)
at org.apache.cayenne.CayenneDataObject.readProperty(CayenneDataObject.java:219)

I researched and saw that the following JIRA had been created to address this issue. What happened in my case is I attempted to delete a record from a table that had foreign key constraints. So within SSMS, it gave me the error, but the data I attempted to delete remained in the table. However, after that, every time I attempt to access the table using Cayenne, I get the above exception. I tried everything, including Restoring my Sql Server database from a backup, but I still get the error.

What is really strange is the error happens when I use an Expression and a SelectQuery. If I use raw sql to access the table in question with a SQLTemplate, there is no error!

Here is a JIRA that talks about the exact same issue, but there was no replyhttps://issues.apache.org/jira/browse/CAY-2096

Please advise as to what the issue might be. Thank you

Vince Smith

Re: Error resolving fault for ObjectId: and state (hollow)

Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Vince,

My memory is really rusty on Cayenne 3.0 (and looks like you even have a pre-GA version there). 

>  tried everything, including Restoring my Sql Server database from a backup, but I still get the error.

Does it happen after the Cayenne app restart? (Not suggesting that restart is the solution, just trying to understand the symptoms).

Andrus


> On Apr 28, 2020, at 11:54 PM, Vince S. <vi...@outlook.com> wrote:
> 
> I am getting the following exception:
> 
> Caused by: org.apache.cayenne.FaultFailureException: [v.3.0-SNAPSHOT Aug 26 2011 14:27:54] Error resolving fault for ObjectId: <ObjectId:User, USERID=0> and state (hollow). Possible cause - matching row is missing from the database.
> at org.apache.cayenne.BaseContext.prepareForAccess(BaseContext.java:171)
> at org.apache.cayenne.CayenneDataObject.readProperty(CayenneDataObject.java:219)
> 
> I researched and saw that the following JIRA had been created to address this issue. What happened in my case is I attempted to delete a record from a table that had foreign key constraints. So within SSMS, it gave me the error, but the data I attempted to delete remained in the table. However, after that, every time I attempt to access the table using Cayenne, I get the above exception. I tried everything, including Restoring my Sql Server database from a backup, but I still get the error.
> 
> What is really strange is the error happens when I use an Expression and a SelectQuery. If I use raw sql to access the table in question with a SQLTemplate, there is no error!
> 
> Here is a JIRA that talks about the exact same issue, but there was no replyhttps://issues.apache.org/jira/browse/CAY-2096
> 
> Please advise as to what the issue might be. Thank you
> 
> Vince Smith