imagej / imagej-server

A RESTful web server for ImageJ [EXPERIMENTAL]
Apache License 2.0
38 stars 17 forks source link

Upgrade to pom-scijava 29 #42

Closed frauzufall closed 3 years ago

frauzufall commented 3 years ago

This PR depends on the following PRs:

Outline of the changes:

All tests run successfully for me now with the branches from the other PRs, but since I never used imagej-server for anything, it'd be great to have a real world tester :) And of course, all of the above PRs first need to be reviewed before this can be finished.

Here are the JARs if anyone wants to give it a try: imagej-server-pom-sj-29.zip

imagejan commented 3 years ago

@frauzufall with new releases of scijava-common-2.84.0, scijava-table-0.7.0 and scijava-plugins-io-table-0.4.0, this pull request should be good to go now, right?

frauzufall commented 3 years ago

@imagejan I will update the versions and let the tests speak :) Thank you so much for reviewing and releasing all of this!

ctrueden commented 3 years ago

I tested all the main APIs documented in the README. Some of the curl commands there were outdated, so I updated them with a0b903799cfc0fccff347318f9d14740a753a595.

The good news: All the I/O-related endpoints still work! :tada: And the SciJava module-related endpoints work too! :tada:

The bad news: The /admin/stop endpoint seems to be broken:

curl -XDELETE localhost:8080/admin/stop

Returns nothing. But the server does not stop, and on the server side we see:

Exception in thread "Thread-34" java.lang.NoSuchMethodError: net.imagej.server.resources.AdminResource.access$0(Lnet/imagej/server/resources/AdminResource;)Lio/dropwizard/setup/Environment;
    at net.imagej.server.resources.AdminResource$1.run(AdminResource.java:57)
    at java.lang.Thread.run(Thread.java:748)
0:0:0:0:0:0:0:1 - - [16/Aug/2020:17:04:40 +0000] "DELETE /admin/stop HTTP/1.1" 200 0 "-" "curl/7.54.0" 1

It looks to me like some version skew across Dropwizard dependencies. @frauzufall I noticed that you stopped using the dropwizard-testing dependency management block in favor of manually specified versions. However, it seems there is a dropwizard-bom specifically for dependency management—I'll try using that instead and see whether it clears things up.

ctrueden commented 3 years ago

After 69d73f5, I was able to use /admin/stop successfully. However, in further testing while developing some integration tests, I once again saw the NoSuchMethodError. Strange. And now trying again to reproduce in a freshly started server, it works. So maybe the problem still exists, maybe not. But anyway, it's good enough for now! Will merge as soon as Travis gives the go-ahead.