"Error quering for new pks in relatedfoundset"

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

"Error quering for new pks in relatedfoundset"

Postby mboegem » Wed Dec 29, 2010 1:54 am

Hi everyone,

does anyone know where the errormessage "Error quering for new pks in relatedfoundset" comes from.

one of the users reported this the other day, but I really have no idea how to reproduce it.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1748
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: "Error quering for new pks in relatedfoundset"

Postby jcompagner » Wed Dec 29, 2010 5:42 pm

somehow an exception occurred when refreshing a related foundset with data from the database.
In the log should be a better exception, (but yes on the client)

Maybe it was a hickup or something in the connection.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: "Error quering for new pks in relatedfoundset"

Postby mboegem » Wed Dec 29, 2010 5:52 pm

ok, thnkx Johan.
Then I can stop trying to reproduce the error...
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1748
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: "Error quering for new pks in relatedfoundset"

Postby bobpee » Tue Jan 04, 2011 3:51 pm

Am getting same error here.

This happens when I visit a solutionModel LOCKED_TABLE_VIEW form for a 2nd time - the 1st time form loads smoothly.

For the 2nd visit to my form, the following output throws in developer for the no. of records in my form's foundset:
Error quering for new pks in relatedfoundset
> com.servoy.j2db.dataprocessing.DataException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).


It looks like my db connection breaks somehow as a result of my visiting my form.

And from servoy_log.txt when this happens:
..................
...........
2011-01-04 14:01:13,921 ERROR [pool-5-thread-356] com.servoy.j2db.util.Debug - Throwable
com.servoy.j2db.dataprocessing.DataException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
at com.servoy.j2db.dblayer.Zb.Za(Zb.java:104)
at com.servoy.j2db.server.Zc.Zo.Za(Zo.java:974)
at com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:270)
at com.servoy.j2db.dataprocessing.Zu.performQuery(Zu.java:786)
at com.servoy.j2db.dataprocessing.DataServerProxy.performQuery(DataServerProxy.java:138)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.checkQueryForUpdates(RelatedFoundSet.java:899)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.getSize(RelatedFoundSet.java:407)
at com.servoy.j2db.dataprocessing.SwingRelatedFoundSet.getSize(SwingRelatedFoundSet.java:180)
at com.servoy.j2db.dataprocessing.FoundSet.getRelatedFoundSet(FoundSet.java:4646)
at com.servoy.j2db.dataprocessing.Record.getRelatedFoundSet(Record.java:658)
at com.servoy.j2db.smart.dataui.CellAdapter$ASynchonizedCellLoad.run(CellAdapter.java:835)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
..................
...........


Hi Marc ( or any other person who know about this error ), could you find a workaroud this?
Bob Prah,
[Servoy 5.2.4 - build 1006]
User avatar
bobpee
 
Posts: 81
Joined: Tue Mar 04, 2008 1:05 pm

Re: "Error quering for new pks in relatedfoundset"

Postby jcompagner » Tue Jan 04, 2011 4:34 pm

and you are sure that the first time it worked
and after the first time you see a active/idle connection on the admin pages for that server?

Because it seems to me that it just can't connect to the db, you get a login failure.
So it sounds very weird to me that the first time we can create a connection, but after that it fails somehow.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: "Error quering for new pks in relatedfoundset"

Postby bobpee » Tue Jan 04, 2011 6:45 pm

It's a weird behavior I'd say. I am experiencing that in Developer's web- and smart- clients, not on Servoy server running my solution.

It appears to be a Sybase connection problem, but it only happens when I go to this particular solutionModel LOCKED_TABLE_VIEW form of mine for the 2nd time.
Bob Prah,
[Servoy 5.2.4 - build 1006]
User avatar
bobpee
 
Posts: 81
Joined: Tue Mar 04, 2008 1:05 pm

Re: "Error quering for new pks in relatedfoundset"

Postby jcompagner » Tue Jan 04, 2011 7:16 pm

