Question

Refresh Cache/Refresh Cache Full throws error: Incorrect syntax near 'EN'


Userlevel 4
Badge +11

Hi,

on our DEV, when running refresh cache or refresh cache full we often get error: The following system level exception was generated by the application: Incorrect syntax near 'EN'.
Contact your system administrator for assistance. The server log or event log may contain more details about the error.

 

After executing the refresh cache for several times the error doesn’t appear.  And the next refresh cache, the error reappears.

Any idea what causing the error?

 

-- server log showed info like this:

Timestamp: 2022-05-20T11:57:08.1490252+00:00
Message: SQL Server Exception: number=102: Incorrect syntax near 'EN'.
Machine: DW1MDWK0000AU
App Domain: /LM/W3SVC/1251523880/ROOT-1-132968143322143582
ProcessId: 10176
Process Name: w3wp
Thread Name: ServiceRequest_456

Timestamp: 2022-05-20T11:57:08.1802774+00:00
Message: SQL Server exception (102:Incorrect syntax near 'EN'.) executing following SQL:
SELECT MESSAGE_ID, LOCALE_CODE, MESSAGE_TYPE, MESSAGE_TEXT from metrix_message_def_view where LOCALE_CODE in ('EN-US','NL-NL',' EN-US',' 'EN-US'')
Machine: DW1MDWK0000AU
App Domain: /LM/W3SVC/1251523880/ROOT-1-132968143322143582
ProcessId: 10176
Process Name: w3wp
Thread Name: ServiceRequest_456

 


8 replies

Userlevel 5
Badge +13

hi @JuniSihombing,

Since the issue is mentioned as the ‘102:Incorrect syntax near 'EN'’,  I have tried to execute the below query(same query in your exception) to check where the issue is.

As you can see, I am getting the same error during the execution of the above code. The issue of this code is below reasons.

  1. Inverted commas which are defined in the local_code section are not equal
  2. There are some spaces before the EN-US.

By removing and fixing the above mentioned issues, the below query was working fine.

So, it seems there are some places which using this query created some unwanted spaces, inverted commas. (You need to check and investigate the specific place where this error is coming from)

Please note that this is just an assumption in this case. 😊

Thanks and regards,

Hasara

Userlevel 4
Badge +11

Hi @Hasara Dinu

the data in locale-code looks correct.  And there are no double entries.

 Length of code value reflects the number of characters in code-value. 

 

 

Userlevel 5
Badge +13

Hi @JuniSihombing,

Could you please check below approach?

hi @JuniSihombing,

Since the issue is mentioned as the ‘102:Incorrect syntax near 'EN'’,  I have tried to execute the below query(same query in your exception) to check where the issue is.

As you can see, I am getting the same error during the execution of the above code. The issue of this code is below reasons.

  1. Inverted commas which are defined in the local_code section are not equal
  2. There are some spaces before the EN-US.

By removing and fixing the above mentioned issues, the below query was working fine.

So, it seems there are some places which using this query created some unwanted spaces, inverted commas. (You need to check and investigate the specific place where this error is coming from)

Please note that this is just an assumption in this case. 😊

Thanks and regards,

Hasara

Thanks,

Hasara

Userlevel 4
Badge +11

Hi @Hasara Dinu,

understood that the query returns error because of not correct statement.

 

The question, what causes the query returns when doing the cache refresh.  

You mentioned: (You need to check and investigate the specific place where this error is coming from)  » this is the intention of my post :-)   How can I check and investigate the specific place where the error is coming.  Entry of locale-code is correct, but error  occurs when doing cache refresh. ;-)

I have tried to increase the exception, information, BR level of server log, but don’t see any other exception unless that message..

 

Any other idea how to check and investigate?

 

Best regards,

~Juni

 

 

 

Userlevel 7
Badge +22

Hi @JuniSihombing 

Since the issue is coming from the baseline fsm message translations (metrix_message_def), you might need to raise a support case to have a look on this, unless if you haven’t done any changes to metrix_message_def data forcefully. Most likely this looks to be a bug, if this is replicated on the other environments. What is the fsm version that you’re using here?

Userlevel 4
Badge +11

Hi Saranga,

it’s not replicated on other environments.  It’s only on DEV.

What I also notice, cache refresh for webclient version on DEV is also very slow.

 

We use FSM6U16.

 

~Juni

Userlevel 5
Badge +15

Just a guess - try this query: select distinct locale_code from person.  If you get more than one that looks like EN-US, then you’ve got bad data.  Maybe someone was doing bad things by updating the database directly.

Userlevel 4
Badge +11

Hi @brian.gummin,

the locale_code(s) are all correct. 

 

Reply