Arquillian Warp exception


#1

Hi I am using Arquilian Warp in a very simple example, I developed a very similar example last day and it worked but now I am developing one new from 0 and I cannot see what I am doing different.

Look the test is as easy as:

@Test
    @RunAsClient // <3>
    public void shouldGetDefaultTodos() throws IOException {
        Warp.initiate(new Activity() {
            @Override
            public void perform() {
                int statusCode = 0;
                try {
                    statusCode = createTodo("third task", false); // <3>
                } catch (IOException e) {
                    throw new IllegalArgumentException(e);
                }
                assertThat(statusCode, is(HttpURLConnection.HTTP_OK));
            }
        }).inspect(new Inspection() {
            private static final long serialVersionUID = 1L;
        });

    }
```

But when I execute it throws next exception: 

org.jboss.arquillian.test.spi.ArquillianProxyException: javax.servlet.ServletException : Error processing webservice request [Proxied because : Original exception caused: class java.io.InvalidClassException: javax.servlet.ServletException; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = 205441063386195800]

I know that an inspection is serialized and sent to the server side, but currently my inspection contains nothing.

Any idea?

#2

Have you restarted the server and cleaned all deployments etc since it worked? Possible some class that is hanging around?

Else you could try to make it a inner static class instead of a anonymous one to see if that changes anything…


#3

Using an static class gives me another error:

Caused by: java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: Cannot auto-detect encoding, not enough chars while invoking public javax.ws.rs.core.Response org.superbiz.todos.TodoEndpoint.addTodo(java.io.InputStream) with params [org.apache.cxf.transport.http.AbstractHTTPDestination$1@2bec5b09].

Of course this error is on business code side, but not using Arquillian Warp works perfectly and using only Activity and not any Inspector also works, by simply adding an empty Inspector makes this fails.


#4

Hmm, wouldn’t happen to have the code available somewhere?


#5

I send you by email.