<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for haxx qua non</title>
	<atom:link href="http://haxx.sinequanon.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://haxx.sinequanon.net</link>
	<description></description>
	<lastBuildDate>Tue, 17 Jan 2012 18:42:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Security policy permissions for Grails in Tomcat by jja</title>
		<link>http://haxx.sinequanon.net/2009/06/security-policy/comment-page-1/#comment-929</link>
		<dc:creator>jja</dc:creator>
		<pubDate>Tue, 17 Jan 2012 18:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=200#comment-929</guid>
		<description>It depends on your servlet container where the security policy is stored. For a production Tomcat 6 instance, it&#039;s usually in the conf/ directory and named &quot;catalina.policy&quot;, and your Tomcat startup uses the same -D arguments to java, e.g. -Djava.security.manager -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy</description>
		<content:encoded><![CDATA[<p>It depends on your servlet container where the security policy is stored. For a production Tomcat 6 instance, it&#8217;s usually in the conf/ directory and named &#8220;catalina.policy&#8221;, and your Tomcat startup uses the same -D arguments to java, e.g. -Djava.security.manager -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security policy permissions for Grails in Tomcat by Tom</title>
		<link>http://haxx.sinequanon.net/2009/06/security-policy/comment-page-1/#comment-928</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 11 Jan 2012 17:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=200#comment-928</guid>
		<description>Hi, 

I am new to Grails. I am trying to run the following java RMI-client code from within my Grails web app: 

(grails/appname/src/java/ClientProgram.java) 

... 

import java.rmi.registry.LocateRegistry; 
import java.rmi.registry.Registry; 
import java.math.BigDecimal; 
import compute.Compute; 
import java.util.Properties; 
import java.io.FileInputStream; 

public class ClientProgram { 
... 

        public static void run( String regHost, String precision ) { 
                setSystemProps(); 
                if(System.getSecurityManager() ==  null) { 
                        System.setSecurityManager(new SecurityManager()); 
                } 
                try { 
                        String name = &quot;Compute&quot;; 
                        Registry registry = LocateRegistry.getRegistry(regHost); 
                        Compute comp = (Compute) registry.lookup(name); 
                        Pi task = new Pi(Integer.parseInt(precision)); 
                        BigDecimal pi = comp.executeTask(task); 
                        System.out.println(pi); 
                } catch(Exception e) { 
                        System.err.println(&quot;ComputePi exception.&quot;); 
                        e.printStackTrace(); 
                } 
        } 

... 
} 

See http://pastebin.com/GpQVhvee for the complete class source. 

I get the following error when the code is executed: 

2012-01-09 19:20:48,794 [http-9876-1] ERROR [/smartmeters].[gsp]  - Servlet.service() for servlet gsp threw exception 
java.security.AccessControlException: access denied (java.util.PropertyPermission grails.full.stacktrace read) 
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374) 
        at java.security.AccessController.checkPermission(AccessController.java:546) 
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) 
        at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285) 
        at java.lang.System.getProperty(System.java:650) 
... 

Please see http://pastebin.com/jTzaiWfj for the full error message. 

I believe this error may appear because I have not got the correct policy settings for this code. I need the following rule in the security policy: 

grant codeBase &quot;file:/opt/grails/grails-1.3.7/appname/src/&quot; { 
        permission java.security.AllPermission; 
}; 

But I cannot find where the policy file is created or stored. If this was just a normal java application I would pass the security policy file in as a system property as follows: 

java -Djava.security.policy=policy.file main-class 

But I don&#039;t know how to achieve the same effect in Grails. Please can someone tell me how to set the java security policy for my Grails app? 