that all locked or not has nothing to do with it.
it just does a query (from a tableview cell, a related query) and that query asks for a connection. That connection can not be created because of a login failure

Are you sure that the first time you show exactly the same data? Is there somehow a related data that goes to a different server that is not configured correctly?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: "Error quering for new pks in relatedfoundset"

Postby bobpee » Thu Jan 06, 2011 5:51 pm

Are you sure that the first time you show exactly the same data? Is there somehow a related data that goes to a different server that is not configured correctly?

Yes, I am sure. And I do not use any "related data that goes to a different server that is not configured correctly". The connected database servers that my solution uses is where all related data in my solution point to.

Have observed that 3 different Servoy users at 3 diferent times have triggered and or reported the same "Error quering for new pks in relatedfoundset" error on this forum.
There has to be something to it. Question: what could prevent (or what triggers) "quering for new pks in relatedfoundset" errors?

Certainly, one of the answers to the above is error JZ00L (SQL exception http://bit.ly/dSp5Ea), which is what happens in my case.

Johan, what I also find weird is that the 1st visit to my form, loads the form smoothly, no errors. I navigate away from my form, come back to it for the 2nd time and alas!, error "Error quering for new pks in relatedfoundset" throws.

Have checked my db server nodes under my developers's "Database Servers" after the above happens to see their status (including performing a node Refresh view(F5)) , and they all appear still connected.

Something is limiting (and or breaking) my database connection when I visit my form for the 2nd time and, that is what appears weird to me.

If still in doubt, I can offer a live demo to show that it does happen, just let me know :) .

Kind regards,
Last edited by bobpee on Tue Jan 11, 2011 10:44 am, edited 2 times in total.
Bob Prah,
[Servoy 5.2.4 - build 1006]
User avatar
bobpee
 
Posts: 81
Joined: Tue Mar 04, 2008 1:05 pm

Re: "Error quering for new pks in relatedfoundset"

Postby jcompagner » Thu Jan 06, 2011 5:58 pm

what happens if that you load your form and that works just fine
all related data is loaded

But then you go to another form, you or some other user changes something and because of that a related foundset wants to refresh it self.
that is this part:

at com.servoy.j2db.dataprocessing.RelatedFoundSet.checkQueryForUpdates(RelatedFoundSet.java:899)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.getSize(RelatedFoundSet.java:407)

this can happen in multiply threads at once, it goes it big blocks, so it could be that there are multiply connections needed at once so i guess in your case a new connection is being made (or tried)
and that fails because sybase tells us that. So some how sybase doesnt allow that login anymore
Maybe because that login can only have X number of connections??
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: "Error quering for new pks in relatedfoundset"

Postby bobpee » Fri Jan 07, 2011 1:17 am

this can happen in multiply threads at once, it goes it big blocks, so it could be that there are multiply connections needed at once so i guess in your case a new connection is being made (or tried)
and that fails because sybase tells us that. So some how sybase doesnt allow that login anymore
Maybe because that login can only have X number of connections??


Johan can you maybe explain the last part a little bit more? I am curious about what's happening. Something limits and or break my db connection and it's either on my back-end db side or on the Servoy side.

I have 3 db instances(db server connections) apart from apart from "servoy-repository" in my solution's set-up. I expect these db instances to be able to handle all connections to and from my back-end dbs, which is the normal experience I am used to. Question: can something be done on my Servoy-Eclipse side to increase the numbers of connections to my dbs?

When I login to my solution and I navigate from form-to-form, where some of the forms also use related foundsets, everything runs smoothly. I come to one particular solutionModel generated form for the 1st time and, it also loads nicely. I navigate away from that form and, go to any other form and nothing unexpected happens.

