Failed to load resource: the server responded with a status of 404 (not found web api)

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

-- my environment --
ubuntu 20.04
tomcat 9
jdk 8
postgresql 12

Failed to load resource: the server responded with a status of 404 (not found web api)

success tomcat deploy (WebAPI & Atlas)

Failed to load resource: the server responded with a status of 404 (not found web api)

Failed to load resource: the server responded with a status of 404 (not found web api)

Question 1. Is it correct to see this result in http://192.168.10.10:8080/WebAPI? (404 Not Found)

Failed to load resource: the server responded with a status of 404 (not found web api)

In WebAPI/source/sources, I succeeded in getting the results as webAPI document.

Failed to load resource: the server responded with a status of 404 (not found web api)

  • Atlas page

Question 2. I don't know why Atlas is getting this error.

I would appreciate your reply.

For Q1: WebAPI doesn't respond to a 'bare' endpoint, so it is a correct response for a 404 when you aren't asking for anything specific :) . But, it is working for you, because when you asked for the list of sources, you got a response, so WebAPI is functioning!

For Q2: you are running into a CORS violation. CORS means Cross-Origin Resource Sharing which is a feature that is used to restrict access to WebAPI from other domains from browsers. Could you try changing the URL you're accessing to use localhost instead of 192.168.10.10? I'm assuming that you are accessing localhost directly, and 192.168.10.10 is the actual local host.

Othwerwise, I believe you need to set a value in your settings.xml file that you created to specify your local-environment settings. In this sample, it shows setting the origin to * which should allow everything...do you want to try to set that in your settings.xml file and deploy a new build of WebAPI? Unfortunately, you have to build the WAR to make the settings, so making that change will require you to deploy a new WAR.

For Q1: WebAPI doesn't respond to a 'bare' endpoint, so it is a correct response for a 404 when you aren't asking for anything specific :) . But, it is working for you, because when you asked for the list of sources, you got a response, so WebAPI is functioning!

For Q2: you are running into a CORS violation. CORS means Cross-Origin Resource Sharing which is a feature that is used to restrict access to WebAPI from other domains from browsers. Could you try changing the URL you're accessing to use localhost instead of 192.168.10.10? I'm assuming that you are accessing localhost directly, and 192.168.10.10 is the actual local host.

Othwerwise, I believe you need to set a value in your settings.xml file that you created to specify your local-environment settings. In this sample, it shows setting the origin to * which should allow everything...do you want to try to set that in your settings.xml file and deploy a new build of WebAPI? Unfortunately, you have to build the WAR to make the settings, so making that change will require you to deploy a new WAR.

thanks for answer.

Failed to load resource: the server responded with a status of 404 (not found web api)

I already set value settings.xml.

I was able to find the problem with your hints, I don't understand < Could you try changing the URL you're accessing to use localhost instead of 192.168.10.10? I'm assuming that you are accessing localhost directly, and 192.168.10.10 is the actual local host. > this sentence.
I searched for CORS errors, but I can't get a sense of it. Where can I change the URL?

Failed to load resource: the server responded with a status of 404 (not found web api)

It is Atlas setting file. (config-local.js) Do you think there is a problem with this?

hmm, I thought origin of * would allow anything, but what I meant was:

Failed to load resource: the server responded with a status of 404 (not found web api)

Change that URL in your browser address bar to say 'localhost' and not 192.168.10.10.

I also noticed that the setting:

<security.cors.enabled>true</security.cors.enabled>

You could try setting that value to false.

hmm, I thought origin of * would allow anything, but what I meant was:

Failed to load resource: the server responded with a status of 404 (not found web api)

Change that URL in your browser address bar to say 'localhost' and not 192.168.10.10.

I also noticed that the setting:

<security.cors.enabled>true</security.cors.enabled>

You could try setting that value to false.

Failed to load resource: the server responded with a status of 404 (not found web api)

<security.cors.enabled>false</security.cors.enabled>
I try setting this vaule.

After redeploying the war file, I accessed localhost:8080.
And this screen was displayed. How to solve this problem ?
also, i don't have config-gis.js file. where can I find this file?
can I refer this URL? https://github.com/OHDSI/atlas-component-geospatial

hmm, I thought origin of * would allow anything, but what I meant was:

Failed to load resource: the server responded with a status of 404 (not found web api)

