• Post Reply Bookmark Topic Watch Topic
  • New Topic

【help】lookup Error  RSS feed

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) {
Error message:
javax.naming.NameNotFoundException: Unable to resolve comp/env/ejb/MmshowCountrylist Resolved: 'comp/env' Unresolved:'ejb' ; remaing name 'MmshowCountrylist'
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!