cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPDestinationService getting nullPointerException

Former Member
0 Kudos

Hi All,

I am trying to implements the Destination Service in my program. I have created various destination name through visual admin with Authentication : None. When I am try to lookup this service through JNDI lookup getting null.

<code>

Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl";);

env.put(Context.PROVIDER_URL, "avggstnh.dc-ratingen.de:50104");

ctx = new InitialContext(env);

DestinationService dstService = (DestinationService) ctx.lookup(DestinationService.JNDI_KEY);

Destination destination = dstService.getDestination("HTTP", "aProperty");

HTTPDestination httpDestination = (HTTPDestination) destination;

String value = httpDestination.getUrl();

</code>

kindly correct me if I am missing something.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

you need to add these jars to the runtime classpath:

bin/interfaces/tc_sec_destinations_interface.jar

bin/services/tcsecdestinations~service/tc_sec_destinations_service.jar

bin/ext/security.class/tc_sec_saml_util.jar

Kind regards,

Tsvetomir

Answers (0)