Hi all, I can't make xalan work when I run tomcat with security manager. All I get is java.lang.ExceptionInInitializerError (see stack trace below). It works fine without security manager.
Has any of you used xalan on tomcat with secuirity manager? What privileges should I grant to the code? I tried: grant { permission java.util.PropertyPermission "*", "read"; permission java.net.SocketPermission "*", "connect"; permission java.lang.RuntimePermission "getClassLoader"; }; grant { permission java.io.FilePermission "${catalina.home}/temp/*", "read, write, delete"; }; But it doesn't help. Any ideas? Thank you very much in advance, Michal. My setup is tomcat 5.0.28 on jdk 1.4.2_06, it behaves the same on win xp or linux. Here's the code: File xmlFileObj = new File(xmlFile); File xslFileObj = new File(xslFile); this.out = out; TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(new StreamSource(xslFileObj)); transformer.setParameter("serviceName", serviceName); transformer.transform(new StreamSource(xmlFileObj), new StreamResult(out)); out.flush(); And the stack trace. javax.servlet.ServletException org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont extImpl.java:825) org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.ja va:64) org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:74 5) java.security.AccessController.doPrivileged(Native Method) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:743) org.apache.jsp.tree_jsp._jspService(tree_jsp.java:98) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:500) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav a:157) root cause java.lang.ExceptionInInitializerError java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:141) org.apache.xalan.serialize.SerializerFactory.getSerializer(SerializerFac tory.java:131) org.apache.xalan.transformer.TransformerImpl.createResultContentHandler( TransformerImpl.java:1048) org.apache.xalan.transformer.TransformerImpl.createResultContentHandler( TransformerImpl.java:975) org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j ava:1124) org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j ava:1107) circeos.xml.XslHtmlConverter.Display(XslHtmlConverter.java:29) org.apache.jsp.tree_jsp._jspService(tree_jsp.java:84) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:500) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav a:157) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]