-
1. Re: JNDI Lookup is not working in thread's run method (AS 7.1)
jaikiran Sep 10, 2012 2:06 AM (in response to sandip.jorwekar)What does the JNDI context creation code look like? And please post the entire exception stacktrace. Which exact version of JBoss AS 7.1 is this?
-
2. Re: JNDI Lookup is not working in thread's run method (AS 7.1)
sandip.jorwekar Sep 10, 2012 5:54 AM (in response to jaikiran)The Jboss version is jboss-as-7.1.1.Final
The code snippet is as below
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
prop.put(Context.PROVIDER_URL, "remote://127.0.0.1:4447");
prop.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
prop.put("jboss.naming.client.ejb.context", true);
prop.put(Context.SECURITY_PRINCIPAL, "test");
prop.put(Context.SECURITY_CREDENTIALS, "test");
ctx = new InitialContext(prop);
The error is
- java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:test,distinctname:] combination for invocation context org
.jboss.ejb.client.EJBClientInvocationContext@87ad67
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584)
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)