【问题标题】:Bouncycastle PKCS5S2ParametersGenerator error in weblogic 12.1.3Weblogic 12.1.3 中的 Bouncycastle PKCS5S2ParametersGenerator 错误
【发布时间】:2017-11-22 12:38:18
【问题描述】:

我正在尝试将项目部署到 weblogic 服务器。但是我遇到了这样的错误;

    ####<Nov 22, 2017 3:30:23 PM EET> <Error> <Deployer> <nbia-pc> <AdminServer> <[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1511357423637> <BEA-149265> <Failure occurred in the execution of deployment request with ID "456499572774374" for task "18". Error is: "weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.bouncycastle.crypto.generators.PKCS5S2ParametersGenerator.<init>(Lorg/bouncycastle/crypto/Digest;)V"
weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.bouncycastle.crypto.generators.PKCS5S2ParametersGenerator.<init>(Lorg/bouncycastle/crypto/Digest;)V
    at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:73)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
    at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:48)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)

我用这个库来做spring security,依赖版本是1.58

<dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <version>1.58</version>
        </dependency>

用过的类就是这样。

 @Autowired
    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
   auth.jdbcAuthentication().dataSource(jdbcTemplate.getDataSource()).passwordEncoder(new SCryptPasswordEncoder());
    }

问题出在哪里?

【问题讨论】:

  • 我已经检查过了,没有其他的。这里有一个有趣的想法。当我想显示 SCryptPasswordEncoder() 类时,它会将我重定向到 spring-security 库。但我遇到了 bouncycastle 错误!

标签: java spring spring-security weblogic


【解决方案1】:

(链接是例子,我不知道你的spring-security-crypto版本)

我认为您应该使用与 spring-security-crypto 相同版本的 bouncy-castle,或者您可能会尝试这样做(不确定这是否可行):

<dependency>
  <groupId>org.bouncycastle</groupId>
  <artifactId>bcprov-jdk15on</artifactId>
  <scope>provided</scope>
</dependency>

【讨论】:

  • 谢谢,前提是范围不起作用,而且我没有 spring-security-crypto。我的 pom.xml 在上面更新了。
  • 我的spring版本是1.5.7.RELEASE
【解决方案2】:

bouncycastle/crypto/Digest 类已从 bouncycastle 库中移除,因此我必须更改我的编码算法。

   <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>1.58</version>
    </dependency>

【讨论】:

    猜你喜欢
    • 2015-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多