<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ralf Schäftlein&#039;s Blog &#187; aspectj</title>
	<atom:link href="http://ralf.schaeftlein.de/tag/aspectj/feed/" rel="self" type="application/rss+xml" />
	<link>http://ralf.schaeftlein.de</link>
	<description>tech stuff, talk,...</description>
	<lastBuildDate>Tue, 03 Jan 2012 18:30:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tomcat 6 Problems on Ubuntu 9.10</title>
		<link>http://ralf.schaeftlein.de/2010/03/10/tomcat-6-problems-on-ubuntu-9-10/</link>
		<comments>http://ralf.schaeftlein.de/2010/03/10/tomcat-6-problems-on-ubuntu-9-10/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 15:13:03 +0000</pubDate>
		<dc:creator>ralf</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[aspectj]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=199</guid>
		<description><![CDATA[The default behavior of the tomcat6 server installed from the ubuntu repository is to forbid any read operation of System.getProperty(). I used tomcat6 as deployment target for the hudson builds on the same machine. AspectJ is used in a sample Spring 3 REST application. Tomcat6 logs (catalina-&#8230;log) shows the following exception Caused by: java.security.AccessControlException: access [...]]]></description>
			<content:encoded><![CDATA[<p>The default behavior of the tomcat6 server installed from the ubuntu repository is to forbid any read operation of System.getProperty(). I used tomcat6 as deployment target for the hudson builds on the same machine. AspectJ is used in a sample <a href="http://ralf.schaeftlein.de/2010/03/05/junit-tests-for-spring-3-rest-services/">Spring 3 REST application</a>. Tomcat6 logs (catalina-&#8230;log) shows the following exception</p>
<pre name="code" code='java'>
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.aspectj.tracing.debug read)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        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:686)
        at org.aspectj.weaver.tools.TraceFactory.getBoolean(TraceFactory.java:34)
        at org.aspectj.weaver.tools.TraceFactory.<clinit>(TraceFactory.java:21)
        ... 68 more
</pre>
<p>Updating aspectj in the maven pom to the latest version <a href="http://www.eclipse.org/aspectj/downloads.php">1.6.8</a> doesn&#8217;t solve<br />
the problem. The same war file works under windows with tomcat <a href="http://tomcat.apache.org/download-60.cgi">6.0.24</a> without any problems. An Forum entry shows the right <a href="http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=2340">hint</a>. Inside the init script<br />
/etc/init.d/tomcat6 is default TOMCAT_SECURITY set to true, which forces the /etc/tomcat6/policy.d/* policies to be used in every web<br />
application inside tomcat. </p>
<pre name="code" code='py'>
# Use the Java security manager? (yes/no)
TOMCAT6_SECURITY=yes
</pre>
<p>So the solution can be quick (set the TOMCAT_SECURITY property inside the init script to no) or a bit more complicated (set a new policy for your web application as new file inside the policy.d folder). The problem with the more complicated one is that you need to know every  security relevant operation to write the policy file). </p>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2010/03/10/tomcat-6-problems-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

