Getting Hibernate 2.x to work with SJSAS
I am working on a project that involves Hibernate and the Sun Java System Application Server 8.1 (SJSAS). The problem was getting Hibernate to work inside of the app server. Apparently, on a default install of SJSAS, Hibernate does not have enough security permissions to run properly. My only solution was to open the server up and allow AllPermission. I did this by changing the server.policy file located in $SERVER_HOME/domains/domain1/config. I changed the following block and added the last line:
// Basic set of required permissions granted to all remaining code
grant {
permission java.lang.RuntimePermission "loadLibrary.*";
permission java.lang.RuntimePermission "queuePrintJob";
permission java.net.SocketPermission "*", "connect";
permission java.io.FilePermission "<
// work-around for pointbase bug 4864405
permission java.io.FilePermission “${com.sun.aas.instanceRoot}${/}lib${/}databases${/}-”, “delete”;
permission java.io.FilePermission “${java.io.tmpdir}${/}-”, “delete”;
permission java.util.PropertyPermission “*”, “read”;
permission java.lang.RuntimePermission “modifyThreadGroup”;
permission java.security.AllPermission;
};
This is not the safest way of running a server, but until I can find a better solution, it will have to do.