lundi 29 juin 2015

Jndi lookup throws naming exception

I'm using Jndi lookup for getting object of a class defined in a third party jar file.Jar is included in library and in lookup i have given correct path of class for which i want to create object by jndi lookup

jndiname-"abc-core-1.0/com.cmpny.service.Abcservice" and I have abc-core-1.0 in my library that has a class file Abcservice in the same path (com.cmpny.service.Abcservice)

    jndiname="abc-core-1.0/com.cmpny.service.Abcservice";Properties properties=new Properties();
properties.put(Context.URL_PKG_PREFIXES,PKG_INTERFACES)
InitialContext obj=new IntialContext(properties);
obj.lookup(jndiname);

please let me know what else could be reason NamingException

Thanks & Regards

Aucun commentaire:

Enregistrer un commentaire