Remote lookup is getting failed in jboss eap 7.4

Posted on

I have upgraded my jboss from 6.2 to 7.4 , and after that my remote lookup jndi is getting failed .
I have tried a lot of things , my JNDI properties are given below:

final Hashtable<String, String> jndiProperties = new Hashtable<String, String>();

jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
jndiProperties.put(Context.PROVIDER_URL, "remote+http://localhost:8180");
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
final InitialContext context = new InitialContext(jndiProperties);
final Object remoteBusinessObj = context.lookup("ejb:fdpBusiness-ear/fdpBusiness/PAMCleanUpServiceImpl!com.ericsson.fdp.business.batchjob.pam.service.PAMCleanUpService");

I have tried everything available on internet still not able to lookup this bean , I am not able to perform remote lookup for this bean .
Note : This is a stateless remote bean written by
@Stateless
@Remote
class PAMCleanUpServiceImpl implements PAMCleanUpService

I am getting below error while running the server :
javax.naming.InvalidNameException: WFNAM00007: Invalid URL scheme name "ejb"

And if I am removing "ejb " from the lookup path then the error is:

javax.naming.InvalidNameException: WFNAM00007: Invalid URL scheme name "null"

Responses