Problem with import of Labkey data into SAS | Lind-Thomsen | 2015-12-21 05:09 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Status: Closed | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hi I'm trying to import a labkey list into SAS. I have installed the SAS and Java libraries and added them to the paths in the sasv9.cfg file I have created a _netrc file in my home directory (there is a copy attached with a changed password, but the password starts with a '-' which is kept), and I made an environmental variable named HOME pointing to my home directory. SAS code: %labkeySelectRows(dsn=mydata, baseUrl="http://rghorion001:8080/persimune", folderPath="/Persimune", schemaName="lists", queryName="mikrobiologi_pos_prover"); SAS error: ERROR: Could not instantiate class org/labkey/remoteapi/sas/SASSelectRowsResponse at line 27 column 69. ERROR: DATA STEP Component Object failure. Aborted during the EXECUTION phase. dec 21, 2015 1:24:21 PM org.labkey.remoteapi.Command _execute INFO: Requesting URL: http://rghorion001:8080/persimune/query/Persimune/selectRows.api?apiVersion=9.1&query.queryName=mikrobiologi_pos_prover&schemaName=l ists&query.maxRows=1 org.labkey.remoteapi.CommandException: Unauthorized at org.labkey.remoteapi.Command.throwError(Command.java:355) at org.labkey.remoteapi.Command._execute(Command.java:321) at org.labkey.remoteapi.Command.execute(Command.java:202) at org.labkey.remoteapi.query.SelectRowsCommand.execute(SelectRowsCommand.java:61) at org.labkey.remoteapi.sas.SASBaseSelectCommand.execute(SASBaseSelectCommand.java:65) at org.labkey.remoteapi.sas.SASSelectRowsResponse.<init>(SASSelectRowsResponse.java:54) at org.labkey.remoteapi.sas.SASSelectRowsResponse.<init>(SASSelectRowsResponse.java:44) This indicates a login error, so I tried using Rlabkey to import the same list into R, which works, so there isn't an error in the _netrc file (unless SAS and R parse/interpret it differently). In the logfile, localhost_access_log I see: [21/Dec/2015:13:15:36 +0100] "GET /persimune/query/Persimune/selectRows.api?apiVersion=9.1&query.showRows=all&query.queryName=mikrobiologi_pos_prover&schemaName=lists HTTP/1.1" 200 85737276 (for the R access) [21/Dec/2015:13:24:22 +0100] "GET /persimune/query/Persimune/selectRows.api?apiVersion=9.1&query.queryName=mikrobiologi_pos_prover&schemaName=lists&query.maxRows=1 HTTP/1.1" 401 6444 (for SAS access) There doesn't seem to be anything in the other log-files. (labkey.log, labkey-errors.log) For good measure I restart SAS after each change. Furthermore, if I add the userName and password to the SAS-macro call, then it also works. My own conclusion is tha tit must på the SAS interpretation of the _netrc file that fails, but because it wotks with Rlabkey i'm not sure what kind of error it could be. Do you have any idea what might cause this? Best wishes Allan Lind-Thomsen Labkey ver. 15.3-41022.16 SAS Ver. 9.4 Labkey Server: windows 8 Client windows 7 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||