Hi
On 07/02/12 17:07, KARR, DAVID wrote:
I have a set of integration tests using JAXRSServerFactoryBean. They work fine
on my old XP laptop. I'm now setting up the tests on my new Win7 laptop. I
run the same test, and it fails with a 404. I get almost no information.
Here's the entire Jetty console log, with my appname obscured:
--------------------------
Feb 07, 2012 8:54:16 AM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be
http://localhost:9000/MyDataService/rest
2012-02-07 08:54:16.847:INFO:oejs.Server:jetty-7.5.3.v20111011
2012-02-07 08:54:16.892:INFO:oejs.AbstractConnector:Started
SelectChannelConnector@localhost:9000 STARTING
2012-02-07 08:54:16.905:INFO:oejsh.ContextHandler:started
o.e.j.s.h.ContextHandler{/MyDataService,null}
--------------------------------
I'm using the same code to initialize the JAXRSServerFactoryBean as I've always
used. I use WebClient to make the connection.
I recently upgraded to CXF 2.5.1.
What sort of things should I look at to debug this?
It does look like a timing issue.
Consider updating the test code with a utility code which will use
WebClient to check wadl and start testing once the wadl becomes
available, example,
@Before
public void setUp() {
WebClient wc = WebClient.create(serverAddress);
wc.query("_wadl", "");
for (int i = 0; i < 10; i++) {
Response r = wc.get();
if (200 == r.getStatus()) {
return;
}
}
fail("server is not responding");
}
Let me know if it works please
Sergey