0

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 |
Jameson
  • 6,400
  • 6
  • 32
  • 53
SRIRAM RAMACHANDRAN
  • 297
  • 3
  • 8
  • 23

1 Answers1

0

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

kendomen
  • 770
  • 6
  • 13
  • Eclipse java 1.8 and Grails Java 1.8_121 ... seems same ... security files in the sense jce_policy 8 right ? and since I already executed the same program in eclipse I added the security files already in the folders. but not working in grails.... @kendomen – SRIRAM RAMACHANDRAN Mar 09 '17 at 05:06
  • Yes. You're right. It must be something else. Sorry! – kendomen Mar 09 '17 at 05:19
  • any other solutions? Do I need to add to the build path in grails or anything else ? I am stuck in this... – SRIRAM RAMACHANDRAN Mar 09 '17 at 05:21