• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI lookup for EJB home interface not working  RSS feed

 
John Davis
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I receive the following message when attempting a lookup of the ejb home interface.
javax.naming.NamingException: Lookup failed: Connection refused to host: g2h; ne
sted exception is:
java.net.ConnectException: Connection refused: connect
at desisoft.ejb.client.EjbClientContext.lookup(EjbClientContext.java:81)
at javax.naming.InitialContext.lookup(Unknown Source)
at ASAdonations.service(ASAdonations.java:72)

Oddly enough, when I used Context.lookup (String) to get the jdbc data source, it works fine and doesn't refuse the connection. It appears that the connection for the lookup is only being refused when my servlet is acting as an EJB client. Any idea of how to fix this problem?
 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would help if you posted the lookup code. A number of things might be causing your problem.
 
Aftab Hussain
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would also help if you give us name of app server and version.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!