<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Dan Walmsley &#187; jackrabbit</title>
	<atom:link href="http://www.danwalmsley.com/tag/jackrabbit/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danwalmsley.com</link>
	<description>Putting the nerd in comnerdedy</description>
	<lastBuildDate>Thu, 03 Jun 2010 23:38:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>2006-2007 </copyright>
		<managingEditor>dan@danwalmsley.com (Dan Walmsley)</managingEditor>
		<webMaster>dan@danwalmsley.com (Dan Walmsley)</webMaster>
		<category>posts</category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>Putting the nerd in comnerdedy</itunes:summary>
		<itunes:author>Dan Walmsley</itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name>Dan Walmsley</itunes:name>
			<itunes:email>dan@danwalmsley.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.danwalmsley.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.danwalmsley.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>Dan Walmsley</title>
			<link>http://www.danwalmsley.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Jackrabbit, Wicket, Tomcat, Maven2&#8230; hell.</title>
		<link>http://www.danwalmsley.com/2007/10/20/jackrabbit-wicket-tomcat-maven2-hell/</link>
		<comments>http://www.danwalmsley.com/2007/10/20/jackrabbit-wicket-tomcat-maven2-hell/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 02:58:01 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[jackrabbit]]></category>
		<category><![CDATA[jcr]]></category>
		<category><![CDATA[maven2]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[wicket]]></category>

		<guid isPermaLink="false">http://www.danwalmsley.com/2007/10/20/jackrabbit-wicket-tomcat-maven2-hell/</guid>
		<description><![CDATA[What follows is lessons learned migrating to the potentially magnificent Maven2 for dependency management.
Put &#60;scope&#62;provided&#60;/scope&#62; on Tomcat shared resources in your pom.xml
If you deploy jars as a shared resource on Tomcat (i.e. put the jars in common/lib) then be sure to add the &#60;scope&#62;provided&#60;/scope&#62; to those dependencies in your project&#8217;s pom.xml. Otherwise, you&#8217;ll get absolutely [...]]]></description>
			<content:encoded><![CDATA[<p>What follows is lessons learned migrating to the potentially magnificent Maven2 for dependency management.</p>
<h2>Put &lt;scope&gt;provided&lt;/scope&gt; on Tomcat shared resources in your pom.xml</h2>
<p>If you deploy jars as a shared resource on Tomcat (i.e. put the jars in common/lib) then be sure to add the &lt;scope&gt;provided&lt;/scope&gt; to those dependencies in your project&#8217;s pom.xml. Otherwise, you&#8217;ll get absolutely daft class-cast errors on shared resources like:</p>
<p><code><br />
2007-10-21 12:42:19,425 ERROR 0-SNAPSHOT] - Servlet /myExample2-1.0-SNAPSHOT threw load() exception<br />
java.lang.ClassCastException: org.apache.jackrabbit.core.jndi.BindableRepository cannot be cast to org.apache.jackrabbit.core.jndi.BindableRepository<br />
</code></p>
<p>Hahahahahahaha I think I want to kill myself. The problem is that Tomcat&#8217;s shared libraries are loaded by a different classloader than your web-app&#8217;s shared libraries (which is nice in a way, because it means you can use different versions of log4j or whatever). </p>
<p>So the lesson here is: Anything you want created by Tomcat and loaded by name (e.g. &#8220;jcr/repository&#8221;), be sure to exclude from your WEB-INF/lib when you deploy.</p>
<h2>You can load the same shared resource by name for all apps</h2>
<p>Deploying a Maven2-enabled app using Codehaus Mojo is a breeze&#8230; unless you want to deploy a context with it. And a context is the only way to load up named shared resources like a Jackrabbit repository. The solution? </p>
<p>$TOMCAT_HOME/conf/Catalina/$HOSTNAME/context.xml.shared</p>
<p>The contents are loaded for all contexts. Brilliant.</p>
<h2><i>Class blahblah</i> violates loader constraints</h2>
<p>Oh no. This was awful. For me it was: </p>
<p><code><br />
2007-10-21 13:16:26,331 ERROR 0-SNAPSHOT] - Exception starting filter DataServlet<br />
java.lang.LinkageError: Class org/slf4j/ILoggerFactory violates loader constraints<br />
</code></p>
<p>I needed to scour the dependencies that Maven was loading into my webapp automatically and explicitly label them as provided.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danwalmsley.com/2007/10/20/jackrabbit-wicket-tomcat-maven2-hell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