Thanks, 
Tom</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I am new to Grails. I am trying to run the following java RMI-client code from within my Grails web app: </p>
<p>(grails/appname/src/java/ClientProgram.java) </p>
<p>&#8230; </p>
<p>import java.rmi.registry.LocateRegistry;<br />
import java.rmi.registry.Registry;<br />
import java.math.BigDecimal;<br />
import compute.Compute;<br />
import java.util.Properties;<br />
import java.io.FileInputStream; </p>
<p>public class ClientProgram {<br />
&#8230; </p>
<p>        public static void run( String regHost, String precision ) {<br />
                setSystemProps();<br />
                if(System.getSecurityManager() ==  null) {<br />
                        System.setSecurityManager(new SecurityManager());<br />
                }<br />
                try {<br />
                        String name = &#8220;Compute&#8221;;<br />
                        Registry registry = LocateRegistry.getRegistry(regHost);<br />
                        Compute comp = (Compute) registry.lookup(name);<br />
                        Pi task = new Pi(Integer.parseInt(precision));<br />
                        BigDecimal pi = comp.executeTask(task);<br />
                        System.out.println(pi);<br />
                } catch(Exception e) {<br />
                        System.err.println(&#8220;ComputePi exception.&#8221;);<br />
                        e.printStackTrace();<br />
                }<br />
        } </p>
<p>&#8230;<br />
} </p>
<p>See <a href="http://pastebin.com/GpQVhvee" rel="nofollow">http://pastebin.com/GpQVhvee</a> for the complete class source. </p>
<p>I get the following error when the code is executed: </p>
<p>2012-01-09 19:20:48,794 [http-9876-1] ERROR [/smartmeters].[gsp]  &#8211; Servlet.service() for servlet gsp threw exception<br />
java.security.AccessControlException: access denied (java.util.PropertyPermission grails.full.stacktrace read)<br />
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)<br />
        at java.security.AccessController.checkPermission(AccessController.java:546)<br />
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)<br />
        at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)<br />
        at java.lang.System.getProperty(System.java:650)<br />
