[英]how do i solve this Error injecting constructor, java.lang.NoClassDefFoundError: javax/crypto/SecretKey
i also tried the below mentioned steps:我还尝试了以下提到的步骤:
check maven version by mvn -version in cmd通过 mvn -version 在 cmd 中检查 maven 版本
check prerequisites such as gmconstant.js, application.prop, jboss-deploymnet_structure.xml,pom file with others or follow the env setup document与其他人一起检查 gmconstant.js、application.prop、jboss-deploymnet_structure.xml、pom 文件等先决条件或遵循 env 设置文档
check java version as 1.8.0_161 and ur maven version should be 3.6.2 or 3.6.3检查 java 版本为 1.8.0_161,你的 maven 版本应该是 3.6.2 或 3.6.3
if maven is not deploying try executing this command如果 Maven 未部署,请尝试执行此命令
Call mvn -Dbuild.version=Local -Doutput.dir="C:\\jboss-eap-7.0\\standalone\\deployments" clean install
try getting the entire project folder from others and check in your environment尝试从其他人那里获取整个项目文件夹并检查您的环境
if setting your environmental variables, then give SET PATH=C in command prompt as administrator如果设置环境变量,则在命令提示符中以管理员身份提供 SET PATH=C
deleting the files unders .m2 folder /repository删除 .m2 文件夹/repository 下的文件
C:\\Users\\asophia.m2\\repository C:\\用户\\asophia.m2\\repository
also added the below mention paths in environment variables还在环境变量中添加了下面提到的路径
C:\\Oracle\\Middleware\\jdk160_18\\bin C:\\Program Files\\Java\\jre1.8.0_161 C:\\Program Files\\Java\\jdk1.8.0_161
also set the path C:\\Tools\\apache-maven-3.6.2\\bin in user variable还在用户变量中设置路径 C:\\Tools\\apache-maven-3.6.2\\bin
You have to add the encryption jar in C:\\Program Files\\Java\\jdk1.8.0_161\\jre\\lib\\ext
or whatever jdk you are using and then register it as well.您必须在C:\\Program Files\\Java\\jdk1.8.0_161\\jre\\lib\\ext
或您正在使用的任何 jdk 中添加加密 jar,然后也将其注册。
Since you are using Oracle jdk, you probably need their jar (JCE).由于您使用的是 Oracle jdk,因此您可能需要他们的 jar (JCE)。
https://www.oracle.com/java/technologies/java-archive-downloads-java-plat-downloads.html#JCE-1_2_2-G-JS https://www.oracle.com/java/technologies/java-archive-downloads-java-plat-downloads.html#JCE-1_2_2-G-JS
Quoting the documentation:引用文档:
Installing Providers安装提供程序
In order to be used, a cryptographic provider must first be installed, then registered either statically or dynamically.为了使用,必须首先安装加密提供程序,然后静态或动态注册。
Static Registration静态注册
The configuration file is located in the following location:配置文件位于以下位置:
Unix: /lib/security/java.security Unix:/lib/security/java.security
Windows: \\lib\\security\\java.security Windows:\\lib\\security\\java.security
You can check the documentation for a well detailed explanation:您可以查看文档以获得详细的解释:
https://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html https://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.