<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>James Allen&apos;s Coldfusion and Internet Technology Blog - MangoBlog</title>
			<link>http://jamesallen.name/index.cfm</link>
			<description>Adventures in Coldfusion and Internet development.</description>
			<language>en-us</language>
			<pubDate>Wed, 08 Sep 2010 17:46:30 +0100</pubDate>
			<lastBuildDate>Mon, 27 Apr 2009 11:58:00 +0100</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>slingshotuk@googlemail.com</managingEditor>
			<webMaster>slingshotuk@googlemail.com</webMaster>
			
			
			
			
			
			<item>
				<title>Fixing &quot;java method security exception&quot; when installing Mango Blog</title>
				<link>http://jamesallen.name/index.cfm/2009/4/27/Fixing-java-method-security-exception-when-installing-Mango-Blog</link>
				<description>
				
				&lt;p&gt;I&apos;ve just setup a new blog which I&apos;m going to use for tracking my weight loss and fitness goals this year. As part of the planning for the project I had to decide what blog software to use. I was all set to go with BlogCFC (as I use for this blog) but then Mango Blog came onto my radar. The brilliant API system and easy to use skinning facilities swung me so I decided to build the new blog using Mango.&lt;/p&gt;
&lt;p&gt;However, when I uploaded the code to my CF7 hosting and accessed the web root I got this error:&lt;/p&gt;
&lt;p&gt;{code}java method security exception. A security exception occurred while
invoking java method on a &quot;java.lang.Class&quot; object. MethodName is
getMethods. Possible cause: createobject function and cfobject tag are
disabled in the security sand box.{/code}&lt;/p&gt;
&lt;p&gt;After searching the MangoBlog forums I found other people had experienced this problem. However, the author of MangoBlog could only suggest that maybe the ISP has disabled the CreateObject function.&lt;/p&gt;
&lt;p&gt;To check this, I did some tests but found that CreateObject was working perfectly.&lt;/p&gt;
&lt;p&gt;Very weird. However, I have found the solution - though one which makes 0 sense to me.&lt;/p&gt;
&lt;p&gt;If you get this, to fix open up application.cfc.&lt;/p&gt;
&lt;p&gt;Now, &lt;span style=&quot;font-weight: bold;&quot;&gt;comment out&lt;/span&gt; the entire &lt;span style=&quot;font-weight: bold;&quot;&gt;onError&lt;/span&gt; function:&lt;/p&gt;
&lt;p&gt;{code}&amp;lt;cffunction name=&quot;onError&quot; returnType=&quot;void&quot;&gt;&lt;br /&gt;&amp;lt;cfargument name=&quot;Exception&quot; required=&quot;true&quot; /&gt;&lt;br /&gt;&amp;lt;cfargument name=&quot;EventName&quot; type=&quot;String&quot; required=&quot;true&quot; /&gt;&lt;br /&gt;&amp;lt;cfset request.message = createObject(&quot;component&quot;,variables.componentsPath &amp;amp; &quot;Message&quot;) /&gt;&lt;br /&gt;&amp;lt;cfset request.message.setTitle(&quot;Error: &quot; &amp;amp; arguments.EventName) /&gt;&lt;br /&gt;&amp;lt;cfset request.message.setText(arguments.exception.message) /&gt;&lt;br /&gt;&amp;lt;cfset request.message.setStatus(&quot;error&quot;) /&gt;&lt;br /&gt;&amp;lt;cfset request.message.setData(arguments.exception.detail) /&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;!--- Set appropriate HTTP status code ---&gt;&lt;br /&gt;&amp;lt;cfif REFindNoCase(&quot;NotFound$&quot;,arguments.exception.type)&gt;&lt;br /&gt;&amp;lt;cfheader statuscode=&quot;404&quot; statustext=&quot;Not Found&quot; /&gt;&lt;br /&gt;&amp;lt;cfelse&gt;&lt;br /&gt;&amp;lt;cfheader statuscode=&quot;500&quot; statustext=&quot;Internal Server Error&quot; /&gt;&lt;br /&gt;&amp;lt;/cfif&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;cftry&gt;&lt;br /&gt;&amp;lt;cfsetting enablecfoutputonly=&quot;false&quot;&gt;&lt;br /&gt;&amp;lt;cfinclude template=&quot;generic.cfm&quot;&gt;&lt;br /&gt;&amp;lt;cfcatch type=&quot;any&quot;&gt;&lt;br /&gt;&amp;lt;cfsetting enablecfoutputonly=&quot;false&quot;&gt;&lt;br /&gt;&amp;lt;cfinclude template=&quot;error.cfm&quot;&gt;&lt;br /&gt;&amp;lt;/cfcatch&gt;&lt;br /&gt;&amp;lt;/cftry&gt;&lt;br /&gt;&amp;lt;/cffunction&gt;{/code}&lt;/p&gt;
&lt;p&gt;Now access the webroot again.. The install wizard should appear as expected. At this point you can uncomment the onError handler and reupload. Everything should work fine then.&lt;/p&gt;
&lt;p&gt;What the hell is going on here then? It could be just me who this works for but I&apos;d be interested to hear from anyone else who has success with this fix. I am using Coldfusion MX 7.&lt;/p&gt;
&lt;p&gt;My local development server running CF8 has no issues.&lt;/p&gt;
				
				</description>
						
				
				<category>MangoBlog</category>				
				
				<pubDate>Mon, 27 Apr 2009 11:58:00 +0100</pubDate>
				<guid>http://jamesallen.name/index.cfm/2009/4/27/Fixing-java-method-security-exception-when-installing-Mango-Blog</guid>
				
			</item>
			
		 	
			</channel></rss>