Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spark-Java Micro REST service throwing a 100 error  RSS feed

 
Mike London
Ranch Hand
Posts: 1441
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My microservice in the Java Spark Framework is returning

**Process finished with exit code 100**

It was previously working.

Tried to set up a brand new service as a test, but am still getting that error. Can't find any documentation about what this error is or means.

Would appreciate any suggestions.

Thanks in advance.

- mike
 
Ron McLeod
Saloon Keeper
Posts: 1561
222
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume that the Process finished .. message is coming from your runtime environment / IDE, and nt from Spark itself.

I have never looked at Spark before, but from the source, it looks like a 100 return code indicates a general failure.  Does the log provide any hints as to what went wrong?
 
Mike London
Ranch Hand
Posts: 1441
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!

Was just coming back to post the "solution".

The solution was a reboot. I agree with your assessment.

I had probably too many test runs messed something up.

---

Quick question  -- Is it possible to pass a path string as part of a GET?


I can't seem to make that work as the "/" paths (Mac) are either confused or discarded.

Trying to pass in a file path to a GET that will run a Word document reader and return the String of the doc's contents.

Thanks again.

- mike
 
Ron McLeod
Saloon Keeper
Posts: 1561
222
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike London wrote:.. Is it possible to pass a path string as part of a GET? ..

Sure, just make sure that it has been encoded properly so that the path separators in the file name don't get interpreted as path separators for the URI path.
 
Mike London
Ranch Hand
Posts: 1441
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron McLeod wrote:
Mike London wrote:.. Is it possible to pass a path string as part of a GET? ..

Sure, just make sure that it has been encoded properly so that the path separators in the file name don't get interpreted as path separators for the URI path.


Excellent.

Two points:

1. I didn't think to look at the Spark source code for the 100 error. Thanks for that insight I missed. After all this time using Java, I still don't think to look at the (3rd-party) source code causing the problem.

2. The URL encoding worked fine. Having the %2 for the "/" makes it user unfriendly, but, hey, it's a service, right?

In any case, it's all working now.

Thanks very much for the excellent ideas and help!

- mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!