On Nov 30, 2012, at 2:36 PM, Richard Frovarp wrote: > I am trying to use JNDI to configure the mail session. I appear to be running > into trouble because I don't have the mail and activation jars in tomcat/lib, > but rather app/WEB-INF/lib. > > If I put them in both places I get an error, If I just leave them in the > application I get ClassNotFoundException.
According to step #4, you need to put them into "$CATALINA_HOME/lib", and as you indicated if they are in both "$CATALINA_HOME/lib" and the web application's lib directory then you'll get an error. https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#JavaMail_Sessions > > The smart thing would be to put them in tomcat/lib, but I have other web > applications running on the system without using JNDI, that have their own > versions of mail and activation. My fear is if I put the file in tomcat/lib > for this application, I'll break the other ones. If you don't remove it from the web applications lib directories then it will break. Based on what you reported above and by what is documented, if you add them to "$CATALINA_HOME/lib" and a web application ships with them then you'll get an error. You would want to add it to "$CATALINA_HOME/lib" and remove it from your applications. If you do that, it should work so long as your applications are compatible with the version you put in "$CATALINA_HOME/lib". Dan > > I am defining the JNDI values inside of the application's context. Is there > any way to not put it in tomcat/lib and still have it work? Or if I put them > in tomcat/lib, will my existing applications still work just fine since they > aren't using JNDI? > > Thanks, > Richard > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org