All this time, the fact could be that my back-end db allows me some limited no. of concurrent connections. Now, my 2nd visit to my generated form suddenly throws an "Error quering for new pks in relatedfoundset" error. If the reason is that my back-end db's concurrent connection limit is exceeded as a result of probably some multi-threading processing to generate form that requires more db connections , then what is still strange to me is that why didn't the 1st visit throw this same "Error quering for new pks in relatedfoundset" error?

Could it probably be that the threads generated on my 1st visit to my gen. form were never terminated when I left it?
Bob Prah,
[Servoy 5.2.4 - build 1006]
User avatar
bobpee
 
Posts: 81
Joined: Tue Mar 04, 2008 1:05 pm

Re: "Error quering for new pks in relatedfoundset"

Postby jcompagner » Fri Jan 07, 2011 2:26 pm

bobpee wrote:Johan can you maybe explain the last part a little bit more? I am curious about what's happening. Something limits and or break my db connection and it's either on my back-end db side or on the Servoy side.


it is not the servoy side if you get that error, we just try to create a new connection to the database. And the database doesn't allow it. There is not much that we can do then.

bobpee wrote:I have 3 db instances(db server connections) apart from apart from "servoy-repository" in my solution's set-up. I expect these db instances to be able to handle all connections to and from my back-end dbs, which is the normal experience I am used to. Question: can something be done on my Servoy-Eclipse side to increase the numbers of connections to my dbs?


No because this is not that servoy it self is not allowed to create any more connections (see the max number of connections property of a server definition)
But that is not reached yet, so upping that doesn't help one bit.

Maybe the other way around.. don't allow more connections. So that servoy must reused existing connections (and wait for them if they are in use) so that servoy does not try to create a new one (that then fails)

bobpee wrote:When I login to my solution and I navigate from form-to-form, where some of the forms also use related foundsets, everything runs smoothly. I come to one particular solutionModel generated form for the 1st time and, it also loads nicely. I navigate away from that form and, go to any other form and nothing unexpected happens.

All this time, the fact could be that my back-end db allows me some limited no. of concurrent connections. Now, my 2nd visit to my generated form suddenly throws an "Error quering for new pks in relatedfoundset" error. If the reason is that my back-end db's concurrent connection limit is exceeded as a result of probably some multi-threading processing to generate form that requires more db connections , then what is still strange to me is that why didn't the 1st visit throw this same "Error quering for new pks in relatedfoundset" error?

Could it probably be that the threads generated on my 1st visit to my gen. form were never terminated when I left it?


that is impossible, there are no threads hanging or something.
The tableview just spawns some threads to load some specific cells in the background (that we see are related or calculations)

That it also did the first time, so i don't know what the difference is, maybe it was also already loading something else so there is a bit of difference in what is loaded at what time.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: "Error quering for new pks in relatedfoundset"

Postby bobpee » Fri Jan 07, 2011 4:39 pm

Thanks , Johan :wink:

I will be investigating further on my Sybase db back-end side. Probably, that is where the limitation is. Will confirm that soon and will post if I find something interesting for the forum.

Kind regards
Bob Prah,
[Servoy 5.2.4 - build 1006]
User avatar
bobpee
 
Posts: 81
Joined: Tue Mar 04, 2008 1:05 pm

Re: "Error quering for new pks in relatedfoundset"

Postby palacio » Wed Nov 16, 2016 6:09 pm

Hi,

Has anyone resolved this error "Error quering for new pks in relatedfoundset" ??

Thank you
palacio
 
Posts: 47
Joined: Tue Aug 18, 2015 12:29 pm

Re: "Error quering for new pks in relatedfoundset"

Postby rafig » Wed Nov 23, 2016 2:11 pm

Hi Bob,
I notice from your 'signature' that you are using Servoy 5.2.4 (otherwise you need to update your signature :) ).
This is a very old version of Servoy so it might be worth creating a separate developer install of a newer version (at least 7.x) and importing your current solution and settings in to that and then trying to see if that fixes anything.
Also, what driver are using (& what version of Sybase), as that may also affect things.

Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 706
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 1 guest