cancel
Showing results for 
Search instead for 
Did you mean: 

InitialContext.lookup(DestinationService) returns null - why?

Former Member
0 Kudos

Hi,

I am using the same structure from the example above to use a destination, I created, in my Jco-call.

Everything is fine, but I am not getting the DestinationService object. The lookup returns just null.

Code:

[...]

Context ctx = null;

Hashtable env = new Hashtable();

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

env.put(Context.PROVIDER_URL,"localhost:59904");

env.put("force_remote", "true");

env.put(Context.SECURITY_PRINCIPAL, "Administrator");

env.put(Context.SECURITY_CREDENTIALS, "password");

env.put("domain", "true");

try {

ctx = new InitialContext(env);

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

if (dstService == null) throw new Exception("Destination Service not available");

RFCDestination dst =(RFCDestination) dstService.getDestination("RFC", "C00");

int maxPoolSize = dst.getMaxPoolSize();

long maxWaitTime = dst.getMaxWaitTime();

Properties jcoProperties = dst.getJCoProperties();

[...]

System:

J2EE WAS 6.40 SP13 (SAP Java Crypto installed)

NWDS SP13

What could be wrong?

Thx for your help/advise

Martin Reichwein

[Repost - ignore old post]

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

After removing all jar's and inserting just the jars from the server path - it works.

Again I have recognized, the JARS from the NWDS are not identical with the JARS in the server...

THX 2 ALL