-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
4.5.0.Final
-
None
-
None
Steps to reproduce
Create a simple maven project with the following dependencies:
<dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-jdk-http</artifactId> <version>${component.resteasy.version}</version> </dependency> <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-jackson2-provider</artifactId> <version>${component.resteasy.version}</version> </dependency>
And the following source:
import java.net.InetSocketAddress; import javax.ws.rs.core.Application; import org.jboss.resteasy.plugins.server.sun.http.HttpContextBuilder; import com.sun.net.httpserver.HttpServer; public class MyApplication extends Application { public static void main(String[] args) throws Exception { final InetSocketAddress address = new InetSocketAddress(8081); final HttpServer httpServer = HttpServer.create(address, 1); HttpContextBuilder contextBuilder = new HttpContextBuilder(); contextBuilder.getDeployment().setApplication(new MyApplication()); contextBuilder.bind(httpServer); httpServer.start(); } }
Result
When running this application, we get the following exception (unnecessary part stripped away, plz ask if you need the full stack trace):
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: RESTEASY003940: Unable to instantiate MessageBodyReader [...] Caused by: java.lang.Error: Unresolved compilation problems: The import org.jboss.resteasy.core.messagebody.AsyncBufferedMessageBodyWriter cannot be resolved AsyncBufferedMessageBodyWriter cannot be resolved to a type at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.<init>(ResteasyJackson2Provider.java:23) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.jboss.resteasy.core.ConstructorInjectorImpl.constructOutsideRequest(ConstructorInjectorImpl.java:220) ... 13 more
- is duplicated by
-
RESTEASY-2508 AsyncBufferedMessageBodyWriter cannot be resolved to a type
- Closed