This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Getting "Lookup Error Name comp/env/mail not found in context "java:"." error

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I am getting the "Lookup Error Name comp/env/mail not found in context "java:"., Failed to lookup the configuration path" error in the servlet.

The lines of code is
try{
Context initCtx = new InitialContext();
mailHost = (String) initCtx.lookup("java:comp/env/mail/mail_02");

} catch (NamingException e) {
AtlasLogger.info(
"DMUMail: Failed to lookup the configuration path");
AtlasLogger.error("DMUMail: Lookup Error " + e.getMessage());
}

Please advise me.Thanks.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you're trying to get the default mail session from your container.

What container are you using?
 
mamata surapaneni
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using WSAD.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like you are trying to lookup a web application environment variable. Environment variables are set up in your web.xml file. Try adding something like this to your web.xml file:

[ July 24, 2007: Message edited by: Merrill Higginson ]
 
mamata surapaneni
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried this, still I am getting the same error. The error saying that 'Broken pipe cannot send mail, look up error, and "Lookup Error Name comp/env/mail not found in context "java:" .

Please help.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic