gpt4 book ai didi

java - Jboss AS7 Resteasy 示例 Oauth2 万能 key 从 PoolingClientConnectionManager 部署 NoClassDefFoundError

转载 作者:太空宇宙 更新时间:2023-11-04 15:13:28 25 4
gpt4 key购买 nike

使用 Jboss AS7 和 Resteasy 运行默认的万能 key 示例,我完全按照此处的说明操作:https://github.com/resteasy/Resteasy/tree/master/jaxrs/examples/oauth2-as7-example,但在部署时仍然出现错误:

14:35:10,453 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-11) Context [/customer-portal] startup failed due to previous errors: java.lang.NoClassDefFoundError: org/apache/http/impl/conn/PoolingClientConnectionManager at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.initDefaultEngine(ResteasyClientBuilder.java:428) [resteasy-client-3.0.6.Final.jar:] at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:333) [resteasy-client-3.0.6.Final.jar:] at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.init(OAuthManagedResourceValve.java:115) [skeleton-key-as7-3.0.6.Final.jar:] at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.lifecycleEvent(OAuthManagedResourceValve.java:66) [skeleton-key-as7-3.0.6.Final.jar:] at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3845) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] Caused by: java.lang.ClassNotFoundException: org.apache.http.impl.conn.PoolingClientConnectionManager from [Module "org.jboss.resteasy.resteasy-jaxrs:main" from local module loader @1d1aed21 (roots: /Users/JamesTruty/work/jboss-as-7.1.1.Final oauth/modules)] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) ... 12 more

我尝试了各种方法来尝试包含 apache httpclient 库,但仍然没有成功。我错过了什么吗?

最佳答案

NoClassDefFoundError 指定特定库在编译时可用,但在运行时丢失。您需要确保您的类路径中存在httpclient jar。如果它存在,那么它可能有静态初始化失败或者正在通过不同的类加载器加载。您可以通过此内容了解有关 how to debug a NoClassDefFoundError 的任何进一步信息。

关于java - Jboss AS7 Resteasy 示例 Oauth2 万能 key 从 PoolingClientConnectionManager 部署 NoClassDefFoundError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21101273/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com