<?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>Andrew's Blog &#187; Web Development</title>
	<atom:link href="http://www.abm.id.au/blog/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abm.id.au/blog</link>
	<description>Web Development with ColdFusion and Java</description>
	<lastBuildDate>Thu, 05 Jan 2012 13:00:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ColdFusion / JBoss Issue &#8211; &#8220;class file has wrong version 49.0, should be 48.0&#8243;</title>
		<link>http://www.abm.id.au/blog/2012/01/05/coldfusion-jboss-issue-class-file-has-wrong-version-49-0-should-be-48-0/</link>
		<comments>http://www.abm.id.au/blog/2012/01/05/coldfusion-jboss-issue-class-file-has-wrong-version-49-0-should-be-48-0/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 12:56:19 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://www.abm.id.au/blog/?p=128</guid>
		<description><![CDATA[While playing with a Remote Proxy example in ColdSpring 2 tonight in my previously mentioned CF9/JBoss setup I ran into the error below: &#34;Error&#34;,&#34;http-127.0.0.1-8080-2&#34;,&#34;01/05/12&#34;,&#34;22:39:39&#34;,&#34;coldspring-remote-example&#34;,&#34;coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS-316894903/coldfusion/xml/rpc/CFCInvocationException.java:10: cannot access java.rmi.RemoteException bad class file: /usr/java/jdk1.6.0_26/jre/lib/rt.jar(java/rmi/RemoteException.class) class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the [...]]]></description>
			<content:encoded><![CDATA[<p>While playing with a Remote Proxy example in <a href="http://www.coldspringframework.org/">ColdSpring 2</a> tonight in my previously mentioned CF9/JBoss setup I ran into the error below:</p>
<p><pre><code>&quot;Error&quot;,&quot;http-127.0.0.1-8080-2&quot;,&quot;01/05/12&quot;,&quot;22:39:39&quot;,&quot;coldspring-remote-example&quot;,&quot;coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS-316894903/coldfusion/xml/rpc/CFCInvocationException.java:10: cannot access java.rmi.RemoteException bad class file: /usr/java/jdk1.6.0_26/jre/lib/rt.jar(java/rmi/RemoteException.class) class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public class CFCInvocationException&nbsp;&nbsp;extends org.apache.axis.AxisFault&nbsp;&nbsp;implements java.io.Serializable {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ 1 error . The specific sequence of files included or processed is: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/examples/quickstart/remote/index.cfm, line: 20 &quot;
coldfusion.server.ServiceRuntimeException: coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS-316894903/coldfusion/xml/rpc/CFCInvocationException.java:10: cannot access java.rmi.RemoteException
bad class file: /usr/java/jdk1.6.0_26/jre/lib/rt.jar(java/rmi/RemoteException.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class CFCInvocationException&nbsp;&nbsp;extends org.apache.axis.AxisFault&nbsp;&nbsp;implements java.io.Serializable {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^
1 error
.
&nbsp;&nbsp;at coldfusion.xml.rpc.XmlRpcServiceImpl.registerWebService(XmlRpcServiceImpl.java:319)
&nbsp;&nbsp;at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebService(XmlRpcServiceImpl.java:496)
&nbsp;&nbsp;at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebServiceProxy(XmlRpcServiceImpl.java:450)
&nbsp;&nbsp;at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:449)
&nbsp;&nbsp;at cfindex2ecfm1931456168.runPage(/home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/examples/quickstart/remote/index.cfm:20)
&nbsp;&nbsp;at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
&nbsp;&nbsp;at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
&nbsp;&nbsp;at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
&nbsp;&nbsp;at cfApplication2ecfc135565788$funcONREQUEST.runFunction(/home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/examples/quickstart/remote/Application.cfc:22)
&nbsp;&nbsp;at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
&nbsp;&nbsp;at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
&nbsp;&nbsp;at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
&nbsp;&nbsp;at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
&nbsp;&nbsp;at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
&nbsp;&nbsp;at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
&nbsp;&nbsp;at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
&nbsp;&nbsp;at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88)
&nbsp;&nbsp;at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:280)
&nbsp;&nbsp;at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:356)
&nbsp;&nbsp;at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
&nbsp;&nbsp;at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
&nbsp;&nbsp;at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
&nbsp;&nbsp;at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
&nbsp;&nbsp;at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
&nbsp;&nbsp;at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
&nbsp;&nbsp;at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
&nbsp;&nbsp;at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
&nbsp;&nbsp;at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
&nbsp;&nbsp;at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
&nbsp;&nbsp;at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
&nbsp;&nbsp;at coldfusion.CfmServlet.service(CfmServlet.java:200)
&nbsp;&nbsp;at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
&nbsp;&nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
&nbsp;&nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&nbsp;&nbsp;at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
&nbsp;&nbsp;at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
&nbsp;&nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&nbsp;&nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&nbsp;&nbsp;at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
&nbsp;&nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&nbsp;&nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&nbsp;&nbsp;at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
&nbsp;&nbsp;at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
&nbsp;&nbsp;at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
&nbsp;&nbsp;at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
&nbsp;&nbsp;at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
&nbsp;&nbsp;at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
&nbsp;&nbsp;at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
&nbsp;&nbsp;at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&nbsp;&nbsp;at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
&nbsp;&nbsp;at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
&nbsp;&nbsp;at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
&nbsp;&nbsp;at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
&nbsp;&nbsp;at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
&nbsp;&nbsp;at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&nbsp;&nbsp;at java.lang.Thread.run(Thread.java:662)
Caused by: coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS-316894903/coldfusion/xml/rpc/CFCInvocationException.java:10: cannot access java.rmi.RemoteException
bad class file: /usr/java/jdk1.6.0_26/jre/lib/rt.jar(java/rmi/RemoteException.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class CFCInvocationException&nbsp;&nbsp;extends org.apache.axis.AxisFault&nbsp;&nbsp;implements java.io.Serializable {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^
1 error
.
&nbsp;&nbsp;at coldfusion.jsp.JavaCompiler.compileClass(JavaCompiler.java:152)
&nbsp;&nbsp;at coldfusion.xml.rpc.XmlRpcServiceImpl$2.run(XmlRpcServiceImpl.java:294)
&nbsp;&nbsp;at java.security.AccessController.doPrivileged(Native Method)
&nbsp;&nbsp;at coldfusion.xml.rpc.XmlRpcServiceImpl.registerWebService(XmlRpcServiceImpl.java:270)
&nbsp;&nbsp;... 55 more</code></pre></p>
<p>I had this example running fine in CF9 on JRun / Windows 7 previously so at first I thought this must be something specific to my JBoss install.</p>
<p>After a bit of searching, I found a <a href="http://forums.adobe.com/message/1097">post on the Adobe Forms</a> that helped me understand what was going on.</p>
<p>It seems there is a file &#8220;tools.jar&#8221; in ColdFusion&#8217;s WEB-INF/cfusion/lib dir which is incompatible with the JDK I was running (Oracle JDK 1.6.0_26).  I replaced this file with the tools.jar from &lt;JAVA_HOME&gt;/lib and restarted my server and the problem went away.</p>
<p>I&#8217;m not exactly sure why this file was incorrect in my JBoss install &#8211; (the file was 4.9M in size as opposed to 13M in the new version), but I thought I&#8217;d share this workaround in case it helps anyone else, or I need to refer to it later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abm.id.au/blog/2012/01/05/coldfusion-jboss-issue-class-file-has-wrong-version-49-0-should-be-48-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe ColdFusion 9 on JBoss</title>
		<link>http://www.abm.id.au/blog/2012/01/05/adobe-coldfusion-9-on-jboss/</link>
		<comments>http://www.abm.id.au/blog/2012/01/05/adobe-coldfusion-9-on-jboss/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 12:43:11 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://www.abm.id.au/blog/?p=126</guid>
		<description><![CDATA[A long time between blog posts but I thought this was worthy of a quick one. I&#8217;m using Fedora 16 as my workstation at the moment, and because of some difficulties I encountered when running Adobe ColdFusion 9 on JRun, I decided to give JBoss a try. I downloaded JBoss and CF9 and followed the [...]]]></description>
			<content:encoded><![CDATA[<p>A long time between blog posts but I thought this was worthy of a quick one.</p>
<p>I&#8217;m using Fedora 16 as my workstation at the moment, and because of some difficulties I encountered when running Adobe ColdFusion 9 on JRun, I decided to give JBoss a try.</p>
<p>I downloaded JBoss and CF9 and followed the instructions for <a href="http://help.adobe.com/en_US/ColdFusion/9.0/Installing/WSc3ff6d0ea77859461172e0811cdec18c28-7fbd.html" title="Deploying ColdFusion 9 on JBoss Application Server">Deploying ColdFusion 9 on JBoss Application Server</a> and fairly quickly had a working system.</p>
<p>Then I wanted to patch it with the awesome <a href="http://uu2.riaforge.org/">Unofficial Updater 2</a> but realised first I needed to install ColdFusion 9 Updater 1 to get to 9.0.1.</p>
<p>After downloading the updater, I attempted to run it against my exploded war, deployed at &lt;JBOSS_HOME&gt;/server/cfusion/deploy/cfusion.ear/cfusion.war however the updater failed to complete, giving the message &#8220;Selected EAR/WAR archive is invalid&#8221;.</p>
<p>The work around this, I logged into the ColdFusion Administrator, and under the Packaging &#038; Deployment -&gt; J2EE Archives was able to export my current project as a war file, which I could then patch with Updater 1, and redeploy.  After that, the Unofficial Updater ran fine, brining me up to the current Hotfix.</p>
<p>I thought I&#8217;d share this in case it helps someone down the track, or I need to refer back to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abm.id.au/blog/2012/01/05/adobe-coldfusion-9-on-jboss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iBatis and ColdFusion</title>
		<link>http://www.abm.id.au/blog/2009/12/14/ibatis-and-coldfusion/</link>
		<comments>http://www.abm.id.au/blog/2009/12/14/ibatis-and-coldfusion/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 03:05:58 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.abm.id.au/blog/?p=75</guid>
		<description><![CDATA[One of my colleagues has been writing Java web apps using Spring, Struts and the iBatis Data Mapper. A lot of his code would be very useful to use in my ColdFusion apps, so I wanted to find out if there was a way to integrate ColdFusion and iBatis. Back in July 2006, Charlie Arehart [...]]]></description>
			<content:encoded><![CDATA[<p>One of my colleagues has been writing Java web apps using Spring, Struts and the <a href="http://ibatis.apache.org/">iBatis Data Mapper</a>.</p>
<p>A lot of his code would be very useful to use in my ColdFusion apps, so I wanted to find out if there was a way to integrate ColdFusion and iBatis.</p>
<p>Back in July 2006, <a href="http://www.carehart.org/blog/client/index.cfm/2006/7/1/ibatis_for_cfml">Charlie Arehart blogged about this possibility</a> however as far as I am aware no-one provided a working solution.</p>
<p>However with the help of <a href="http://www.compoundtheory.com/?action=javaloader.index">Mark Mandel&#8217;s Javaloader</a>, and a <a href="http://stannard.net.au/blog/index.cfm/2009/11/3/Hello-World-with-ColdFusion-and-Spring">blog post on integrating ColdFusion and Spring from Kevan Stannard</a> I have been able to put together a demo of iBatis and ColdFusion working together.</p>
<p>My sample app code can be downloaded from <a href="http://www.abm.id.au/downloads/cfibatisdemo.zip">http://www.abm.id.au/downloads/cfibatisdemo.zip</a></p>
<p>To get this to work you need to download a few dependencies:</p>
<ul>
<li><a href="http://www.compoundtheory.com/?action=javaloader.index">Javaloader</a> (version 1.0 beta)</li>
<li><a href="http://ibatis.apache.org/">iBatis</a> (version 2.3.4.726)</li>
<li><a href="http://commons.apache.org/logging/">Commons Logging</a> (version 1.1.1)</li>
<li><a href="http://www.springsource.org/">Spring Framework</a> (version 2.5.6.SEC01)</li>
<li><a href="http://ant.apache.org/">Apache Ant</a> (version 1.7.1)</li>
</ul>
<p>Once you&#8217;ve downloaded these extract them to an appropriate place in your file system (I put them all at c:javadev).  Then update the build.xml in my sample app to reference where you put these libraries.  You should also ensure ant is on your path.</p>
<p>You will also need to set up a sample database and connection to run this demo.  A mysql script is included in the db/ directory of the sample code.</p>
<p>Setting up the database connection is a bit more complicated.  My solution was to set up a datasource using JNDI.  I have ColdFusion 8 installed in a multiserver config so this had to be set up in the JRun Management Console.</p>
<p>The following screenshot shows the settings I used to create this datasource.  Note that I had to change the MySQL Driver Class Name from the default to get it to work with MySQL 5.x.  Also note that you will need to update web/beans.xml to use the correct name you give this datasource.</p>
<p><a href="http://www.abm.id.au/blog/wp-content/uploads/2009/12/JNDI-datasource2.jpg"><img class="alignnone size-thumbnail wp-image-83" title="JNDI Datasource settings" src="http://www.abm.id.au/blog/wp-content/uploads/2009/12/JNDI-datasource2-150x150.jpg" alt="JNDI Datasource settings" width="150" height="150" /></a></p>
<p>If you are using another server, you will need to check your app server documentation to find out how to set up a JNDI datasource in your environment.</p>
<p>A couple of gotcha&#8217;s I found with the JNDI datasource are that if the database is not running when you start the server, it doesn&#8217;t seen to initialise the datasource correctly.  Similarly if the database is stopped and restarted, I found you need to restart the JRun server to get things working again.  Obviously this would be a problem in a production environment, and needs further investigation.</p>
<p>Finally to get things up and running you need to install Javaloader into your ColdFusion root directory or create an appropriate mapping.</p>
<p>Then build the sample app by issuing the command following command in the directory where you extracted the sample code:</p>
<p>ant dist</p>
<p>You can then copy the contents of the /dist dir from the sample app over to your ColdFusion server, and run the sample.</p>
<p>Please feel free to leave comments on this post if you have any problems or suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abm.id.au/blog/2009/12/14/ibatis-and-coldfusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Railo on JBoss (Multi-site configuration)</title>
		<link>http://www.abm.id.au/blog/2009/09/10/railo-on-jboss-multi-site-configuration/</link>
		<comments>http://www.abm.id.au/blog/2009/09/10/railo-on-jboss-multi-site-configuration/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 03:16:52 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[railo]]></category>

		<guid isPermaLink="false">http://www.abm.id.au/blog/?p=69</guid>
		<description><![CDATA[Earlier this year Sean Corfield blogged about a &#8220;multi-web&#8221; install of Railo on Tomcat. I decided to see if I could set up a similar configuration on JBoss 5.1.0 and was able to do it successfully by following Sean&#8217;s steps with a few modifications. These modifications are documented below. My solution also includes some ideas [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this year <a href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/Railo_on_Tomcat__multiweb">Sean Corfield</a> blogged about a &#8220;multi-web&#8221; install of Railo on Tomcat.</p>
<p>I decided to see if I could set up a similar configuration on JBoss 5.1.0 and was able to do it successfully by following Sean&#8217;s steps with a few modifications.  These modifications are documented below.</p>
<p>My solution also includes some ideas I learnt from this blog post &#8211; <a href="http://help.shadocms.com/blog/2009/running-railo-and-adobe-coldfusion-on-the-same-context-root-in-jboss.cfm">http://help.shadocms.com/blog/2009/running-railo-and-adobe-coldfusion-on-the-same-context-root-in-jboss.cfm</a></p>
<p>Firstly, I took a copy of the jboss &#8220;web&#8221; instance and named it railo, ie:</p>
<p>copy <strong><JBOSS_HOME>/server/web</strong> to <strong><JBOSS_HOME>/server/railo</strong></p>
<p>This will become our railo server instance.</p>
<p><strong>NB:</strong> <JBOSS_HOME> is the directory where I installed JBoss &#8211; in my case c:/jboss/jboss-5.1.0.GA</p>
<p>Now I started following Sean&#8217;s instructions.  The first issue I ran into was when I came to edit the conf/catalina.properties file.  I could not find the JBoss equivalent (there may be one, but I just couldn&#8217;t find it).  However I found that by putting the Railo JARs into <strong><JBOSS_HOME>/server/railo/lib</strong> this had the same effect.</p>
<p>Next Sean mentioned editing the Tomcat conf/web.xml file.  The corresponding JBoss file to edit is:</p>
<p><strong><JBOSS_HOME>/server/railo/deployers/jbossweb.deployer/web.xml</strong></p>
<p>At this point we we can start the server and have a look at the server administrator.  To do this (on windows at least) go into the command prompt, cd to <JBOSS_HOME> and run this command:</p>
<p>bin\run -c railo</p>
<p>Once it starts up, you can then browse to http://localhost:8080/railo-context/admin.cfm to view the Railo Server Administrator.</p>
<p>After confirming it runs, stop it again (I just use CTRL-C to stop the JBoss instances &#8211; there may be a cleaner way but I am not aware of it).</p>
<p>The next thing in JBoss that differs from the Tomcat instructions is adding your new host definitions.  In Tomcat this is done in conf/server.xml, but in JBoss 5.1.0 it is done in <strong><JBOSS_HOME>/server/railo/conf/bootstrap/profile.xml</strong>.</p>
<p>The change I made to this file is shown below:<br />
<pre><pre>&lt;!--
 The profile configuration
 This contains required properties:
 The uri to jboss-service.xml.
 The uri to the deployers folder.
 A list of uris to deploy folders. --&gt;
 &lt;bean name=&quot;BootstrapProfileFactory&quot;&gt;
 &lt;property name=&quot;bindingsURI&quot;&gt;${jboss.server.home.url}conf/bindingservice.beans&lt;/property&gt;
 &lt;property name=&quot;bootstrapURI&quot;&gt;${jboss.server.home.url}conf/jboss-service.xml&lt;/property&gt;
 &lt;property name=&quot;deployersURI&quot;&gt;${jboss.server.home.url}deployers&lt;/property&gt;
 &lt;property name=&quot;applicationURIs&quot;&gt;
 &lt;list elementClass=&quot;java.net.URI&quot;&gt;
 &lt;value&gt;${jboss.server.home.url}deploy&lt;/value&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt; &lt;value&gt;file:///C:/www/railo-deploy&lt;/value&gt;&lt;/span&gt;
 &lt;/list&gt;
 &lt;/property&gt;
 &lt;property name=&quot;attachmentStoreRoot&quot;&gt;${jboss.server.data.dir}/attachments&lt;/property&gt;
 &lt;property name=&quot;profileFactory&quot;&gt;&lt;inject bean=&quot;ProfileFactory&quot; /&gt;&lt;/property&gt;
 &lt;/bean&gt;</pre></pre><br />
Note that this is a URI, so it must include file:/// (this caught me out on my first attempt).  How I did this was to create a directory called c:/www/railo-deploy, then in that directory create new directories called web1.war and web2.war</p>
<p>Next (borrowing from the ShadoCMS blog) <strong><JBOSS_HOME>/server/railo/deploy/jbossweb.sar/server.xml</strong> to have two more <Host> nodes:<br />
<pre><pre> &lt;Host name=&quot;web1.local&quot;&gt;
 &lt;Alias&gt;web1.local&lt;/Alias&gt;
 &lt;/Host&gt;

 &lt;Host name=&quot;web2.local&quot;&gt;
 &lt;Alias&gt;web2.local&lt;/Alias&gt;
 &lt;/Host&gt;</pre></pre><br />
The final piece of the puzzle was then to create a web.xml and  jboss-web.xml in each of the WEB-INF dirs, ie:</p>
<p><strong>c:/www/railo-deploy/web1.war/WEB-INF/web.xml:</strong><br />
<pre><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;

&lt;!DOCTYPE web-app
 PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot;
 &quot;http://java.sun.com/dtd/web-app_2_3.dtd&quot;&gt;

&lt;web-app&gt;
 &lt;display-name&gt;Web App 1&lt;/display-name&gt;
 &lt;description&gt;
 Railo Web 1
 &lt;/description&gt;
&lt;/web-app&gt;</pre></pre><br />
<strong>c:/www/railo-deploy/web1.war/WEB-INF/jboss-web.xml</strong><br />
<pre><pre>&lt;jboss-web&gt;
&lt;context-root&gt;/&lt;/context-root&gt;
&lt;virtual-host&gt;web1.local&lt;/virtual-host&gt;
&lt;/jboss-web&gt;</pre></pre><br />
<strong>c:/www/railo-deploy/web2.war/WEB-INF/web.xml</strong><br />
<pre><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;

&lt;!DOCTYPE web-app
 PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot;
 &quot;http://java.sun.com/dtd/web-app_2_3.dtd&quot;&gt;

&lt;web-app&gt;
 &lt;display-name&gt;Web App 2&lt;/display-name&gt;
 &lt;description&gt;
 Railo Web 2
 &lt;/description&gt;
&lt;/web-app&gt;</pre></pre><br />
<strong>c:/www/railo-deploy/web2.war/WEB-INF/jboss-web.xml</strong><br />
<pre><pre>&lt;jboss-web&gt;
&lt;context-root&gt;/&lt;/context-root&gt;
&lt;virtual-host&gt;web2.local&lt;/virtual-host&gt;
&lt;/jboss-web&gt;</pre></pre><br />
All going well you should now have a working multi-web setup in JBoss.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"><img style="border-width: 0;" src="http://i.creativecommons.org/l/by-sa/2.5/au/88x31.png" alt="Creative Commons License" /></a><br />
This <span>work</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/">Creative Commons Attribution-Share Alike 2.5 Australia License</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abm.id.au/blog/2009/09/10/railo-on-jboss-multi-site-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Railo 3 on JBoss 5</title>
		<link>http://www.abm.id.au/blog/2009/09/07/railo-3-on-jboss-5/</link>
		<comments>http://www.abm.id.au/blog/2009/09/07/railo-3-on-jboss-5/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 10:29:23 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[railo]]></category>

		<guid isPermaLink="false">http://www.abm.id.au/blog/?p=67</guid>
		<description><![CDATA[Railo 3 will not run on JBoss 5 without some modifications, as some of the packaged jars conflict with the jars in Jboss&#8217;s classpath.  The error reported is similar to that below: 2009-09-07 20:20:09,354 ERROR [org.jboss.web.tomcat.service.deployers.JBossContextConfig] (main) XML error parsing: context.xml org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100) at org.jboss.web.tomcat.service.deployers.JBossContextConfig.processContextConfig(JBossContextConfig.java:549) at org.jboss.web.tomcat.service.deployers.JBossContextConfig.init(JBossContextConfig.java:536) [...]]]></description>
			<content:encoded><![CDATA[<p>Railo 3 will not run on JBoss 5 without some modifications, as some of the packaged jars conflict with the jars in Jboss&#8217;s classpath.  The error reported is similar to that below:</p>
<p><pre><code>
2009-09-07 20:20:09,354 ERROR [org.jboss.web.tomcat.service.deployers.JBossContextConfig] (main) XML error parsing: context.xml
org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
at org.jboss.web.tomcat.service.deployers.JBossContextConfig.processContextConfig(JBossContextConfig.java:549)
at org.jboss.web.tomcat.service.deployers.JBossContextConfig.init(JBossContextConfig.java:536)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5436)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
</code></pre></p>
<p>One solution (which seems to work perfectly) is to remove the offending jars from &lt;railo_home&gt;/WEB-INF/lib, as described here:</p>
<p><a href="http://coldshen.com/blog/index.cfm/2008/8/2/Running-Railo-3-beta-on-JBoss-5">http://coldshen.com/blog/index.cfm/2008/8/2/Running-Railo-3-beta-on-JBoss-5</a></p>
<p>An alternative solution, is to create a file named jboss-classloading.xml and place this into &lt;railo_home&gt;/WEB-INF.  The contents of the file should be similar to that shown below:</p>
<p><pre><code>&amp;lt;classloading xmlns=&quot;urn:jboss:classloading:1.0&quot;
name=&quot;railo.war&quot;
domain=&quot;railo_Domain&quot;
export-all=&quot;NON_EMPTY&quot;
import-all=&quot;false&quot;&amp;gt;
&amp;lt;/classloading&amp;gt;</code></pre></p>
<p>More details are available from the JBoss wiki -  <a href="http://www.jboss.org/community/wiki/useJBossWebClassLoaderinJBoss5">http://www.jboss.org/community/wiki/useJBossWebClassLoaderinJBoss5</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.abm.id.au/blog/2009/09/07/railo-3-on-jboss-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

