By Hugo Laredo

2019-01-11 11:26:37 8 Comments

We need to deploy a standalone jar in an IBM AIX 6.1. This jar tries to connect to an SFTP server using hierynomus sshj and bouncycastle. When trying to instantiate the KeyAgreement, in execution time, it outputs the following:

Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.lang.J9VMInternals.initialize(
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(
        at javax.crypto.b.<clinit>(Unknown Source)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(
        at javax.crypto.KeyAgreement.getInstance(Unknown Source)
        at net.schmizz.sshj.common.SecurityUtils.registerSecurityProvider(
        at net.schmizz.sshj.common.SecurityUtils.register(
        at net.schmizz.sshj.common.SecurityUtils.isBouncyCastleRegistered(
        at net.schmizz.sshj.DefaultConfig.<init>(
        at net.schmizz.sshj.SSHClient.<init>(
Caused by: java.lang.NullPointerException
        at org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV.engineGenerateSeed(Unknown Source)
        at org.bouncycastle.jcajce.provider.drbg.DRBG$HybridSecureRandom.<init>(Unknown Source)
        at org.bouncycastle.jcajce.provider.drbg.DRBG.createBaseRandom(Unknown Source)
        at org.bouncycastle.jcajce.provider.drbg.DRBG.access$200(Unknown Source)
        at org.bouncycastle.jcajce.provider.drbg.DRBG$Default.<clinit>(Unknown Source)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(
        ... 19 more

The JVM used to run this jar is:

java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr9fp1ifix-20110511(SR9 P1+IZ97552))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr9-20110203_74623 (JIT enabled, AOT enabled)
J9VM - 20110203_074623
JIT  - r9_20101028_17488ifx3
GC   - 20101027_AA)
JCL  - 20110203_01

The JVM security settings have been updated by appending the new security provider to the end of the list of providers at and by adding the libraries: bcpkix-jdk15on-1.60.jar bcprov-jdk15on-1.60.jar to the ext directory.

The standalone jar has been built using maven-assembly-plugin.

We wonder why this is happening and how we could fix it.


Related Questions

Sponsored Content

15 Answered Questions

[SOLVED] Can we instantiate an abstract class?

5 Answered Questions

[SOLVED] Under what conditions is a JSESSIONID created?

  • 2009-02-27 18:00:12
  • joshjdevl
  • 346198 View
  • 253 Score
  • 5 Answer
  • Tags:   java jsessionid

0 Answered Questions

Scanner.nextLine() need double enter to finish a line in Java6

  • 2017-11-03 08:24:15
  • 核心力量
  • 213 View
  • 3 Score
  • 0 Answer
  • Tags:   java java-6 java-5

1 Answered Questions

[SOLVED] Bespoke JCE Provider on IBM AIX

2 Answered Questions

[SOLVED] Java UTF-8 filenames with IBM JVM (AIX)

  • 2012-10-19 19:04:42
  • Edward Thomson
  • 4593 View
  • 9 Score
  • 2 Answer
  • Tags:   java utf-8 aix j9

1 Answered Questions

Java System.loadLibrary("m") fails on AIX 6.1

2 Answered Questions

[SOLVED] ClassCastException caused by bug in Just In Time?

Sponsored Content