Thanks lot if anyone can point me in the right direction. TC5.5.4 ( it happens to other versions) Window XP JAVA 1.5.0 My program runs successfully without turning on the -security, but has the errors when it is turned on. The errors generated look like not related to access violation because of active security? Otherwise, I will see the access violation security errors. I searched all the internet sources but found no answers. I setup the security as follows: 1. catalina.policy grant codeBase "file:${catalina.home}/webapps/javaxml2/WEB-INF/classes/-" { permission java.util.PropertyPermission "javax.mail.Session.Factory","read"; permission java.net.SocketPermission "localhost:25", "connect,resolve"; permission java.net.SocketPermission "localhost:1521","connect,resolve"; }; 2. mail session errors: INFO: HTMLManager: list: Listing contexts for virtual host 'localhost' javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:566) at javax.mail.Transport.send0(Transport.java:151) at javax.mail.Transport.send(Transport.java:80) at javaxml2.UpdateItemServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 3. DB connection errors: INFO: HTMLManager: list: Listing contexts for virtual host 'localhost' javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFact ory.java:132) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) 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:152) at javaxml2.UpdateItemServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 4. context.xml <Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="localhost" /> <Resource name="jdbc/EmployeeDB" auth="Container" type="javax.sql.DataSource" username="scott" password="tiger" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:oracle" maxActive="8" maxIdle="4"/>