The JCE distributed with Java 8 seems to not properly support PKCS#8 decoding of encrypted private key using the PBES2 password based encryption scheme defined in PKCS#5.
The compatibility test needs to be disabled for Java8, so it allow building XWiki Commons under Java8 with success. Since the crypto module does not rely on the JCE for its operation, this is not critical. The test is left in for other versions so at least we knows when it works or not.
It could be interesting to dig the Java 8 issue to better understand why this regression happens.