Project

General

Profile

Actions

Bug #12447

closed

java.lang.NoClassDefFoundError: Could not initialize class sun.security.pkcs.SignerInfo

Added by François ARMAND almost 6 years ago. Updated almost 6 years ago.

Status:
Rejected
Priority:
N/A
Category:
Security
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

I started to get the following stack trace when trying to run the JsEngine test:

mvn clean test -Dtest=TestJsEngine
....
java.lang.NoClassDefFoundError: Could not initialize class sun.security.pkcs.SignerInfo
        at sun.security.pkcs.PKCS7.parseSignedData(PKCS7.java:392)
        at sun.security.pkcs.PKCS7.parse(PKCS7.java:186)
        at sun.security.pkcs.PKCS7.parse(PKCS7.java:154)
        at sun.security.pkcs.PKCS7.<init>(PKCS7.java:136)
        at sun.security.util.SignatureFileVerifier.<init>(SignatureFileVerifier.java:121)
        at java.util.jar.JarVerifier.processEntry(JarVerifier.java:299)
        at java.util.jar.JarVerifier.update(JarVerifier.java:230)
        at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
        at java.util.jar.JarFile.getInputStream(JarFile.java:450)
        at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:977)
        at sun.misc.Resource.cachedInputStream(Resource.java:77)
        at sun.misc.Resource.getByteBuffer(Resource.java:160)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:454)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:215)
        at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
        at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
        at sun.security.jca.ProviderList.getProvider(ProviderList.java:233)
        at sun.security.jca.ProviderList$ServiceList.tryGet(ProviderList.java:434)
        at sun.security.jca.ProviderList$ServiceList.access$200(ProviderList.java:376)
        at sun.security.jca.ProviderList$ServiceList$1.hasNext(ProviderList.java:486)
        at javax.crypto.SecretKeyFactory.nextSpi(SecretKeyFactory.java:293)
        at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121)
        at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)
        at com.normation.cfclerk.domain.AixPasswordHashAlgo$.getSecretKeFactory(AixPasswordHashAlgo.scala:185)
        at com.normation.cfclerk.domain.AixPasswordHashAlgo$.ssha512impl$lzycompute(AixPasswordHashAlgo.scala:227)
        at com.normation.cfclerk.domain.AixPasswordHashAlgo$.ssha512impl(AixPasswordHashAlgo.scala:227)
        at com.normation.cfclerk.domain.AixPasswordHashAlgo$.ssha512(AixPasswordHashAlgo.scala:173)
        at com.normation.rudder.services.policies.JsLibPassword.aixSha512(JavascriptEngine.scala:130)
        at com.normation.rudder.services.policies.JsLibPassword.aixSha512$(JavascriptEngine.scala:130)
        at com.normation.rudder.services.policies.JsRudderLibImpl$$anon$2.sha512(JavascriptEngine.scala:275)
        at com.normation.rudder.services.policies.JsLibPassword.auto(JavascriptEngine.scala:198)
        at com.normation.rudder.services.policies.JsLibPassword.auto$(JavascriptEngine.scala:194)
        at com.normation.rudder.services.policies.JsRudderLibImpl$$anon$2.auto(JavascriptEngine.scala:267)
        at jdk.nashorn.internal.scripts.Script$18$\^eval\_.:program(<eval>:1)
        at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
        at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
        at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
        at com.normation.rudder.services.policies.JsEngine$SandboxedJsEngine.$anonfun$singleEval$1(JavascriptEngine.scala:550)
        at com.normation.rudder.services.policies.JsEngine$SandboxedJsEngine$$anon$3.call(JavascriptEngine.scala:574)
        at com.normation.rudder.services.policies.JsEngine$SandboxedJsEngine$$anon$3.call(JavascriptEngine.scala:571)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
        at com.normation.rudder.services.policies.JsEngine$RudderJsEngineThreadFactory$SandboxedThread.run(JavascriptEngine.scala:712)

It does not seems to be link to a particular version of Rudder 4.1: I get the same problem in 4.1.1 or latests one.

I tested with several JDK, from 1.8.144 to 1.8.62.

I don't know exactly what started the problem. We are at least 2 to saw it. Our integration system does not display the problem with same version. Other people are not seing it with same jdk version. It stings.


Related issues 1 (0 open1 closed)

Is duplicate of Rudder - Bug #12448: Failed generation with "Could not initialize class javax.crypto.JceSecurity"ReleasedVincent MEMBRÉActions
Actions

Also available in: Atom PDF