JAVA BOX SDK from Eclipse to Grails using GGTS

68 Views Asked by At

I am using BOX JAVA SDK and ran those functionalities in Eclipse, which worked fine.

I added all the jar files I used in eclipse to GGTS. But when I add the packages to Grails (java->src->package_name), it throws an exception all the time.

What else could be preventing me from moving to Grails?

The exception I am getting via Grails is from the second line of:

    PEMParser keyReader = new PEMParser(new StringReader(this.privateKey));
    Object keyPair = keyReader.readObject();

The message is:

com.box.sdk.BoxDeveloperEditionAPIConnection.decryptPrivateKey

    Error |
Caused by: org.bouncycastle.openssl.PEMException: problem creating RSA private key: java.lang.IllegalArgumentException: unknown object in getInstance: [B
Error |
    at org.bouncycastle.openssl.PEMParser$KeyPairParser.parseObject(Unknown Source)
Error |
    at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)
Error |
    at com.box.sdk.BoxDeveloperEditionAPIConnection.decryptPrivateKey(BoxDeveloperEditionAPIConnection.java:378)
Error |
1

There are 1 best solutions below

3
kendomen On

is grails using the same jdk? I had to put the 2 security files in jre/lib/security for this to work.