java.security.NoSuchAlgorithmException: class configured for Signature (provider: BC) cannot be found. 
at java.security.Provider$Service.getImplClass(Provider.java:1649) 
at java.security.Provider$Service.newInstance(Provider.java:1592) 
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236) 
at sun.security.jca.GetInstance.getInstance(GetInstance.java:206) 
at java.security.Signature.getInstance(Signature.java:362) 
at com.itapgo.mmc.util.unionpayutil.SecureUtil.signBySoft256(SecureUtil.java:292) 
at com.itapgo.mmc.manager.impl.UnionPayManagerImpl.createSign(UnionPayManagerImpl.java:276) 
at com.itapgo.mmc.manager.impl.UnionPayManagerImpl.unionPayRequest(UnionPayManagerImpl.java:223) 
at com.itapgo.mmc.manager.impl.UnionPayManagerImpl.creatOrder(UnionPayManagerImpl.java:172) 
at com.itapgo.mmc.service.impl.UnionPayChannelServiceImpl.createOrder(UnionPayChannelServiceImpl.java:72) 
at com.itapgo.mmc.service.impl.UnionPayChannelServiceImpl$$FastClassBySpringCGLIB$$c6e36c96.invoke(<generated>) 
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) 
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) 
at com.itapgo.mmc.aop.LogAopService.around(LogAopService.java:40) 
at sun.reflect.GeneratedMethodAccessor5951.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) 
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) 
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) 
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) 
at com.itapgo.mmc.service.impl.UnionPayChannelServiceImpl$$EnhancerBySpringCGLIB$$187b80de.createOrder(<generated>) 
at com.itapgo.mmc.machinepayboxservice.impl.MachinePayServiceImpl.createOrder(MachinePayServiceImpl.java:190) 
at com.itapgo.mmc.machinepayboxservice.impl.MachinePayServiceImpl.scanPay(MachinePayServiceImpl.java:100) 
at com.itapgo.mmc.controller.PayController.createOrder(PayController.java:91) 
at com.itapgo.mmc.controller.PayController$$FastClassBySpringCGLIB$$51963fbc.invoke(<generated>) 
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) 
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) 
at com.itapgo.mmc.aop.PayAop.around(PayAop.java:34) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) 
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) 
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) 
at com.itapgo.mmc.aop.LogAopAction.around(LogAopAction.java:131) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) 
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) 
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) 
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) 
at com.itapgo.mmc.controller.PayController$$EnhancerBySpringCGLIB$$3cd9a0ce.createOrder(<generated>) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
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:209) 
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) 
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) 
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) 
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783) 
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) 
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) 
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) 
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) 
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) 
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) 
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) 
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115) 
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) 
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
at java.lang.Thread.run(Thread.java:748) 
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi$SHA256 
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892) 
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735) 
at java.security.Provider$Service.getImplClass(Provider.java:1636) 
... 98 more

解决方法:重启tomcat

class configured for Signature (provider: BC) cannot be found的更多相关文章

  1. Exception | java.security.NoSuchProviderException: no such provider: BC

    背景 今天在用PGP key做JWT签名和验签的时候,转换报了如下错误: org.bouncycastle.openpgp.PGPException: exception on setup: java ...

  2. linux上java解加密(AES/CBC)异常:java.lang.SecurityException: JCE cannot authenticate the provider BC办法

    用mapreduce做数据清洗的时候,需要对数据进行解密,加密方法是:AES/CBC/PKCS7Padding,由于java本身不支持,需要添加依赖,用的依赖是: <dependency> ...

  3. JCE cannot authenticate the provider BC

    报错原因: 在使用oracle的JDK时,JAR包必须签署特殊的证书才能使用.(具体是什么协议没查出来,惭愧) 方案一: 使用openJDK或者非oracle的JDK,这样就可以绕开证书的限制.该方案 ...

  4. jdk1.6错误:no such provider: BC jdk1.6支持SSL问题

    程序调用https请求,由于jdk1.6只支持1024的DH,需要调整 1.在$JAVA_HOME/jre/lib/ext 下添加加密组件包 bcprov-jdk15on-1.52.jar和bcpro ...

  5. java.security.NoSuchProviderException: no such provider: BC 的问题解决

    第一种方式 1.修改以下两个文件 %JDK_Home%\jre\lib\security\java.security %JRE_Home%\jre\lib\security\java.security ...

  6. bouncycastle中添加HMAC-SM3支持

    一. 最近看完了PKCS#5中的内容,总结一下自己添加HMAC-SM3中遇到的问题和解决方法. 大概通读BC java源码以后,开始上手修改. 在SM3.java中添加如下代码: /** * SM3 ...

  7. 使用BC库解密出现no such provider错误

    使用BC库解密出现no such provider错误 错误提示如下: Exception in thread "main" java.security.NoSuchProvide ...

  8. EJBCA 在windows上的安装

    为了做EJBCA的封装測试,在我自己电脑上装了个,可是在国内的开发上面的介绍实在是太少.有的也仅仅是些傻瓜式的安装介绍,这是介绍在Windows上安装的过程,(后面介绍下 linux 红帽上的),有些 ...

  9. ECC公钥格式详解

    本文首先介绍公钥格式相关的若干概念/技术,随后以示例的方式剖析DER格式的ECC公钥,最后介绍如何使用Java生成.解析和使用ECC公钥. ASN.1 Abstract Syntax Notation ...

随机推荐

  1. get return value of python in shell

    from: https://stackoverflow.com/questions/2115615/assigning-value-to-shell-variable-using-a-function ...

  2. datetime is not json serializable

    python, datetime is not json serializable import datetime def json_serial(obj): """JS ...

  3. 剑指offer例题——裴波那契数列

    编程题:大家都知道裴波那契数列,现在要求输入一个整数n,请你输出裴波那契数列的第n项(从0开始,第0项为0).n<=39 public class Solution { public int F ...

  4. English Conversation – NUMBERS

    English Conversation – NUMBERS Share Tweet Share Tagged With: Numbers Study the pronunciation of num ...

  5. Winform自定义控件实例

    本文转自http://www.cnblogs.com/hahacjh/archive/2010/04/29/1724125.html 写在前面: .Net已经成为许多软件公司的选择,而.Net自定义W ...

  6. js版MD5 (Message-Digest Algorithm)加密算法

    /**** MD5 (Message-Digest Algorithm)* http://www.webtoolkit.info/***/ var MD5 = function (string) { ...

  7. ArcGIS模型构建器案例教程-批量修改工作空间所有要素类的空间参考

    ArcGIS模型构建器案例教程-批量修改工作空间所有要素类的空间参考 目的:批量修改工作空间所有要素类的空间参考(坐标系) 工具名称:WorkspaceChangeSpatialReference 使 ...

  8. spring 改变url

    server:  port: 9010  servlet:    context-path: /console

  9. 05_ssm基础(六)之SpringMVC

    36.springMVC之入门 1.springMVC简介 Spring MVC是基于MVC模式的一个Web框架,它解决WEB开发中常见的问题(参数接收.文件上传.表单验证.国际化.等等),而且使用简 ...

  10. 三层和MVC

    一样写啊... 比如DAL层: C# code? 1 2 3 4 5 Public void Update(XXXXX.Models.News model) {         db.Entry(XX ...