The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now!
A chart showing the TIBCO Platform vision
Jump to content
Forums
Ask questions and gain insight from discussions

In a BW java activity, retrieving an embedded resourse stream fails. Solution


Paul Wilcox 4

Recommended Posts

// In the following java activity, the stream is null. If I run the equivalent code in a regular java project, no problem.

package BusinessProcesses.Get_Secret;

import java.util.*;

import java.io.*;

import java.io.InputStream;

import com.amazonaws.services.secretsmanager.AWSSecretsManager;

import com.amazonaws.services.secretsmanager.AWSSecretsManagerClientBuilder;

import com.amazonaws.partitions.PartitionsLoader;

public class Get_SecretCall_GetSecret{

/****** START SET/GET METHOD, DO NOT MODIFY *****/

/****** END SET/GET METHOD, DO NOT MODIFY *****/

public Get_SecretCall_GetSecret() {

}

public void invoke() throws Exception {

/* Available Variables: DO NOT MODIFY

* Available Variables: DO NOT MODIFY *****/

InputStream stream = PartitionsLoader.class.getResourceAsStream("com/amazonaws/partitions/endpoints.json");

if (stream == null)

throw new NullPointerException("stream");

}

}

Link to comment
Share on other sites

Turns out this was a problem with designer (5.11) and the way it doesn't do a good job with project state ... when loading/changing the alias file, there were mulitple references to the jars, sometimes with .jar1 extensions, etc.  Hard to say exactly what state it was in when I was having thia problem, but by completely removing the alias's, closing the project and restarting designer, realoading the alias's I got this to work.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...