AnsweredAssumed Answered

[Help] class configured for MessageDigest(provider:BC) cannot be found.

Question asked by azurepassion on Nov 30, 2016
Latest reply on Dec 22, 2016 by kaynezhang

I look forward to answering. Thank you

 

type Exception report

message class configured for MessageDigest(provider: BC) cannot be found.

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.RuntimeException: class configured for MessageDigest(provider: BC) cannot be found.
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.md4(MD4PasswordEncoder.java:96)
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.encodeInternal(MD4PasswordEncoder.java:79)
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.encodePassword(MD4PasswordEncoder.java:74)
com.uwiseone.sso.server.service.CustomAuthenticationProvider.authenticate(CustomAuthenticationProvider.java:81)
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:177)
com.uwiseone.sso.server.service.CustomUsernamePasswordAuthenticationFilter.attemptAuthentication(CustomUsernamePasswordAuthenticationFilter.java:51)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
root cause

java.security.NoSuchAlgorithmException: class configured for MessageDigest(provider: BC) cannot be found.
java.security.Provider$Service.getImplClass(Provider.java:1292)
java.security.Provider$Service.newInstance(Provider.java:1237)
sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
java.security.Security.getImpl(Security.java:695)
java.security.MessageDigest.getInstance(MessageDigest.java:167)
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.md4(MD4PasswordEncoder.java:93)
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.encodeInternal(MD4PasswordEncoder.java:79)
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.encodePassword(MD4PasswordEncoder.java:74)
com.uwiseone.sso.server.service.CustomAuthenticationProvider.authenticate(CustomAuthenticationProvider.java:81)
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:177)
com.uwiseone.sso.server.service.CustomUsernamePasswordAuthenticationFilter.attemptAuthentication(CustomUsernamePasswordAuthenticationFilter.java:51)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
root cause

java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.JDKMessageDigest$MD4
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
java.security.Provider$Service.getImplClass(Provider.java:1281)
java.security.Provider$Service.newInstance(Provider.java:1237)
sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
java.security.Security.getImpl(Security.java:695)
java.security.MessageDigest.getInstance(MessageDigest.java:167)
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.md4(MD4PasswordEncoder.java:93)
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.encodeInternal(MD4PasswordEncoder.java:79)
com.uwiseone.sso.server.service.security.MD4PasswordEncoder.encodePassword(MD4PasswordEncoder.java:74)
com.uwiseone.sso.server.service.CustomAuthenticationProvider.authenticate(CustomAuthenticationProvider.java:81)
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:177)
com.uwiseone.sso.server.service.CustomUsernamePasswordAuthenticationFilter.attemptAuthentication(CustomUsernamePasswordAuthenticationFilter.java:51)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.

Outcomes