Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

BadTableMappingException while committing data in database

SA-97164

Summary



BadTableMappingException while committing data in the database using the out-of-the-box pyDeleteAttachment rule.


Error Messages

com.pega.pegarules.pub.database.BadTableMappingException: Database-General
Cannot write property pxLatitude to a decimal column--its value, "NaN", is not a decimal
                at com.pega.pegarules.data.internal.access.PageDatabaseMapperImpl.setStmtInsert(PageDatabaseMapperImpl.java:2094)
                at com.pega.pegarules.data.internal.access.PageDatabaseMapperImpl.fillInSaveStatementWithoutStream(PageDatabaseMapperImpl.java:1552)
                at com.pega.pegarules.data.internal.access.Saver.getStatementWithPrepValues(Saver.java:1612)
                at com.pega.pegarules.data.internal.access.Saver.addBatch(Saver.java:993)
                at com.pega.pegarules.data.internal.access.Saver.saveInstance(Saver.java:888)
                at com.pega.pegarules.data.internal.access.Saver.saveInstance(Saver.java:803)
                at com.pega.pegarules.data.internal.access.UpdateProcessor.performOps(UpdateProcessor.java:1392)
                at com.pega.pegarules.data.internal.access.UpdateProcessor.action(UpdateProcessor.java:245)
                at com.pega.pegarules.data.internal.access.UpdateProcessor.action(UpdateProcessor.java:82)
                at com.pega.pegarules.data.internal.store.DataStoreManager.doInTransaction(DataStoreManager.java:235)
                at com.pega.pegarules.data.internal.access.UpdateProcessor.processUpdates(UpdateProcessor.java:178)
                at com.pega.pegarules.data.internal.access.DatabaseImpl.commit(DatabaseImpl.java:2066)
                at com.pegarules.generated.activity.ra_action_deleteattachment_d26bc4a01bce6c20d98292ac204cee80.step21_circum0(ra_action_deleteattachment_d26bc4a01bce6c20d98292ac204cee80.java:1607)


Steps to Reproduce

  1. Log in to the application
  2. Delete an attachment
  3. Commit data to the database using the pyDeleteAttachment rule


Root Cause



The pyGeolocationTrackingIsEnabled in @baseclass is set to false. However, the When rules from the Customer Service classes was set to true. If the When rule is set to true and there are no values in the latitude and longitude properties while writing to the database, errors occur.


Resolution



Perform the following local-change:

Create the pyGeolocationTrackingIsEnabled When rule in the concerned case type class and set it to false.




 

Published December 30, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us