Support Article
Database-BadTableMapping-TooManyProperties observed in log files
Summary
Unable to add user from PRPC in Production environment as the activity fails at Obj-Save method due to BadTableMappingException.
Developer has added few required user profiles manually in database using DML.
Error Messages
2014-11-01 09:14:21,102 [ch Thread t=009c0b70] [TABTHREAD0] [DemoFW:01.01.01] (xxx_FW_DEMOFW_Data_TUSER.Action) ERROR xxx.xxx|127.0.0.1 user1 - obj-save failed.
com.pega.pegarules.pub.database.BadTableMappingException: Database-BadTableMapping-TooManyProperties xxx-FW-CMSFW-Data-TUSER KBGPGRPP.TUSER PegaDATA RT_USER_FULL_NM
From: (H3F1F2E175DC5E1A35028D1ACD50E7F52:127.0.0.1)
at com.pega.pegarules.data.internal.access.PageDatabaseMapperImpl.fillInExternalSaveStatement(PageDatabaseMapperImpl.java:1665)
at com.pega.pegarules.data.internal.access.Saver.saveNewInstanceWithNoDeletedColumnNotOnlyIfNew(Saver.java:1081)
at com.pega.pegarules.data.internal.access.Saver.saveInstance(Saver.java:840)
at com.pega.pegarules.data.internal.access.DatabaseImpl.performOps(DatabaseImpl.java:3028)
at com.pega.pegarules.data.internal.access.DatabaseImpl.attemptToProcessUpdates(DatabaseImpl.java:2433)
at com.pega.pegarules.data.internal.access.DatabaseImpl.processUpdates(DatabaseImpl.java:2283)
at com.pega.pegarules.data.internal.access.Saver.save(Saver.java:652)
at com.pega.pegarules.data.internal.access.DatabaseImpl.save(DatabaseImpl.java:5196)
at com.pegarules.generated.activity.ra_action_adduser_af18bb15421566a9984956330dc3ea7b.step9_circum0(ra_action_adduser_af18bb15421566a9984956330dc3ea7b.java:1115)
at com.pegarules.generated.activity.ra_action_adduser_af18bb15421566a9984956330dc3ea7b.perform(ra_action_adduser_af18bb15421566a9984956330dc3ea7b.java:236)
.
.
.
Steps to Reproduce
Create properties, RT_USER and map it to a column of same name in a fully exposed table. Introduce one more property .RT_USER_FULL_NM and create respective column in table and map them.
Root Cause
Reported behavior was not manifesting in another environment (Model). On comparing the database class report from Modal with one from Production, it was found that developer had two properties namely, RT_USER and RT_USER_FULL_NM in the modal. And, RT_USER and .RT_USER_FULL_NM in the production. This dot prefix with the property name was causing this issue.
Resolution
Refer below link in Pega 7 Help and read Column Inclusion.
/prhelp/procomhelpmain.htm#rule-/rule-obj-/rule-obj-property/advanced.htm
"If this Single Value property is to belong to a top-level object (not to an embedded page) in any concrete class, indicate whether this property is to appear in the Database Class Mappings gadget and Modify Schema wizard as a candidate for an exposed column:
Leave blank if you do not anticipate any benefit in making this property an exposed column. Choose Required or Recommended to record your intent that a database administrator extend a database table schema to expose this property. These choices cause this property to appear as a candidate for column exposure in the Database Class Mappings gadget and Modify Database Schema wizard."
Local change is to set Column Inclusion as required for property .RT_USER_FULL_NM in production environment.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.