&#8230; </p>
<p>Please see <a href="http://pastebin.com/jTzaiWfj" rel="nofollow">http://pastebin.com/jTzaiWfj</a> for the full error message. </p>
<p>I believe this error may appear because I have not got the correct policy settings for this code. I need the following rule in the security policy: </p>
<p>grant codeBase &#8220;file:/opt/grails/grails-1.3.7/appname/src/&#8221; {<br />
        permission java.security.AllPermission;<br />
}; </p>
<p>But I cannot find where the policy file is created or stored. If this was just a normal java application I would pass the security policy file in as a system property as follows: </p>
<p>java -Djava.security.policy=policy.file main-class </p>
<p>But I don&#8217;t know how to achieve the same effect in Grails. Please can someone tell me how to set the java security policy for my Grails app? </p>
<p>Thanks,<br />
Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on GORM nullables and unsaved transient instance by mamram</title>
		<link>http://haxx.sinequanon.net/2011/04/gorm-nullables-and-unsaved-transient-instance/comment-page-1/#comment-880</link>
		<dc:creator>mamram</dc:creator>
		<pubDate>Sat, 02 Jul 2011 16:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=291#comment-880</guid>
		<description>thanks, params.remove() was the trick...</description>
		<content:encoded><![CDATA[<p>thanks, params.remove() was the trick&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on less, sudo, and /dev/null: Permission denied by Jesper</title>
		<link>http://haxx.sinequanon.net/2009/03/less-sudo-and-devnull-permission-denied/comment-page-1/#comment-877</link>
		<dc:creator>Jesper</dc:creator>
		<pubDate>Wed, 01 Jun 2011 13:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=150#comment-877</guid>
		<description>Interesting, thanks for the analysis. I just stumbled on this problem myself. 

Scenario:
$ export LESSHISTFILE=/dev/null
$ sudo -s
# history&#124;less (or any other invocation of less I guess)
*poof* /dev/null is 700, thus unusable for non-root users.

I guess the sudo -s carried over the LESSHISTFILE variable to the privileged shell, and less got a bit too eager about permissions on what it believed to be its history file.</description>
		<content:encoded><![CDATA[<p>Interesting, thanks for the analysis. I just stumbled on this problem myself. </p>
<p>Scenario:<br />
$ export LESSHISTFILE=/dev/null<br />
$ sudo -s<br />
# history|less (or any other invocation of less I guess)<br />
*poof* /dev/null is 700, thus unusable for non-root users.</p>
<p>I guess the sudo -s carried over the LESSHISTFILE variable to the privileged shell, and less got a bit too eager about permissions on what it believed to be its history file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Tomcat AJP/1.3 Connector issues by Clustering Tomcat &#171; Teh Tech Blogz0r by Luke Meyer</title>
		<link>http://haxx.sinequanon.net/2009/03/tomcat-ajp13-connector-issues/comment-page-1/#comment-700</link>
		<dc:creator>Clustering Tomcat &#171; Teh Tech Blogz0r by Luke Meyer</dc:creator>
		<pubDate>Sat, 14 Aug 2010 03:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=178#comment-700</guid>
		<description>[...] really know why the APR isn&#8217;t working properly, but a little searching turned up some obscure facts: if the APR isn&#8217;t loaded, then for the AJP connector Tomcat makes a default choice of [...]</description>
		<content:encoded><![CDATA[<p>[...] really know why the APR isn&#8217;t working properly, but a little searching turned up some obscure facts: if the APR isn&#8217;t loaded, then for the AJP connector Tomcat makes a default choice of [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Grails 1.1 logging by jja</title>
		<link>http://haxx.sinequanon.net/2009/03/grails-11-logging/comment-page-1/#comment-697</link>
		<dc:creator>jja</dc:creator>
		<pubDate>Mon, 26 Apr 2010 20:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=166#comment-697</guid>
		<description>@Edwardo: catalina.base is originally set in the Tomcat startup script catalina.sh or catalina.bat via a -D argument to the java executable. Sorry for the delay in replying.</description>
		<content:encoded><![CDATA[<p>@Edwardo: catalina.base is originally set in the Tomcat startup script catalina.sh or catalina.bat via a -D argument to the java executable. Sorry for the delay in replying.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Grails 1.1 logging by Edwardo</title>
		<link>http://haxx.sinequanon.net/2009/03/grails-11-logging/comment-page-1/#comment-696</link>
		<dc:creator>Edwardo</dc:creator>
		<pubDate>Mon, 08 Feb 2010 20:10:02 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=166#comment-696</guid>
		<description>Is there a way to set the catalina.base automatically?  I get null when i do getProperty.  I know I can set it in a shell window with export.  Is there another alternative location to place the log files?</description>
		<content:encoded><![CDATA[<p>Is there a way to set the catalina.base automatically?  I get null when i do getProperty.  I know I can set it in a shell window with export.  Is there another alternative location to place the log files?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Grails 1.1 logging by Paul Alexandrow</title>
		<link>http://haxx.sinequanon.net/2009/03/grails-11-logging/comment-page-1/#comment-695</link>
		<dc:creator>Paul Alexandrow</dc:creator>
		<pubDate>Tue, 26 Jan 2010 09:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=166#comment-695</guid>
		<description>Thank you! This saved my day.</description>
		<content:encoded><![CDATA[<p>Thank you! This saved my day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Grails stacktrace.log by How to Setup a VPS to Run Grails on Jetty &#8211; Anders Zakrisson</title>
		<link>http://haxx.sinequanon.net/2008/09/grails-stacktracelog/comment-page-1/#comment-694</link>
		<dc:creator>How to Setup a VPS to Run Grails on Jetty &#8211; Anders Zakrisson</dc:creator>
		<pubDate>Tue, 05 Jan 2010 09:15:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sinequanon.net/?p=78#comment-694</guid>
		<description>[...] Jetty on Port 80 Virtual hosts in Jetty Fixing the stacktrace.log Using GNU Screen MySQL Console [...]</description>
		<content:encoded><![CDATA[<p>[...] Jetty on Port 80 Virtual hosts in Jetty Fixing the stacktrace.log Using GNU Screen MySQL Console [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Grails 1.1 logging by Conrad Bruchmann</title>
		<link>http://haxx.sinequanon.net/2009/03/grails-11-logging/comment-page-1/#comment-691</link>
		<dc:creator>Conrad Bruchmann</dc:creator>
		<pubDate>Tue, 10 Nov 2009 09:46:11 +0000</pubDate>
		<guid isPermaLink="false">http://haxx.sinequanon.net/?p=166#comment-691</guid>
		<description>Thank you very much. I had a lot of issues with log4j before. With your description everything runs fine!

Best regards,
Conrad</description>
		<content:encoded><![CDATA[<p>Thank you very much. I had a lot of issues with log4j before. With your description everything runs fine!</p>
<p>Best regards,<br />
Conrad</p>
]]></content:encoded>
	</item>
</channel>
</rss>