Change that URL in your browser address bar to say 'localhost' and not 192.168.10.10.

I also noticed that the setting:

<security.cors.enabled>true</security.cors.enabled>

You could try setting that value to false.

Failed to load resource: the server responded with a status of 404 (not found web api)

I solved config-gis problem.

Less has finished and no sheets were loaded. :8080/WebAPI/i18n/locales:1 Failed to load resource: the server responded with a status of 404 () main.js:57 App initialization failed undefined (anonymous) @ main.js:57

Failed to load resource: the server responded with a status of 404 (not found web api)

what is http://localhost:8080/WebAPI/i18n/locales?

That's something that was introduced in version 2.9 (which has not been released yet). Are you building WebAPI off of master branch in github? You will need to pull down the master branch of Atlas if you want to use the master branch of WebAPI.

That's something that was introduced in version 2.9 (which has not been released yet). Are you building WebAPI off of master branch in github? You will need to pull down the master branch of Atlas if you want to use the master branch of WebAPI.

oh...... I had build WebAPI version 2.8.0 & Atlas version 2.8.2
I will try the same version again. ( webapi v 2.8.2 / atlas v 2.8.2 <- that's correct?)

I 'm very grateful to you for all your help .

Yes, 2.8.2 on both WebAPI and Atlas is our latest release.

Yes, 2.8.2 on both WebAPI and Atlas is our latest release.

Thank you!! Atlas runs now.

Failed to load resource: the server responded with a status of 404 (not found web api)

But it occured error. I think somthing wrong at webapi.

Failed to load resource: the server responded with a status of 404 (not found web api)

  • Add to, this URL (localhost:8080/Webapi/source/sources) runs normally.

I tried running webapi by referring to this page,

A message such as GET http://localhost:8080/WebAPI/cdmresults/synpuf5/dashboard 500 is shown.

How can I solve it?

At this point, I'd say check your tomcat logs and look for errors. It could be an incorrect permission on the target schema. It could be a bad JDBC url in source... but please don't post an entire log to this thread, just find either 'Error' or 'Exception' in the logs to find out where you might get information about the core error.

Btw: the 'results' table qualifier of OHDSI.webapi looks wrong. The results shema is not your webapi schema. Each CDM should have their own results schema. Please refer to the CDM configuration article in the wiki.

At this point, I'd say check your tomcat logs and look for errors. It could be an incorrect permission on the target schema. It could be a bad JDBC url in source... but please don't post an entire log to this thread, just find either 'Error' or 'Exception' in the logs to find out where you might get information about the core error.

Btw: the 'results' table qualifier of OHDSI.webapi looks wrong. The results shema is not your webapi schema. Each CDM should have their own results schema. Please refer to the CDM configuration article in the wiki.

Failed to load resource: the server responded with a status of 404 (not found web api)

Failed to load resource: the server responded with a status of 404 (not found web api)

I refer to the CDM configuration article and complete to insert script in Database.

Hum... I checked tomcat log, but there were no special errors. There is no 'Error' or 'Exception', only 'WARNING' and 'INFO' exist.
Could you by any chance check my log file? Also, Where can I check JDBC url? I added the jdbc driver to tomcat referring this page.

At this point, I'd say check your tomcat logs and look for errors. It could be an incorrect permission on the target schema. It could be a bad JDBC url in source... but please don't post an entire log to this thread, just find either 'Error' or 'Exception' in the logs to find out where you might get information about the core error.

Btw: the 'results' table qualifier of OHDSI.webapi looks wrong. The results shema is not your webapi schema. Each CDM should have their own results schema. Please refer to the CDM configuration article in the wiki.

Hi, I installed achilles properly and it works fine.
Thank you for your help!

How do I fix failed to load the resource The server responded with a status 404?

The only way to fix this is to make sure that the CSS and JS files are properly linked within the HTML. Check whether the folder, file and directory name of these files are spelt correctly. Another way to fix this is by using an absolute URL instead of a relative URL.

What does Failed to load resource the server responded with a status of 404 () mean?

On WordPress, an invalid URL can lead to failed to load resource: the server responded with a status of 404 WordPress error. The main cause of this WordPress error is when you have an error in your WordPress URL settings. Be aware that an outdated Theme or Plugin can cause the error as well.