Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to connect with box.
com.box.sdk.BoxConfig boxConfig = new com.box.sdk.BoxConfig(clientId, clientSecret, enterpriseId, publicKeyId, privateKey, passphrase);
com.box.sdk.BoxDeveloperEditionAPIConnection client = com.box.sdk.BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig);
I have used this code in tJava component. But, I am getting below error. Can anyone help me out.
Exception in component tJava_2 (BoxConnection)
java.lang.NullPointerException
at com.box.sdk.BoxDeveloperEditionAPIConnection.decryptPrivateKey(BoxDeveloperEditionAPIConnection.java:507)
at com.box.sdk.BoxDeveloperEditionAPIConnection.constructJWTAssertion(BoxDeveloperEditionAPIConnection.java:450)
at com.box.sdk.BoxDeveloperEditionAPIConnection.constructJWTAssertion(BoxDeveloperEditionAPIConnection.java:431)
at com.box.sdk.BoxDeveloperEditionAPIConnection.authenticate(BoxDeveloperEditionAPIConnection.java:320)
at com.box.sdk.BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(BoxDeveloperEditionAPIConnection.java:179)
at com.box.sdk.BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(BoxDeveloperEditionAPIConnection.java:211)
at reports.boxconnection_0_1.BoxConnection.tJava_2Process(BoxConnection.java:521)
at reports.boxconnection_0_1.BoxConnection.tLibraryLoad_7Process(BoxConnection.java:1720)
at reports.boxconnection_0_1.BoxConnection.tLibraryLoad_6Process(BoxConnection.java:1556)
at reports.boxconnection_0_1.BoxConnection.tLibraryLoad_5Process(BoxConnection.java:1392)
at reports.boxconnection_0_1.BoxConnection.tLibraryLoad_4Process(BoxConnection.java:1228)
at reports.boxconnection_0_1.BoxConnection.tLibraryLoad_3Process(BoxConnection.java:1064)
at reports.boxconnection_0_1.BoxConnection.tLibraryLoad_2Process(BoxConnection.java:900)
at reports.boxconnection_0_1.BoxConnection.tLibraryLoad_1Process(BoxConnection.java:736)
at reports.boxconnection_0_1.BoxConnection.runJobInTOS(BoxConnection.java:1976)
at reports.boxconnection_0_1.BoxConnection.main(BoxConnection.java:1802)
Hello,
Would you mind posting your whole job design screenshots on forum which will be helpful for us to address your issue?
Talend provides users with TalendHelpCenter:Box components.
What special needs you have that requires custom code in tJava component?
Best regards
Sabrina
Hello,
com.box.sdk.BoxConfig boxConfig = new com.box.sdk.BoxConfig("clientID","clientSecret","enterpriseID","publicKeyID","privateKey","passphrase");
com.box.sdk.BoxDeveloperEditionAPIConnection client = com.box.sdk.BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig);
This is the code I have in my tJavaComponent. Trying to connect with box using this code.
Thanks,
Meghana
Hi Meghana,
Could you please advise why you are looking to connect Box using java custom code? Talend has already got a Box Connection component. Could you please try to use this component for your use case?
Warm Regards,
Nikhil Thampi
So, if I use this, What should I put under refresh token.
I have got only developer access token.
Thanks!
Hi,
Could you please check with your Box Admin about the token? From the internet, below link has the details but I have not tried it myself.
https://wiki.searchtechnologies.com/index.php/Box_Access_Refresh_Tokens_(Aspire_2)
Warm Regards,
Nikhil Thampi