<?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; Java</title>
	<atom:link href="http://www.abm.id.au/blog/category/java/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>Managing CF Dependencies with Maven</title>
		<link>http://www.abm.id.au/blog/2010/10/26/managing-cf-dependencies-with-maven/</link>
		<comments>http://www.abm.id.au/blog/2010/10/26/managing-cf-dependencies-with-maven/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 01:11:47 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.abm.id.au/blog/?p=97</guid>
		<description><![CDATA[I&#8217;m currently working on integrating some Java components with a ColdFusion app.  As I investigated trying to integrate them it quickly became obvious that I needed some way of managing the various dependencies the Java components required. As handling Java dependencies is a problem that has already been taken care of by Maven, I began [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on integrating some Java components with a ColdFusion app.  As I investigated trying to integrate them it quickly became obvious that I needed some way of managing the various dependencies the Java components required.</p>
<p>As handling Java dependencies is a problem that has already been taken care of by <a href="http://maven.apache.org/index.html">Maven</a>, I began to look at how I could use maven with my CF project to package up my custom CF code, third party CF libraries (eg. <a href="http://fw1.riaforge.org/">Fw/1</a>), and the various Java dependencies.</p>
<p>There has been an option to deploy ColdFusion as a war file since CF7, and that looked like a good place to start.  However to further complicate things I found that I needed to modify the web.xml to add in various servlet filters and listeners.</p>
<p>After searching the web I found a couple of articles from various people who had successfully integrated ColdFusion and Maven:</p>
<p><a href="http://stackoverflow.com/questions/1326154/using-maven-for-coldfusion-project">http://stackoverflow.com/questions/1326154/using-maven-for-coldfusion-project</a></p>
<p><a href="http://maximporges.blogspot.com/2007/09/build-tools-maven-and-coldfusion.html">http://maximporges.blogspot.com/2007/09/build-tools-maven-and-coldfusion.html</a></p>
<p>These were excellent resources, but didn&#8217;t answer all my questions.  The second article listed above hinted at building a war deployment, but there was no example on how to do this.</p>
<p>Eventually I stumbled upon Maven Overlays which the Maven site describes as follows:</p>
<blockquote><p><em>&#8220;Overlays are used to share common resources across multiple web  applications. The dependencies of a WAR project are collected in <tt>WEB-INF/lib</tt>, except for WAR artifacts which are overlayed on the WAR project itself.&#8221;</em></p></blockquote>
<p>This sounded like exactly what I was after.  In this case, Adobe CF is the common resource which needs to be &#8220;overlayed&#8221; on my Custom CF code.</p>
<p>So how could I get this to work?</p>
<p>The first thing I needed to do was to package CF as a WAR.  I did this via the &#8220;J2EE Configuration / WAR File&#8221; option in ColdFusion installer (I was using Windows, but I assume this option is available on all platforms).</p>
<p><a href="http://www.abm.id.au/blog/wp-content/uploads/2010/10/cf-install-war.jpg"><img class="alignnone size-medium wp-image-99" title="cf-install-war" src="http://www.abm.id.au/blog/wp-content/uploads/2010/10/cf-install-war-300x213.jpg" alt="Using the CF installer to create a WAR file" width="300" height="213" /></a></p>
<p>I then needed to get this WAR file into Maven.  We use Artifactory, so I deployed it there.  However if you don&#8217;t use Artifactory you can install it into your local repository using the following command:</p>
<p><pre><code>mvn install:install-file -DgroupId=com.adobe.coldfusion -DartifactId=coldfusion -Dpackaging=war -Dversion=9.0.1 -Dfile=c:/coldfusion/cfusion.war -DgeneratePom=true
</code></pre></p>
<p>Now that ColdFusion is installed, we can use it as a maven artifact.</p>
<p>Next we create a new maven web project:</p>
<p><code>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp</code></p>
<p>This will create a directory called &#8220;my-webapp&#8221; with the empty layout.  To add coldfusion to this project, edit the pom.xml file and add coldfusion as a dependency.  Your pom.xml should now look like this:</p>
<p>&nbsp;<br />
xsi:schemaLocation=&#8221;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&#8221;&gt;<br />
4.0.0<br />
com.mycompany.app<br />
my-webapp&nbsp;</p>
<p>war   1.0-SNAPSHOT<br />
my-webapp Maven Webapp</p>
<p>http://maven.apache.org</p>
<p>junit<br />
junit<br />
3.8.1<br />
test<br />
&nbsp;<br />
com.adobe.coldfusion<br />
coldfusion<br />
9.0.1<br />
war<br />
runtime</p>
<p>false&nbsp;</p>
<p>my-webapp</p>
<p>Now you can build your project with the <code>mvn package</code> command.  This will create a war file which can be then deployed to tomcat.</p>
<p>The nice thing about the overlay method is that if you specify resources in your project, they won&#8217;t be replaced by those in the dependency.  So I use this to ensure my datasources and other coldfusion settings remain customised.  To do this, navigate in your project to src/main/webapp/WEB-INF and create a cfusion directory, and a lib directory inside that.  Copy into this directory the neo*.xml and *.properties files from a configured CF install which contain your custom modifications.</p>
<p>So my project now looks like this:</p>
<p><pre><code>
.
|-- pom.xml
|-- src
|&nbsp;&nbsp; |-- main
|&nbsp;&nbsp; |&nbsp;&nbsp; |-- java
|&nbsp;&nbsp; |&nbsp;&nbsp; |-- resources
|&nbsp;&nbsp; |&nbsp;&nbsp; `-- webapp
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- META-INF
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- WEB-INF
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |-- cfusion
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp; `-- lib
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- adminconfig.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- license.properties
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-archivedeploy.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-clientstore.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-comobjmap.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-cron.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-datasource.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-debug.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-document.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-document_1.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-dotnet.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-drivers.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-event.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-graphing.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-logging.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-mail.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-metric.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-monitoring.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-probe.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-registry.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-runtime.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-runtime_1.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-search.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-security.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-solr.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-watch.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- neo-xmlrpc.xml
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `-- password.properties
|&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; |-- lib
</code></pre></p>
<p>Any custom cf files you create can go in the webapp dir.  Try putting an index.cfm file in there, do another mvn package and redeploy.  It should work.</p>
<p>Packaging and re-packaging is a nuisance obviously.  I got around this by mapping the &#8220;target&#8221; dir in tomcat, and then I can just use the mvn war:exploded command when I&#8217;ve made any changes, and they should immediately show up in Tomcat.  If anyone is interested in more info leave a comment and I&#8217;ll post some further infomat.</p>
<p>So that&#8217;s a fair bit of hard work.  You might be starting to wonder what the point of it all is?  Well now I will show you two cool things that will hopefully convince you that this is worth the effort.</p>
<p>Want to change CF engines in your project?  No problem.  Download railo as a war file from <a href="http://www.getrailo.org/">http://www.getrailo.org/</a>.  Add it to your maven repository:</p>
<p><pre><code>mvn install:install-file -DgroupId=org.railo -DartifactId=railo -Dpackaging=war -Dversion=3.1.2.001 -Dfile=c:/Downloads/railo-3.1.2.001.war -DgeneratePom=true
</code></pre></p>
<p>Edit your pom.xml and replace the adobe coldfusion dependency with the railo one:</p>
<p><pre><code>

org.railo
railo
3.1.2.001
war
runtime</code></pre></p>
<p>false</p>
<p>&nbsp;</p>
<p>Clean and repackage:</p>
<p><pre><code>
mvn clean
mvn package
</code></pre></p>
<p>You now have a war file containing railo and your custom code.  (in case you&#8217;re wondering Railo&#8217;s datasources and other customisations are kept in WEB-INF/railo/railo-web.xml.cfm).</p>
<p>Finally, you can use maven to manage dependencies like <a href="http://fw1.riaforge.org">Framework One</a>.  To do this, you need to package fw1 as a maven artifact.  <a href="http://www.abm.id.au/downloads/fw1.zip">Here&#8217;s one I prepared earlier</a>. Unzip it, cd into the fw1 directory and use the following commands to install it to your repository:</p>
<p><pre><code>
mvn package
mvn install:install-file -DgroupId=org.corfield -DartifactId=fw1 -Dpackaging=jar -Dversion=1.2RC2A -Dfile=fw1-1.2RC2A.jar -DgeneratePom=true
</code></pre></p>
<p>How we can add FW/1 to our project by modifying the pom.xml again.  Here&#8217;s the new pom.xml</p>
<p>&nbsp;<br />
xsi:schemaLocation=&#8221;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&#8221;&gt;<br />
4.0.0<br />
com.mycompany.app<br />
my-webapp&nbsp;</p>
<p>war   1.0-SNAPSHOT<br />
my-webapp Maven Webapp</p>
<p>http://maven.apache.org</p>
<p>junit<br />
junit<br />
3.8.1<br />
test<br />
&nbsp;<br />
org.railo<br />
railo<br />
3.1.2.001<br />
war<br />
runtime</p>
<p>false&nbsp;<br />
org.corfield<br />
fw1<br />
1.2RC2A<br />
provided</p>
<p>&nbsp;<br />
${project.artifactId}</p>
<p>org.apache.maven.plugins<br />
maven-dependency-plugin</p>
<p>unpack&nbsp;</p>
<p>package<br />
unpack</p>
<p>org.corfield<br />
fw1<br />
1.2RC2A<br />
jar<br />
true<br />
${project.build.directory}/${project.artifactId}<br />
**/*.cfc</p>
<p>**/*.cfc<br />
${project.build.directory}/${project.artifactId}<br />
false</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Notice the use of the build plugins here.  What that stuff does is to expand the contents of the fw1 jar file &#8211; coldfusion won&#8217;t read them from the packaged jar file.  I also have ensured the jar&#8217;ed file does not get copied into WEB-INF/lib by using the &#8220;provided&#8221; scope in the pom.xml</p>
<p>Now we can repackage as usual:</p>
<p><pre><code>
mvn clean
mvn package
</code></pre></p>
<p>Now we have a war that includes railo and fw/1 which we can now develop with.</p>
<p>One advantage this gives is that if we want to upgrade FW/1, we can install the new version into maven, change our pom.xml to reference the new version and repackage.</p>
<p>I am sure this solution is not for everyone, but if you happen to be using maven anyway for Java you may find this useful.  Please feel free to leave any comments, questions below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abm.id.au/blog/2010/10/26/managing-cf-dependencies-with-maven/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 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>

