Help reading server log

Hello - I’ve got some exceptions being thrown but the server logs are not descriptive enough for me to find the issue. How can I identify the offending BPM, BAQ, or UD Configurator Method? Sample below.
Thank you!

<Exception act="unknown" machine="xxx" pid="12872" tid="90"><![CDATA[System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting from a character string to uniqueidentifier.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
   at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
   at System.Data.SqlClient.SqlDataReader.Read()
   at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
   at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at System.Data.DataTable.Load(IDataReader reader, LoadOption loadOption, FillErrorEventHandler errorHandler)
   at Ice.Blaq.Execution.QueryExecutor.LoadTable(IDataReader rdr, DataTable table, QueryInfo queryInfo) in C:\_releases\ICE\ICE3.2.700.12\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutor.cs:line 324
   at Ice.Blaq.Execution.QueryExecutor.FillResultToResultsTable(IDataReader rdr, IDbCommand cmd, DataTable resultTable, QueryInfo queryInfo, Action`1 afterFillResultTable) in C:\_releases\ICE\ICE3.2.700.12\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutor.cs:line 248
   at Ice.Blaq.Execution.QueryExecutor.FillResultDataset(IDataReader rdr, IDbCommand cmd, DataSet resultDs, QueryInfo queryInfo, Action`1 afterFillResultTable) in C:\_releases\ICE\ICE3.2.700.12\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutor.cs:line 181
   at Ice.Blaq.Execution.QueryExecutor.ExecuteAndFillDataSetInternal(IDbConnection dbconn, QueryInfo queryInfo, DataSet resultDataset, Action`2 perfLogger) in C:\_releases\ICE\ICE3.2.700.12\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutor.cs:line 118
   at Ice.Blaq.Execution.QueryExecutor.<>c__DisplayClass3_0.<ExecuteAndFillDataSet>b__0(IDbConnection dbconn) in C:\_releases\ICE\ICE3.2.700.12\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutor.cs:line 37
   at Ice.Blaq.Execution.QueryExecutionHelper.DoJobWithObject[TObj](Func`2 theJob) in C:\_releases\ICE\ICE3.2.700.12\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutionHelper.cs:line 195
ClientConnectionId:c9391d0a-483c-4eec-b297-ee098cec3aad
Error Number:8169,State:2,Class:16]]></Exception>

Looking closely, I do not think that has the information you want in it.

I can tell you what happened, but not the trigger.

1 Like

Agreed - it’s trying to convert into a guid and failing, just can’t find where to correct it

Is your serverlog in verbose mode?

image

I get details on Epicor triggers and then each bpm that run is listed so you see the bpm name just before the exception.

I also use trace flag T460 which makes a clearer sql error on truncations, but I do not know if it would apply to this error.

4 Likes

Mike, are you able to replicate this error or is this something that happens from time to time and you’re trying to figure it out?

The stack trace is from BAQ, so BAQ Logging should be enough

2 Likes

Hello - Thank you all for your replies. I got sidetracked and apologize.

@gpayne I did eventually turn on verbose mode and got some more clues (the action that happened directly before the error)
@Olga I turned on BAQ Logging, which produced the nondescript error in my sample.
@utaylor It happens daily, and I wind up having to recycle my app pool midday sometimes.

I’ve got a number of BAQ’s being fired via REST API and do match on SysRowID for some of these queries. Converting the string parameter to a uniqueidentifier in the filter expression definitely helped things, so I think I’m on the right track.

I just wish the log was able to identify exactly where the error was occurring. It would speed up debugging tenfolod.

I use Ice.Diagnostics.Log.WriteEntry lines at the start and exit of almost all of my routines, so I can see where the issues are occurring. I also use them to see current progress if it is a data related issue.

Ice.Diagnostics.Log.WriteEntry("starting rollup");

Good point - I do this as well in all my BPMs. I think this is a BAQ causing the issue though, & don’t know If writing log entries in this manner is possible.

You are right it is not. I do get BAQ entries like below, but I don’t know if those get written if the BAQ fails.

This message you get when you enables
<add uri="profile://ice/fw/DynamicQuery/BaqStatement" />
trace flag. If TS version is accurate they probably don’t have it yet.

and yes, it is written for failed baq too.

2 Likes

Thank you all for your insight. I never did quote nail down where the error might be, and am now thinking REST calls are timing out.
I’ve stood up two REST APIs on other company DBs for Epicor to query against, and if those are edited in any way, active sessions between the Epicor server and the Web server where they are hosted enter a state of limbo. Recycling Epicor’s App Server instantly fixes the issue.

By the way don’t forget to turn that logging off after you have finished… Just saying

2 Likes