我的代码工作正常,但是在servlet中使用相同的代码(罐子和依赖项)无效时,它到达第一行:ApiClient apiClient = new ApiClient();
ApiClient apiClient = new ApiClient();
apiClient.setBasePath(BaseUrl);
// create JSON formatted auth header
String creds = "{\"Username\":\"" + UserName + "\",\"Password\":\"" + Password + "\",\"IntegratorKey\":\"" + IntegratorKey + "\"}";
然后我出现错误
java.lang.ClassCastException: Cannot cast com.sun.jersey.core.impl.provider.header.LocaleProvider to com.sun.jersey.spi.HeaderDelegateProvider
at java.lang.Class.cast(Class.java:3369)
at com.sun.jersey.core.osgi.OsgiRegistry$OsgiServiceFinder$1.next(OsgiRegistry.java:147)
我正在尝试使用ClassLoader
,但无法使其正常工作
我正在使用这些罐子
@docusign-esign-java-2.6.0.jar,\
@jersey-client-1.19.1.jar,\
@jackson-databind-2.9.5.jar,\
@jackson-core-2.9.5.jar,\
@jackson-datatype-joda-2.1.5.jar,\
@joda-time-2.9.3.jar,\
@jersey-multipart-1.19.1.jar,\
@jersey-core-1.19.1.jar,\
@jackson-annotations-2.9.5.jar,\
@jackson-jaxrs-json-provider-2.9.5.jar,\
@jackson-jaxrs-base-2.9.5.jar