Multiple primary indices in .gen file

Posted by Darren Parr on 13-Jan-2020 00:55


Here's a strange one. We've just started getting this error. When loading the .gen file, the system crashes preparing the TT. On inspection the .gen file has two primary indices for a temp-table. This is clearly wrong. Has anyone come across this before?

There's nothing wrong with the class as far as I can see. I came out of eclipse and went back in and now a different temp-table is getting multiple primary indices. This is 12.1. We've never had this before and we have 300 BE's.

It all started when I moved the primary index in our temp-table's from the default to the seq index. I had incorrectly dumped our schema as temp-tables with the seq index non primary and so it was messing up server side sorting. Our TT definitions are static and so there is only one primary index specified. Its almost like our schema has been cached by eclipse and its making a mess now when we dump the .gen.

As we add the seq JFP stuff to temp-tables based on need, we can have the same temp-table "name" in different datasets where the primary index is different for those two temp-tables which share the same name. The .gen and DOH are fine with this but I cant be certain if the eclipse bit which exports it all is.


PS. I removed the ABL Service and recreated it too and it has no effect.

All Replies

Posted by Peter Judge on 13-Jan-2020 14:30

If it's the schema in the .GEN file that's getting multiple primary indexes, then you should log a bug with TS.
FWIW, in 11.7.5 I see errors in the agent log but no crash. The crash is worth reporting too.
[20/01/13@09:13:43.702-0500] P-108264 T-106968 1 AS-7 R-ROOT:w:00000001 LogMgrWrtr     [OE.W.DO.ServiceRegistryLoader ERROR] Error registering service "CustomerSvc v1.0.0"
[20/01/13@09:13:43.702-0500] P-108264 T-106968 1 AS-7 R-ROOT:w:00000001 LogMgrWrtr      Error(s) raised:
[20/01/13@09:13:43.702-0500] P-108264 T-106968 1 AS-7 R-ROOT:w:00000001 LogMgrWrtr                     TEMP-TABLE  must have only one primary key. (3389) (3389)
[20/01/13@09:13:43.702-0500] P-108264 T-106968 1 AS-7 R-ROOT:w:00000001 LogMgrWrtr                     Unable to prepare TEMP-TABLE indices. (9045) (9045)
I've created a bug (OCTA-18686 : DOH service loader tries to create TT's with >1 primary index if specified in GEN/MAP) to deal with this better.
-- peter

Posted by Darren Parr on 13-Jan-2020 15:08

Its driving me mad. I raised it with TS on Friday. Is this all java which creates this? I'd like to debug it if I could.

Posted by Peter Judge on 13-Jan-2020 15:22

The GEN file is all created in Java.
At runtime, the temp-tables are dynamically created in ABL, in the OpenEdge.Web.DataObject.ServiceRegistryLoader class. The CreateTempTable method reads the JSON and creates the TT.
-- peter

Posted by Darren Parr on 13-Jan-2020 21:49

I'm struggling with around 400 datasets to find which temp-table(s) is causing the issue so I'm wring a a routine to parse it and tell me so I can get to a position where I can check-in the .gen as I have 3 other people dependent on this system internally.

Are there any temp-files or similar working files which I could clear out which the java creates and maintains. I did notice a tendency for the routine to produce the same results like something was being retained until eclipse was restarted.


Posted by Darren Parr on 14-Jan-2020 16:10

OK. I parsed it and it showed me where the error was. I'm editing the .gen manually.

I think its struggling with the preprocessor. Its mostly ok but not always. I seem to have a single error in the .gen.

The bottom of the of the temp-table include file is as follows. Like I said we reuse the temp-table defn in different places.

The following is included by a dataset defn which a single BE uses. The .gen results in error

&IF "{1}" = "JFP" &THEN




   INDEX CompanyParametersP IS  UNIQUE  &IF "{1}" <> "JFP" &THEN PRIMARY &ENDIF CompanyCode

   &IF "{1}" = "JFP" &THEN



Heres the .gen snippet.

"indexes": {

               "CompanyParametersP": {

                   "primary": true,

                   "unique": true,

                   "word": false,

                   "fields": ["CompanyCode:asc"]


               "seq": {

                   "primary": true,

                   "unique": true,

                   "word": false,

                   "fields": ["seq:asc"]


This thread is closed