start           news             projects             technologies          downloads            contact



Openlaszlo on Debian & Security Manager

Problem:
OpenLaszlo 4.0.5 produces "Security Exceptions" or complains that it cannot "initialize class org.openlaszlo.i18n.LaszloMessages"

Cause:
By default, Debian will start Tomcat with "-security" switched on. This activates Java's security manager (see the Tomcat documentation or Sun's webseite for more information), which in turn prohibits the execution of anything stored in "/openlaszlo/WEB-INF/lib", and, in addition to that, OL is not allowed to write in "openlaszlo-4.0.5/WEB-INF/lps/work".

Solution 1:
You can switch the security manager off by commenting out "TOMCAT5_SECURITY=yes" in "/etc/init.d/tomcat5.5" (or by substituting "yes" with "no").

Better:

Solution 2:
You can grant the necessary rights to OpenLaszlo by adding the following lines to "/var/lib/tomcat5.5/conf/policy.d/04webapps.policy":
// grant execution rights to libraries:
grant codeBase \
    "file:${catalina.home}/webapps/
     openlaszlo-4.0.5/WEB-INF/lib/-" {

        permission java.security.AllPermission;

    };

// grant writing (and reading and deletion)
// rights for openlaszlo's work-folder:
grant codeBase \
    "file:${catalina.home}/webapps/
     openlaszlo-4.0.5/WEB-INF/lib/-" {

        permission java.io.FilePermission \
        "file:${catalina.home}/webapps/
         openlaszlo-4.0.5/WEB-INF/lps/work/-", \
        "read,write,delete";

    };


If you spot a mistake, please let us know.

SignUp
Software for Schools

screencasts
modules
pricing
technology


eLearning
get involved
technology


eGuide
get involved
technology


more...
VBA/Access
JSP/Java
OpenSource
© 2007 shj-online, Heidelberg, Germany