java.lang.NoClassDefFoundError在使用Couchbase缓存的websphere中部署War时

时间:2015-05-06 07:18:57

标签: java websphere classpath noclassdeffounderror

在Websphere-8.5.5中部署war文件时,我遇到以下错误

Caused by: java.lang.NoClassDefFoundError: org/apache/http/params/SyncBasicHttpParams
        at com.couchbase.client.ViewConnection.createConnections(ViewConnection.java:120)
        at com.couchbase.client.ViewConnection.<init>(ViewConnection.java:100)
        at com.couchbase.client.CouchbaseConnectionFactory.createViewConnection(CouchbaseConnectionFactory.java:184)
        at com.couchbase.client.CouchbaseClient.<init>(CouchbaseClient.java:247)
        at com.couchbase.client.CouchbaseClient.<init>(CouchbaseClient.java:179)
        at com.infosys.aham.services.utils.cache.CouchbaseCacheManager.instantiateCouchbaseManager(CouchbaseCacheManager.java:145)
        at com.infosys.aham.services.utils.cache.CouchbaseCacheManager.<init>(CouchbaseCacheManager.java:55)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
        ... 87 more

我使用的是Couchbase-Client -1.1.9和http-core-4.1.3 http-core jar捆绑在war文件/ web-inf / lib文件夹中。

同时在websphere中查看EnterprizeApplication - &gt; 应用程序 - &gt;管理模块 - &gt; MODULENAME - &GT; ClassLoaderViewer - &gt; LoaderView  http-core-4.1.3在表中(jar存在于类路径中)。 (我也尝试过使用http-core 4.1.1 jar。)

应用程序仍然无法找到给定jar中的类。 我是websphere的新手,请帮我解决这个问题。

提前致谢。

1 个答案:

答案 0 :(得分:1)

http-core类已包含在WebSphere中。要使用不同的实现,请创建具有冲突库的隔离共享库,并将其映射到应用程序。

相关问题