Support Article

"Incorrect syntax" for SQL query error in log.



User is seeing below exception in the log file on regular basis.

' Unable to query the database: code: 156 SQLState: S0001 Message: Incorrect syntax near the keyword 'FROM'.'

Error Messages

2016-07-06 01:02:07,824 [gaDM:Administrators]] [ STANDARD] [ ] [ PegaDM:07.10] (redictorBinningSnapshot.Action) ERROR - Migrating predictor snapshots with old-style model IDs failed. Migration will be attempted again when next snapshot requested. Error: Exception in stage: ADM Predictor Snapshots / Error on node [9f1ba90e5f3e80b22149e061e2108aa6]
com.pega.dsm.dnode.api.dataflow.StageException: Exception in stage: ADM Predictor Snapshots
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageOutputSubscriber.onError(
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onError(
at com.pega.dsm.dnode.api.dataflow.DataFlow$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
at com.pega.dsm.dnode.impl.prpc.PrpcThreadFactory$
Caused by: com.pega.dsm.dnode.api.DNodeException: Could not perform database dataset operation on Data-Decision-ADM-PredictorBinningSnapshot
at com.pega.dsm.dnode.impl.dataset.database.DatabaseOperationsUtil$2.emit(
... 5 more
Caused by: Unable to query the database
at com.pega.dsm.dnode.impl.dataset.database.NativeSQLBatchReader.init(
at com.pega.dsm.dnode.impl.dataset.database.NativeSQLBatchReader.<init>(
at com.pega.dsm.dnode.impl.dataset.database.DatabaseOperationsUtil.readFromDatabase(
at com.pega.dsm.dnode.impl.dataset.database.DatabaseBrowseAllOperation$1.executeExposedLogic(
at com.pega.dsm.dnode.impl.dataset.database.DatabaseOperationsUtil$2.emit(
... 6 more
Caused by: Unable to query the database: code: 156 SQLState: S0001 Message: Incorrect syntax near the keyword 'FROM'.
DatabaseException caused by prior exception: Incorrect syntax near the keyword 'FROM'.
| SQL Code: 156 | SQL State: S0001

From: (B022B432284016601508062B68C26D2CD)

Steps to Reproduce

Not Applicable

Root Cause

A defect or configuration issue in the operating environment


Here’s the explanation for the reported behavior: 

This exception is thrown from agent '
ADMSnapshot' & this application is not using Pega Decision management. User disabled this agent to address this problem & it was mistakenly started in this environment manually.

Published July 14, 2016 - Updated July 23, 2016

Have a question? Get answers now.

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