Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Box connection issue

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)

Labels (3)
5 Replies
Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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?

0683p000009M0uW.png

 

 

 

 

Warm Regards,

 

Nikhil Thampi

Anonymous
Not applicable
Author

So, if I use this, What should I put under refresh token. 

I have got only developer access token.

 

Thanks!

Anonymous
Not applicable
Author

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