OHDSI Home | Forums | Wiki | Github

DataSources.json won't parse

I have extracted the achillesWeb package and run the exportToJson method in Achilles and added a datasources file to the data directory. But when I navigate to the index.html the index page loads and simple states ‘Loading…’, The datasources menu on the top right is empty.

this is the content of my datasources.json file…
{
“datasources”: [{
“name”: “test”,
“folder”: “test”,
“cdmVersion”: 5
}]
}

I have tried both AchillesWeb 1.0.0 release as well as the latest from Master.
I have validated the datasources.json is valid json with an online json validation tool.
I have moved the AchillesWeb directory to root directory of the computer to limit directory path issues
I am running this on Windows 7 64bit computer.
I have no idea how to further diagnose the problem, any insights or suggestions would be much appreciated.
Thanks

If you go to developer console (in chrome) and refresh the page, does it show the URL to the datasources.json was returned successfully with a 200 status code? If you are hosting this on Microsoft IIS (internet information server), you have to enable a mimetype to allow downlaoding of files ending on .json. If that’s the issue I can describe how to resolve that in a later post.

But understanding if the file is not found vs. there’s an internal server error retrieving the file is a first step to finding the solution.

I thought a web server was not necessary that you could just direct a web browser to the index.html on the local drive and it would work. Is a web server required? If so do recommend any particular one?

Thank you for the help

The Chrome console provides the following error.
jquery-1.10.2.js:6 Failed to load file:///C:/Users/ke987/Downloads/AchillesWeb-1.0.0/AchillesWeb-1.0.0/data/datasources.json?_=1527269498002: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

Correct the issue you have is that the app depends on serving the JSON files from a HTTP service, not just reading your local filesystem.

If you are using Windows, you could google how to start the IIS service, that will let you place the files under inetpub/wwwroot and serve files from there. Or you could look at a node-based http service.

This is effectively a limitation of the browsers, if there was a way to enable those requests to file:// URLs, I’d tell you how, but unfortunately you need a web server to host this web application.

Our company locks down our wndows client machines to much to use IIS.
I have set up a centos6 server in it’s stead, but now I can’t get the sql server connection to work with windows authentication because the sqljdbc_auth.dll library is not being loaded. Any ideas where the dll needs to be located in centos6 to be part of the java.library.path?

Hi @ke987:
The webserver code doesn’t need any JDBC connection to execute. Are you getting this problem when executing the R pacakge to exportToJson (or just run Achilles())?

Please see this issue report for DatabaseConnector that describes the process of downloading and installing the sqljdbc_auth.dll and saving it to your c:/windows/system32.

I am a situation where I have a desktop windows machine and a linux server available to me.
I can get the windows to connect to the sql server with windows authentication to run Achilles but no easy means to run IIS to run AchillesWeb
I can get the linux machine to run apache easily to run AchillesWeb but can’t (currently) connect to sql server with Windows authentication to run Achilles. I have run Achilles on windows and then moved the files over to linux to view them on the web, but obviously that is less than ideal.

Many thanks for your help

t