DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=34001>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34001 Summary: NamingException Product: Tomcat 5 Version: 5.5.7 Platform: PC OS/Version: Windows 2000 Status: NEW Keywords: ErrorMessage Severity: blocker Priority: P2 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Hi, I've discovered a new bug in Tomcat 5.5. Calling a mail resource simply won't work. Below a full example on when it fails. The CATALINA/localhost/lio2.xml contains the following code: ------------------------------------------------------------ <Resource name="mail/session" type="javax.mail.Session" mail.smtp.host="localhost"/> The Servlet contains following code inside the init(): -------------------------------------------------- mailSession = ( javax.mail.Session ) new InitialContext().lookup ("java:comp/env/mail/session"); The outcome on the server shows: --------------------------------------- SEVERE: Servlet /lio2 threw load() exception javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance (ResourceFactory.java:132) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:792) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(Unknown Source) at com.lio.servlet.CreateAdServlet.init(CreateAdServlet.java:66) Interesting enough if you test this for a database connection then it works. Cheers Tony -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]