小编Ste*_*iev的帖子

Wildfly 服务器、Maven、RestEasy(java.lang.ClassNotFoundException:org.jboss.resteasy.core.ResourceMethod)

我将一个项目从 JBOSS 迁移到 Wildfly Server。我做了一些更改standalone.xml,一切正常,但是当我从 Postman 发送 JSON 请求时,出现以下异常:

ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /service/api/authenticate: java.lang.NoClassDefFoundError: org/jboss/resteasy/core/ResourceMethod
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.getDeclaredMethods(Class.java:1975)
    at org.jboss.resteasy.core.PropertyInjectorImpl.populateMap(PropertyInjectorImpl.java:73)
    at org.jboss.resteasy.core.PropertyInjectorImpl.<init>(PropertyInjectorImpl.java:54)
    at org.jboss.resteasy.core.InjectorFactoryImpl.createPropertyInjector(InjectorFactoryImpl.java:65)
    at org.jboss.resteasy.cdi.CdiInjectorFactory.createPropertyInjector(CdiInjectorFactory.java:113)
    at org.jboss.resteasy.spi.ResteasyProviderFactory.injectedInstance(ResteasyProviderFactory.java:2237)
    at org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry$AbstractInterceptorFactory.createInterceptor(JaxrsInterceptorRegistry.java:170)
    at org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry$LegacyPerMethodInterceptorFactory.getInterceptor(JaxrsInterceptorRegistry.java:329)
    at org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry$AbstractLegacyInterceptorFactory.getLegacyMatch(JaxrsInterceptorRegistry.java:269)
    at org.jboss.resteasy.core.interception.ContainerRequestFilterRegistry$1.postMatch(ContainerRequestFilterRegistry.java:67)
    at org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry.postMatch(JaxrsInterceptorRegistry.java:405)
    at org.jboss.resteasy.core.interception.ContainerRequestFilterRegistry.postMatch(ContainerRequestFilterRegistry.java:57)
    at org.jboss.resteasy.core.ResourceMethodInvoker.<init>(ResourceMethodInvoker.java:105)
    at org.jboss.resteasy.core.ResourceMethodRegistry.processMethod(ResourceMethodRegistry.java:281)
    at org.jboss.resteasy.core.ResourceMethodRegistry.register(ResourceMethodRegistry.java:252)
    at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:222)
    at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:194)
    at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:180)
    at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:157)
    at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:76)
    at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:404)
    at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:245)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
    at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
    at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78) …
Run Code Online (Sandbox Code Playgroud)

java resteasy maven wildfly-10

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

java ×1

maven ×1

resteasy ×1

wildfly-10 ×1