java – AsynchronousDispatcher错误
作者:互联网
当我尝试完全基于此处显示的示例上传文件时,我收到错误
Sample
错误是
Allocate exception for servlet com.testapp.rest.JaxRsActivator: java.lang.RuntimeException: Unable to find a public constructor for class org.jboss.resteasy.core.AsynchronousDispatcher
这意味着什么?
解决方法:
如果部署到JBoss 7.x,您需要更改提供的resteasy依赖项的范围.这是因为那些特定的库已作为模块包含在JBoss中:
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.2.1.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
<version>2.2.0.GA</version>
<scope>provided</scope>
</dependency>
标签:java,jax-rs,jboss7-x 来源: https://codeday.me/bug/20191005/1857205.html