Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

【help】lookup Error

 
pinheng wang
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in SessionBean:
public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;
try {
javax.naming.Context context1 = new javax.naming.InitialContext();
if(logging)System.out.println("start to lookup entitybean jndi 2");
countrylistHome = (MmshowCountrylistHome) context1.lookup("java:comp/env/ejb/MmshowCountrylist");
if(logging)System.out.println("sessionbean jndi successful");
}
catch (Exception ex) {
if(logging)System.out.println(ex.toString());
}
}
Error message:
javax.naming.NameNotFoundException: Unable to resolve comp/env/ejb/MmshowCountrylist Resolved: 'comp/env' Unresolved:'ejb' ; remaing name 'MmshowCountrylist'
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic