[jboss-jira] [JBoss JIRA] (AS7-5513) JNDI Lookup is not working in thread run method
sandip jorwekar (JIRA)
jira-events at lists.jboss.org
Sun Sep 9 00:01:35 EDT 2012
[ https://issues.jboss.org/browse/AS7-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716818#comment-12716818 ]
sandip jorwekar commented on AS7-5513:
--------------------------------------
My code is working properly when i don't use thread ( It does JNDI lookup and return home stub and also and also create the remote object stub)
But When i use Thread (run method) to do JNDI lookup, at that time JNDI lookup for home stub is successful but it fails when home.create() method is get called and it returns with below error
java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:auroraclientcommon,distinctname:]
my code snippet is as below and i get the error at Book xref1=bookHome.create();
public void run() {
// TODO Auto-generated method stub
System.out.println("runnable");
BookHome bookHome = null;
try {
bookHome = (BookHome) ctx.lookup("app/Book!test.BookHome");
}
Book xref1=bookHome.create();
System.out.println("run "+xref1);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
> JNDI Lookup is not working in thread run method
> -----------------------------------------------
>
> Key: AS7-5513
> URL: https://issues.jboss.org/browse/AS7-5513
> Project: Application Server 7
> Issue Type: Bug
> Components: Application Client
> Affects Versions: 7.1.1.Final
> Environment: Windows XP and JDK1.6
> Reporter: sandip jorwekar
> Assignee: Stuart Douglas
> Priority: Critical
>
> When i do the JNDI lookup in thread's run method then i am getting below error
> java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:auroraclientcommon,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext at 64883c
> 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)
> at $Proxy0.create(Unknown Source)
> at BookClient1.test(BookClient1.java:117)
> at BookClient1.run(BookClient1.java:104)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list