cancel
Showing results for 
Search instead for 
Did you mean: 

Find query which causes error log entry

0 Kudos

Hi,

I am currently having a problem on a MII 12.1 system. Every now and then, an SQL query fails and this creates an entry in the NW log. E.g.:

com.sap.xmii.Illuminator.logging.LHException: com.sap.xmii.Illuminator.logging.LHException: com.sap.xmii.Illuminator.logging.LHException: SQL error has occurred on query Conversion failed when converting the varchar value 'undefined' to data type int.
[EXCEPTION]
com.sap.xmii.Illuminator.logging.LHException: com.sap.xmii.Illuminator.logging.LHException: com.sap.xmii.Illuminator.logging.LHException: com.sap.xmii.Illuminator.logging.LHException: SQL error has occurred on query Conversion failed when converting the varchar value 'undefined' to data type int.
at com.sap.xmii.Illuminator.services.handlers.IlluminatorService.processRequest(IlluminatorService.java:86)

...


For me the problem is clear. The front end wants to select data from a query and sends "undefined" instead of an integer. It is a JavaScript application, so I just have to add if (bla === undefined) etc.


The only problem is that I have no idea which query fails, as this is not stated in the logs. The error does not cause any problems on the UI, so it can happen anywhere. Does somebody have an idea how I could find out which query (template) causes this error message? I thought about increasing the log level to trace all query template uses, but I did not find the correct log setting.


Thanks and best regards,

Gernot

Accepted Solutions (1)

Accepted Solutions (1)

former_member185280
Active Contributor
0 Kudos

If you get the User id and time frame from the logs you may be able to go to the Transaction Manager or ask them what they were doing at that time to get a clue and narrow things down. I would also look for other clues like confirmations or goods movements in SAP or whatever business systems you are using etc.  You can try turning up logging to info for the com.sap.xmii.Illuminator.templates.DBQuery location or similar but depending on when your exception is thrown it may not get there. I would be very careful turning up logging, especially if you have stressed system. Posting the full exception message might help too.

Regards,
Christian

0 Kudos

Hello Christian,

thank you for your suggestions. The user name was logged too, but the users could not recall what exactly they did at that time and we could not reproduce the log entry. It seems like in this case the Illuminator is called directly, so no entries in the Transaction Manager or in SAP as it was only a query on the local MII database.

But your suggestion with the logging path was useful. I changed the log setting for com.sap.xmii.Illuminator.tools.database.DBQuery to INFO and now all the queries are written into the log. It is a big quantity of entries, but the load of the MII system seems to stay more or less the same. I will check if the relevant log entry is also created when the error occurs.

Best regards,

Gernot

Answers (0)