The Semi-Rookie Rides again - How to decypher this error

Hi all,

I occasionally will get an error like this while working on my code and manipulating test data, especially when working with empty tables. I will click to open a particular form and immediately get the error.

Error in relation

com.servoy.j2db.persistence.RepositoryException: java.lang.IllegalStateException: Could not resolve column public:tblsuppliesdb:/workingartist/tblsupplies#tblsupplies2963.1073753753=?

I am guessing that because the relation is created in Servoy that Servoy is generating this message. I get that it has something to do with a problem with a relation and the supplies table. But, how to figure out which relation? There’s no line number associated with the error message. So, it’s happening at some point before any code is executed? I may have a dozen relations setup using this table. Is there something in this message that is telling me which relation to look at? Is there a way to determine what column this message is referring to?

I’m not even sure where to look to figure this out. Thanks for any guidance that you might be able to provide.

Thanks and have a good day.

Ron

Everytime I’ve had that problem, I restart the Servoy Developer and it goes away. I has happened to us when our program is running and we update the DBIs either by syncronizing with the DB or updating through SVN. May that be your case?

Hi jd,

Thanks for your comment.

Actually, after a good conversation with my own personal Servoy guru, Jason, I figured out what the problem was, and meant to post it yesterday. Let me describe it now.

As I’m testing my application, there are times when I go to pgadmin and clear out my tables in order to run more tests. Until recently, I had been doing a “DB sync” or a “reload table” in an effort to reflect those changes back in Servoy. I did find through further testing that if I restart Servoy, the problem goes away, just like you said.

As it turns out, the problem is because of the way that Servoy caches, which offers it tremendous advantages. When things are done within the Servoy environment, the cache is automatically updated and the world is a happy place. But, since I can’t delete records or change data within the developer say, by opening the table and altering it, I went into pgadmin to accomplish that. Bad idea, as it turns out, since then, the cache doesn’t know that changes were made, and it loses its mind when it goes to get data it thinks is there, and it’s gone. That leads to the error messages, which, granted, I still don’t completely understand as to their mention of the repository. I guess that when confusion reigns, anything is possible :)

So, the solution, as you said, to make it all go away, is to go ahead and make changes in pgadmin, but then just restart Servoy and everything is ok.

Have a great weekend.

Ron