Dear CMDBuild Team,
I have installed openMAINT and have slightly modified the attributes and relations of some cards.
For instance I have de-activated the UserAsset domain (1:N) for Person and Asset Cards and I have created an identical domain called OwnerAsset (1:N) (Person<->Asset).
Using openMAINT then seems to work perfectly, .....UNTIL I do a Tomcat restart (or reboot)!
Then, I see pop-up errors when I select to see the relations of the cards!
I wonder what is going on with the Tomcat restart and new domains fail to work successfully...
From the cmdbuild.log I copy the following, if you may have any idea what's wrong!
Thank you in advance,
Dimitris
When I try to read the relations of a Person Card:
INFO 2016-09-08 10:19:16 [jsonrpc ] Calling url /management/modcard/getcard
INFO 2016-09-08 10:19:16 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:19:16 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:19:16 [jsonrpc ] Calling url /email/email/readall
INFO 2016-09-08 10:19:16 [jsonrpc ] Calling url /management/modcard/getrelationlist
INFO 2016-09-08 10:19:16 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:19:16 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:19:16 [cmdbuild] getting where clause
WARN 2016-09-08 10:19:16 [sql ] cannot get content of column 'Person#Country#Description'
WARN 2016-09-08 10:19:16 [sql ] cannot get content of column 'Person#MainSeat#Description'
INFO 2016-09-08 10:19:16 [cmdbuild] getting where clause
ERROR 2016-09-08 10:19:16 [jsonrpc ] A org.springframework.jdbc.BadSqlGrammarException occurred calling method class org.cmdbuild.servlets.json.management.ModCard.getRelationList: PreparedStatementCallback; bad SQL grammar [SELECT *, count(*) over() AS _SRC__RowsCount FROM (
SELECT
"SRC"."Code" AS "SRC#Code", "SRC"."Description" AS "SRC#Description", "DST"."Code" AS "DST#Code", "DST"."Description" AS "DST#Description", "SRC"."IdClass"::oid AS "_SRC_IdClass", "SRC"."Id" AS "_SRC_Id", "SRC"."User" AS "_SRC_User", "SRC"."BeginDate" AS "_SRC_BeginDate", "DST"."IdClass"::oid AS "_DST_IdClass", "DST"."Id" AS "_DST_Id", "DST"."User" AS "_DST_User", "DST"."BeginDate" AS "_DST_BeginDate", "DOM"."IdDomain"::oid AS "_DOM_IdDomain", "DOM"."_Src" AS "_DOM__Src", "DOM"."Id" AS "_DOM_Id", "DOM"."User" AS "_DOM_User", "DOM"."BeginDate" AS "_DOM_BeginDate", "DOM"."EndDate" AS "_DOM_EndDate", "DOM"."IdObj1" AS "_DOM_IdObj1", "DOM"."IdObj2" AS "_DOM_IdObj2"
FROM "Person" AS "SRC"
JOIN (SELECT "Id", "IdDomain", ? AS "_Src", "IdObj1", "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY gis."Map_OwnerAsset" WHERE "gis_Map_OwnerAsset"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj2" AS "IdObj1", "IdObj1" AS "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_ComplexStakeholder" WHERE "Map_ComplexStakeholder"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj2" AS "IdObj1", "IdObj1" AS "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_RoomStakeholder" WHERE "Map_RoomStakeholder"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj1", "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY gis."Map_HeldByAsset" WHERE "gis_Map_HeldByAsset"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj1", "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_ClassEmail" WHERE "Map_ClassEmail"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj2" AS "IdObj1", "IdObj1" AS "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_UnitStakeholder" WHERE "Map_UnitStakeholder"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj2" AS "IdObj1", "IdObj1" AS "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_FloorStakeholder" WHERE "Map_FloorStakeholder"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj1", "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY gis."Map_ContactAsset" WHERE "gis_Map_ContactAsset"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj1", "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_SuggestedAssigneeWorkorder" WHERE "Map_SuggestedAssigneeWorkorder"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj1", "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_SupervisorTeam" WHERE "Map_SupervisorTeam"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj1", "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_UserMovMgmt" WHERE "Map_UserMovMgmt"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj1", "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_ClassMetadata" WHERE "Map_ClassMetadata"."Status" = ? UNION ALL SELECT "Id", "IdDomain", ? AS "_Src", "IdObj2" AS "IdObj1", "IdObj1" AS "IdObj2", "User", "BeginDate", NULL AS "EndDate" FROM ONLY "Map_BuildingStakeholder" WHERE "Map_BuildingStakeholder"."Status" = ?) AS "DOM" ON "SRC"."Id"="DOM"."IdObj1" JOIN (SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Phone" WHERE "Phone"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Workorder" WHERE "Workorder"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "PrinterScanner" WHERE "PrinterScanner"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Floor" WHERE "Floor"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Computer" WHERE "Computer"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Team" WHERE "Team"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "GenericSecuritySystem" WHERE "GenericSecuritySystem"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Alarm" WHERE "Alarm"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "SanitationDevice" WHERE "SanitationDevice"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Building" WHERE "Building"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Lighting" WHERE "Lighting"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "GenericConstructionElement" WHERE "GenericConstructionElement"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Lift" WHERE "Lift"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Equipment" WHERE "Equipment"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Heater" WHERE "Heater"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "GenericItDevice" WHERE "GenericItDevice"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "DoorWindow" WHERE "DoorWindow"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "NetworkDevice" WHERE "NetworkDevice"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "GenericHvacDevice" WHERE "GenericHvacDevice"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "GenericConveyorDevice" WHERE "GenericConveyorDevice"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Sink" WHERE "Sink"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Complex" WHERE "Complex"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Unit" WHERE "Unit"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "GenericElectricalDevice" WHERE "GenericElectricalDevice"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "PlumbingDevice" WHERE "PlumbingDevice"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "GenericTelecommunicationDevice" WHERE "GenericTelecommunicationDevice"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "FireExtinguisher" WHERE "FireExtinguisher"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Room" WHERE "Room"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "WarehouseManagement" WHERE "WarehouseManagement"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Metadata" WHERE "Metadata"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "GenericFurnishingElement" WHERE "GenericFurnishingElement"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Desk" WHERE "Desk"."Status" = ? UNION ALL SELECT "Id", "IdClass", "User", "BeginDate", NULL AS "EndDate", NULL AS "CurrentId", "Code", "Description" FROM ONLY "Email" WHERE "Email"."Status" = ?) AS "DST" ON "DOM"."IdObj2"="DST"."Id"
WHERE "SRC"."Id" = ? AND "SRC"."Status" = ?) AS main
ORDER BY "DST#Description" ASC, "_SRC_Id"
LIMIT 2147483647
OFFSET 0]; nested exception is org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "gis_Map_OwnerAsset"
Position: 897
INFO 2016-09-08 10:19:16 [cmdbuild] getting where clause
INFO 2016-09-08 10:19:16 [cmdbuild] getting where clause
INFO 2016-09-08 10:19:16 [cmdbuild] getting where clause
INFO 2016-09-08 10:19:16 [cmdbuild] getting where clause
INFO 2016-09-08 10:19:16 [cmdbuild] getting where clause
INFO 2016-09-08 10:19:16 [jsonrpc ] Calling url /email/template/readall
INFO 2016-09-08 10:19:16 [cmdbuild] reading all templates
When I try to read the Relations of an Asset Card:
INFO 2016-09-08 10:49:06 [jsonrpc ] Calling url /schema/modclass/getattributelist
INFO 2016-09-08 10:49:06 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:49:06 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:49:06 [jsonrpc ] Calling url /schema/modclass/getfktargetingclass
INFO 2016-09-08 10:49:06 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:49:06 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:49:06 [jsonrpc ] Calling url /schema/modclass/getattributelist
INFO 2016-09-08 10:49:06 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:49:06 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
INFO 2016-09-08 10:49:06 [jsonrpc ] Calling url /utils/generateid
INFO 2016-09-08 10:49:06 [jsonrpc ] Calling url /email/email/readall
INFO 2016-09-08 10:49:06 [jsonrpc ] Calling url /email/template/readall
INFO 2016-09-08 10:49:06 [cmdbuild] reading all templates
ERROR 2016-09-08 10:49:06 [jsonrpc ] A org.cmdbuild.exception.NotFoundException occurred calling method class org.cmdbuild.servlets.json.schema.ModClass.getAttributeList: DOMAIN_NOTFOUND OwnerAsset
ERROR 2016-09-08 10:49:06 [jsonrpc ] A org.cmdbuild.exception.NotFoundException occurred calling method class org.cmdbuild.servlets.json.schema.ModClass.getAttributeList: DOMAIN_NOTFOUND OwnerAsset