ERROR: INVALID DSPACE REST API! Response is not valid JSON!

80 views
Skip to first unread message

Guler Ermutaf

unread,
Sep 27, 2024, 9:49:26 AM9/27/24
to DSpace Technical Support
Hello everyone 

i cant find a solution to my problem please help me

i am using version  dspace angular 7.5 

C:\dspace-angular-dspace-7.5>yarn test:rest
yarn run v1.22.22
$ ts-node --project ./tsconfig.ts-node.json scripts/test-rest.ts
Building production app config
Overriding app config with C:\dspace-angular-dspace-7.5\config\config.yml
Overriding app config with C:\dspace-angular-dspace-7.5\config\config.prod.yml
...Testing connection to REST API at http://localhost:8080/server/api...

RESPONSE: 404

ERROR: INVALID DSPACE REST API! Response is not valid JSON!
Response returned:
<!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> The requested resource [&#47;server&#47;api] is not available</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/9.0.95</h3></body></html>
Done in 6.71s.


Screenshot 2024-09-27 100926.png

DSpace Technical Support

unread,
Oct 3, 2024, 12:34:14 PM10/3/24
to DSpace Technical Support
Hi, 

That error appears to be saying that either your REST API is not running, *or* the URL that the UI is using (which appears to be http://localhost:8080/server/api) is not the correct URL.

See also the details in this "common installation issue" as I believe this is describing the same issue you've shared:

Tim
Reply all
Reply to author
Forward
0 new messages