解决了吗,亲?
native下单 初始化配置报错NoClassDefFoundError ?ERROR [ond-power-merchant-gateway] 2023-04-01 17:20:23.361 [http-nio-8503-exec-3] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet].log line:182 - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.wechat.pay.java.core.http.DefaultHttpClientBuilder] with root cause java.lang.NoClassDefFoundError: Could not initialize class com.wechat.pay.java.core.http.DefaultHttpClientBuilder at com.wechat.pay.java.core.certificate.RSAAutoCertificateProvider$Builder.build(RSAAutoCertificateProvider.java:98) at com.wechat.pay.java.core.RSAAutoCertificateConfig$Builder.build(RSAAutoCertificateConfig.java:114)
08-22解决了吗,亲,我也有这个问题。
使用本地的微信支付平台证书,再初始化的时候,报了一个错误。java.lang.NoClassDefFoundError: Could not initialize class com.wechat.pay.java.core.http.DefaultHttpClientBuilder 这个错误,我怎么看都没有问题,两台服务器,一台可以正常,初始化,一台就会报错。不知道原因。 Config config = new RSAConfig.Builder() .merchantId(merchantId) .privateKeyFromPath(privateKeyPath) .merchantSerialNumber(merchantSerialNumber) .wechatPayCertificatesFromPath(wechatPayCertificatePath) .build(); 使用这个方式加载
08-22解决了吗,亲。我也这问题
小程序调用支付功能初始化商户信息报not initialize DefaultHttpClient?Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.wechat.pay.java.core.http.DefaultHttpClientBuilder at com.wechat.pay.java.core.certificate.RSAAutoCertificateProvider$Builder.build(RSAAutoCertificateProvider.java:121) at com.wechat.pay.java.core.RSAAutoCertificateConfig$Builder.build(RSAAutoCertificateConfig.java:117) at io.fdream.service.impl.WxPayServiceImpl.createOrder(WxPayServiceImpl.java:54) at io.fdream.controller.ApiUserController.createOrder(ApiUserController.java:571) at sun.reflect.GeneratedMethodAccessor211.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039) ... 46 common frames omitted
08-22