Issue 45661: IndexOutOfBounds exception when going to a samples detail page on a M1 / MSSQL environment

Assigned To:cnathe
Area:Sample Manager
Opened:2022-06-10 11:27 by Dan Duffek
Changed:2022-06-10 11:27 by Dan Duffek
Support Ticket: 
Pull Requests:
2022-06-10 11:27 Dan Duffek
Title»IndexOutOfBounds exception when going to a samples detail page on a M1 / MSSQL environment
Assigned To»cnathe
Area»Sample Manager
This only impacts users who have a Mac M1 machine and are running MSSQL.

The root of the problem is that Microsoft does not support a version of MSSQL on the M1, you have to make do with Azure SQL Edge.
Unfortunately Azure SQL Edge does not support CLR functions. This impact a few LKS features.

In LKSM the lack of CLR support causes an IndexOutOfBounds exception when going to a sample's overview page (callstack below).

To my knowledge none of our users/customers have hit this. However it is kind of a pain if you are trying to use LKSM locally on an M1 system.
It would be nice if some kind of work around could be implemented that would allow LKSM to run more reliable on an M1/MSSQL system.

java.lang.StringIndexOutOfBoundsException: offset 1419, length 1166
at java.lang.String.checkOffset( ~[?:?]
at java.lang.AbstractStringBuilder.insert( ~[?:?]
at java.lang.StringBuilder.insert( ~[?:?]
at ~[api-22.6-SNAPSHOT.jar:?]
at org.labkey.bigiron.mssql.BaseMicrosoftSqlServerDialect.getSelectConcat( ~[bigiron-22.6-SNAPSHOT.jar:?]
at org.labkey.bigiron.mssql.MicrosoftSqlServer2008R2Dialect.getSelectConcat( ~[bigiron-22.6-SNAPSHOT.jar:?]
at ~[api-22.6-SNAPSHOT.jar:?]
at org.labkey.experiment.api.LineageForeignKey$_MultiValuedForeignKey$2.getLookupSql( ~[experiment-22.6-SNAPSHOT.jar:?]
at ~[api-22.6-SNAPSHOT.jar:?]
at ~[api-22.6-SNAPSHOT.jar:?]
at org.labkey.query.sql.QuerySelectView.getSelectSQL( ~[query-22.6-SNAPSHOT.jar:?]
at org.labkey.query.sql.QuerySelectView.getSql( ~[query-22.6-SNAPSHOT.jar:?]
at org.labkey.query.QueryServiceImpl.getSelectSQL( ~[query-22.6-SNAPSHOT.jar:?]
at$TableSqlFactory.getSql( ~[api-22.6-SNAPSHOT.jar:?]
at ~[api-22.6-SNAPSHOT.jar:?]
at org.labkey.api.query.ReexecutableRenderContext.lambda$selectForDisplay$0( ~[internal-22.6-SNAPSHOT.jar:?]