Activiti使用maven alfresco仓库问题处理

可紊 提交于 2019-12-01 06:53:39

环境

项目用到了Activiti工作流引擎。 项目使用maven进行依赖管理。

遇到问题

项目使用的activiti版本是5.13,但是maven中央库中是从5.14开始的。 从网上找到https://maven.alfresco.com/nexus/content/groups/public/这个仓库包含5.13版本。 但是配置完该仓库,使用maven从里面下载的时候出现了异常。java.lang.RuntimeException: Could not generate DH keypair

搜索解决方案

从网上搜,找到了:这里还有这里

解决方法

下面内容摘自上述第二个搜索结果:

Solution: The problem is “Prime size must be multiple of 64, and can only range from 512 to 1024″. The maximum-acceptable size that Java accepts is 1024 bits, this is a known issue http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6521495. I tried using the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files, that did not work. The bug report mentioned using BouncyCastle’s JCE implementation to get around this problem.

  1. Download the BouncyCastle JCE jars. These particular links are for version 1.52 and work for Oracle Java 5 – Java 8. https://www.bouncycastle.org/download/bcprov-jdk15on-152.jar https://www.bouncycastle.org/download/bcprov-ext-jdk15on-152.jar OR: http://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on/1.52 http://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk15on/1.52
  1. Copy jars to $JAVA_HOME/jre/lib/ext
  2. Edit $JAVA_HOME/jre/lib/security/java.security as follows: a. Locate the “security.provider” section. Keep security.provider.1=sun.security.provider.Sun b. Locate “security.provider.2″ and make that “security.provider.3″. Do this for all the remaining “security.provider.n” values. c. Set “security.provider.2″ to org.bouncycastle.jce.provider.BouncyCastleProvider security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider
  1. Re-run the maven build and the errors should now be gone.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!