Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Unable to login to DougDocXmodel

Help
2007-07-19
2013-04-17
  • Rick Knight
    Rick Knight
    2007-07-19

    Hi,

    I've installed DougDocX on my Kubuntu system. Everything looks correct. Tomcat5.5 serves web pages and it looks like is compiling jsp pages. When I go to dogdocxmodel that page loads fine. When I try to login as either admin or guest I get a page full of errors.

    Error is pasted here. Can you help me fix this?

    HTTP Status 500 -

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: access denied (java.io.FilePermission /opt/ootemplates/modeluserlinks.xml read)
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

    root cause

    org.apache.jasper.JasperException: access denied (java.io.FilePermission /opt/ootemplates/modeluserlinks.xml read)
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
        java.security.AccessController.doPrivileged(Native Method)
        java.security.AccessController.doPrivileged(Native Method)
        org.apache.jsp.Login_jsp._jspService(Login_jsp.java:126)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

    root cause

    java.security.AccessControlException: access denied (java.io.FilePermission /opt/ootemplates/modeluserlinks.xml read)
        java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        java.security.AccessController.checkPermission(AccessController.java:427)
        java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        java.lang.SecurityManager.checkRead(SecurityManager.java:871)
        java.io.File.exists(File.java:700)
        pcg.dougdocs.UserLinks.readUserLinksXML(UserLinks.java:212)
        org.apache.jsp.Start_jsp._jspService(Start_jsp.java:99)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
        java.security.AccessController.doPrivileged(Native Method)
        java.security.AccessController.doPrivileged(Native Method)
        org.apache.jsp.Login_jsp._jspService(Login_jsp.java:126)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

    note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
    Apache Tomcat/5.5

    My templates are in /opt/ootemplates and are all owned by root & users. OpenOffices and Tomcat5.5 are running as me "rick" and rick is a member of users (and sudo). The only place I veered from the install document is the port Tomcat5.5 runs on. Kubuntu runs Tomcat5.5 on 8180.

    Thanks for any help,
    Rick Knight

     
    • Rick Knight
      Rick Knight
      2007-07-20

      Problem solved! A bit of googling helped me find the problem and create a fix...

      Now it works grat and I hope to evaluate it over the next couple of weeks.

      Add the following to the policy...

      This goes at the bottom of 03catalina.policy
      //Added for DougDocX
      grant codeBase "file:/var/lib/tomcat5.5/webapps/dougdocxmodel/-" {
          permission java.io.FilePermission "<<ALL FILES>>", "read";
          permission java.security.AllPermission;
      };

      This goes at the bottom of 04webapps.policy
      // Added for DougDocX
      grant codeBase "file:/var/lib/tomcat5.5/webaps/dougdocxmodel/-" {
          permission java.io.FilePermission "<<ALL FILES>>", "read";
      };

       
    • J.D.
      J.D.
      2007-08-24

      Normally, the ootemplates folders is owned by the same user that runs tomcat.  Your fix will take care of read access, but it won't allow you to upload new document templates to the server.

      If you're running tomcat as, say tomcatuser, then do the following (as root):
      chown -R tomcatuser:users /opt/ootemplates