Hi folks,
apologies for the newbie question. I'm trying to get going with the helloWorld sample app. I've downloaded Dropwizard and unpacked it into C:\Dropwizard\dropwizard. Gone into the folder and run "mvn clean install". It skips along fine until it bugs out on this package:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Dropwizard Project ................................. SUCCESS [ 4.676 s]
[INFO] Dropwizard Documentation ........................... SUCCESS [ 1.139 s]
[INFO] Dropwizard Utility Classes ......................... SUCCESS [ 13.950 s]
[INFO] Dropwizard Jackson Support ......................... SUCCESS [ 11.761 s]
[INFO] Dropwizard Validation Support ...................... SUCCESS [ 13.588 s]
[INFO] Dropwizard Configuration Support ................... SUCCESS [ 19.507 s]
[INFO] Dropwizard Logging Support ......................... SUCCESS [ 18.416 s]
[INFO] Dropwizard Lifecycle Support ....................... SUCCESS [ 9.692 s]
[INFO] Dropwizard Metrics Support ......................... SUCCESS [ 11.729 s]
[INFO] Dropwizard Jersey Support .......................... SUCCESS [ 46.927 s]
[INFO] Dropwizard Servlet Support ......................... SUCCESS [ 14.305 s]
[INFO] Dropwizard Jetty Support ........................... SUCCESS [ 24.055 s]
[INFO] Dropwizard ......................................... FAILURE [ 7.182 s]
[INFO] Dropwizard Archetypes .............................. SKIPPED
[INFO] Dropwizard Archetype for Simple Java Services ...... SKIPPED
I think this is the "core" package.
on going further up to the actual error I see this:
Running io.dropwizard.server.SimpleServerFactoryTest
127.0.0.1 - - [01/Oct/2015:16:34:38 +0000] "GET /service/test HTTP/1.1" 200 18 "
-" "Java/1.8.0_60" 124
127.0.0.1 - - [01/Oct/2015:16:34:39 +0000] "POST /secret/tasks/hello?name=test_u
ser HTTP/1.1" 200 - "-" "Java/1.8.0_60" 53
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.778 sec - in i
o.dropwizard.server.SimpleServerFactoryTest
Running io.dropwizard.server.DefaultServerFactoryTest
Tests run: 9, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.987 sec <<< FA
ILURE! - in io.dropwizard.server.DefaultServerFactoryTest
testGracefulShutdown(io.dropwizard.server.DefaultServerFactoryTest) Time elapse
d: 0.331 sec <<< ERROR!
java.lang.RuntimeException: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:32
1)
at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListe
ner.java:200)
at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(Abstra
ctLifeCycle.java:188)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:67)
at io.dropwizard.server.DefaultServerFactoryTest.testGracefulShutdown(De
faultServerFactoryTest.java:157)
Results :
Tests in error:
DefaultServerFactoryTest.testGracefulShutdown:157 » Runtime java.net.BindExcep
...
Tests run: 52, Failures: 0, Errors: 1, Skipped: 0
So I guess this is telling me that one of the ports is already in use, and I should either shut down the app that's using it or else change the ports that Dropwizard is trying to use. So I tried a couple of things:
1) I went through all the .yml files and changed the ports. This didn't work.... it failed earlier in the build because it seems like some of the tests Assert on the "standard" ports being used
2) I found out that an app on my machine called FrameworkService.exe is using port 8081. Unfortunately I can't shut this down because it's the Mcafee update app and is controlled by our System Admins.
I guess my next step will be to try to install Dropwizard on a virtualbox over which i have more control. But if anyone has any suggestions on how to fix this problem i'd be very grateful
many thanks
Darren