<?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>keyboardsamurais.de &#187; Coding</title>
	<atom:link href="http://keyboardsamurais.de/category/Coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://keyboardsamurais.de</link>
	<description>thoughts on software development, warts and all...</description>
	<lastBuildDate>Sun, 19 Jun 2011 12:36:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Repository for maven-timestamp-plugin added</title>
		<link>http://keyboardsamurais.de/2010/02/17/repository-for-maven-timestamp-plugin-added/</link>
		<comments>http://keyboardsamurais.de/2010/02/17/repository-for-maven-timestamp-plugin-added/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 22:53:12 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/?p=237</guid>
		<description><![CDATA[A while back I released the maven timestamp plugin. While I was not able to convince the gatekeepers of the central repository that it is worthy to add (I mean after all that thing is trivial), some 370+ users have already downloaded and used it. So, to make things easier I added a maven repository [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://keyboardsamurais.de/2008/06/08/maven-timestamp-plugin-01-released/">while back</a> I released the <a href="http://code.google.com/p/maven-timestamp-plugin/">maven timestamp plugin</a>. While I was not able to convince the gatekeepers of the central repository that it is worthy to add (I mean after all that thing is trivial), some 370+ users have already downloaded and used it. </p>
<p>So, to make things easier I added a maven repository for you maven lovers to enjoy. Have fun.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=237&amp;md5=a4a8ed8fed868078719bc3749ddd32e6" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2010/02/17/repository-for-maven-timestamp-plugin-added/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Whats all the fuss about spring source charging big money?</title>
		<link>http://keyboardsamurais.de/2008/09/29/whats-all-the-fuss-about-spring-source-charging-big-money/</link>
		<comments>http://keyboardsamurais.de/2008/09/29/whats-all-the-fuss-about-spring-source-charging-big-money/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 21:45:02 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/?p=230</guid>
		<description><![CDATA[I know, i know, most bloggers usually make very bad fact checkers, but this is just absurd. The bruhaha around SpringSource's decision to charge money for their binary (only binary) releases, finally got so big that I decided to call up a sales rep. Reports of astronomical sums, one blogger mentioned 22.000 US$, totally scared [...]]]></description>
			<content:encoded><![CDATA[<p>I know, i know, most bloggers usually make very bad fact checkers, but this is just absurd. The <a href="http://www.theserverside.com/news/thread.tss?thread_id=50727#269378">bruhaha around SpringSource's decision to charge money</a> for their binary (only binary) releases, finally got so big that I decided to call up a sales rep. Reports of astronomical sums, <a href="http://www.ryandelaplante.com/rdelaplante/entry/the_cost_of_springsource_enterprise">one blogger mentioned 22.000 US$</a>, totally scared me and I wanted to know if that was true. </p>
<p>And sure enough: It's not.</p>
<p>The salesperson was nice enough to let me know, that for the whole spring software stack and 10 incidents plus some development software, I would have to shell out 630â‚¬ - about <strong>900 US$</strong> per year and per CPU. Affected are <strong>only production</strong> systems, not developer machines. For all she cared I would've been able to supply every developer in India with a fresh release, as long as he works for me and doesn't violate the EULA. Also, cores do not count as additional CPUs. </p>
<p>I don't know what kind of support Ryan was talking about when he was offered the 22k$ package, but I suppose he wanted Rod Johnson to hold his hand while coding, singing him a lullaby and basically giving him the teet - for that, 22k$ seem pretty reasonable to me <img src='http://keyboardsamurais.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<p>Still, getting a community hooked on an open source product and then charging them for their dependence on said product - after all learning spring is a big investment - smells kinda funny to me. I will have to decide carefully if I really need Spring 3 and all those tools after all.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=230&amp;md5=28d04ee8de3f08014b9c4604cd589da0" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2008/09/29/whats-all-the-fuss-about-spring-source-charging-big-money/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Matching XML content with XPath &#8211; the magic is in the &#8216;.&#8217;</title>
		<link>http://keyboardsamurais.de/2008/01/16/matching-xml-content-with-xpath-the-magic-is-in-the/</link>
		<comments>http://keyboardsamurais.de/2008/01/16/matching-xml-content-with-xpath-the-magic-is-in-the/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 15:03:54 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[contains]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[current]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[matching]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2008/01/16/matching-xml-content-with-xpath-the-magic-is-in-the/</guid>
		<description><![CDATA[Sometimes it's the simple things that make you wonder how they are done on a high level. For example, if you are wondering how you'd match the content of a node in Xpath, you might think to yourself: "Gee I really would like to know which food-nodes in my xml document contain the word 'Donuts' [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it's the simple things that make you wonder how they are done on a high level. For example, if you are wondering how you'd match the content of a node in Xpath, you might think to yourself: "Gee I really would like to know which food-nodes in my xml document contain the word 'Donuts' - this should be easy to find out with XPath".</p>
<p>Well, let me save you some time here. At first you might be looking for a function that matches strings. By looking into the <a href="http://www.w3.org/TR/xpath-functions/">w3c xpath function reference</a> you'd find a function called <code><a href="http://www.w3.org/TR/xpath-functions/#func-contains">contains()</a></code>. '<code>contains()</code>' takes two parameters. And here the fun starts. </p>
<p>What the reference doesn't tell you (ok I'm sure it does tell you <em>somewhere</em>), is how to fiddle your matches into the first contains() parameter, which incidentally is the text you want to scan. If your document looks something like this:</p>
<pre>
&lt;mydocument&gt;
   &lt;food&gt;Bavarian Donuts&lt;/food&gt;
   &lt;food&gt;Cheesecake&lt;/food&gt;
   &lt;food&gt;Oranges&lt;/food&gt;
&lt;/mydocument&gt;
</pre>
<p>Your first approach might look like this: <code>/mydocument/food[contains(/mydocument/food,'Donuts')]</code> Which, in a universe where everything makes perfect sense, would yield you one hit. However, this one just breaks your XPath processor, because contains() doesn't accept multiple matches as the first parameter.</p>
<p>Instead you can do this: <code>/mydocument/food[contains(.,'Donuts')]</code></p>
<p>The trick is that you use the <code>'.'</code> which is a shortcut for the current node function to reference the currently matched node as input to your <code>contains()</code> function. That's all there's to it.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=222&amp;md5=e315c655dd46c8f2eca2e3846335555a" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2008/01/16/matching-xml-content-with-xpath-the-magic-is-in-the/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deleting packages with Eclipse and Subversion / Subversive plugin</title>
		<link>http://keyboardsamurais.de/2007/12/06/deleting-packages-with-eclipse-and-subversion-subversive-plugin/</link>
		<comments>http://keyboardsamurais.de/2007/12/06/deleting-packages-with-eclipse-and-subversion-subversive-plugin/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 14:00:09 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[crybaby]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[delete package]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[subversice]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2007/12/06/deleting-packages-with-eclipse-and-subversion-subversive-plugin/</guid>
		<description><![CDATA[Something I just can't wrap my head around is the sheer brittleness of development with a Subversion repository. While I do realize that this technology is way younger than the old cvs, it just boggles that mind what kind of crazy bugs you come across. My pet peeve was this one bug, where you'd delete [...]]]></description>
			<content:encoded><![CDATA[<p>Something I just can't wrap my head around is the sheer brittleness of development with a Subversion repository. While I do realize that this technology is way younger than the old cvs, it just boggles that mind what kind of crazy bugs you come across. </p>
<p>My pet peeve was this one bug, where you'd delete a package and try to commit and your server tells you that your directory is out of sync. I only now discovered that "out of sync" means you'll have to "svn update" the parent folder of your deleted packages to be able to commit the delete. See the <a href="http://forums.polarion.org/viewtopic.php?t=2717">developer comments on this here</a> - the gist of it: it's not a bug, it's a feature. Oh brother.</p>
<p>I guess I'll have to give <a href="http://www.selenic.com/mercurial/wiki/">mercurial</a>, <a href="http://git.or.cz/">git</a> or some other versioning system a try in the next project. SVN just makes me want to cry.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=221&amp;md5=993c5a0003c376ed935589630493ec90" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2007/12/06/deleting-packages-with-eclipse-and-subversion-subversive-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Spring 2.5 and the runtime paradigm shift</title>
		<link>http://keyboardsamurais.de/2007/11/22/spring-25-and-the-runtime-paradigm-shift/</link>
		<comments>http://keyboardsamurais.de/2007/11/22/spring-25-and-the-runtime-paradigm-shift/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 01:32:09 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2007/11/22/spring-25-and-the-runtime-paradigm-shift/</guid>
		<description><![CDATA[I just finished reading up on the new features of Spring 2.5 and I have to say I'm pretty excited. One thing that bothered me from the start of the Spring project has always been the need for xml wiring of components. No matter what you do in Spring land, you will have to create [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished reading up on the new features of Spring 2.5 and I have to say I'm pretty excited. One thing that bothered me from the start of the Spring project has always been the need for xml wiring of components. No matter what you do in Spring land, you will have to create at least a minimal stub of xml in your config files to make your component known to Spring. And now, the freshly released 2.5 version of Spring is reaping the benefits of annotation driven development and completely does away with that. </p>
<p><span id="more-220"></span><br />
Sure, you can still wire your static beans if you want to, but much more excitingly you can use <a href="http://blog.interface21.com/main/2007/05/29/customizing-annotation-configuration-and-component-detection-in-spring-21/">component scanning </a>to look for beans at runtime. No fiddling with XML at all. </p>
<p>Mark Fisher does a very good job of explaining the full impact of this in <a href="http://www.infoq.com/articles/spring-2.5-part-1">his InfoQ article on Spring 2.5</a>. Also there is the much more comprehensive <a href="http://www.theserverside.com/tt/articles/content/IntrotoSpring25/article.html">Introduction to 2.5 by Rod Johnson on TSS.com</a>.</p>
<p>But what really caught my interest was Interface 21 CTO <a href="http://www.infoq.com/interviews/osgi-adrian-colyer">Adrian Colyer's elaboration</a> on Spring's investment into the <a href="http://www.osgi.org/">OSGi</a> spec. If you listen to him you suddenly realize why exactly the runtime wiring became necessary. The upcoming <a href="http://www.springframework.org/osgi">Spring OSGi API</a> takes the fact into account that Spring configuration at runtime is cool and all, but modularity gets ever more important. Coyler talks about all the interest the application server vendors have in OSGi and how big Web application projects may look like in the future.</p>
<p>In large applications we may see lots of dynamic service OSGi modules, wired together at runtime by Spring, that, as a whole, make up one or more applications. Spring takes into account that OSGi services may come and go at any given moment. Thus updating parts of the application (deploying a new service) instead of changing out a monolithic WAR file becomes a possibility. Exciting stuff. I will look into that some more.</p>
<p>Of course there is plenty of other cool stuff in 2.5, just check out the <a href="http://blog.interface21.com">SpringSource blog</a> or read the <a href="http://static.springframework.org/spring/docs/2.5.x/changelog.txt">Changelog</a>.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=220&amp;md5=4740db9a37f0d5045d1b12aed41378a6" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2007/11/22/spring-25-and-the-runtime-paradigm-shift/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Never mix Spring transactional aop:advice and TransactionProxy</title>
		<link>http://keyboardsamurais.de/2007/11/21/never-mix-spring-aopadvice-and-transactionproxy/</link>
		<comments>http://keyboardsamurais.de/2007/11/21/never-mix-spring-aopadvice-and-transactionproxy/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 21:31:19 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2007/11/21/never-mix-spring-aopadvice-and-transactionproxy/</guid>
		<description><![CDATA[...just don't do it. I used to work with TransactionProxyFactoryBean quite a lot, back then when Spring 1.x was out and it worked quite nicely - especially when dealing with HibernateInterceptor as a preInterceptor it was quite useful. So imagine my surprise when I tried to mix out the new, shiny Spring 2.0 &#60;aop:advice&#62; anotation [...]]]></description>
			<content:encoded><![CDATA[<p>...just don't do it. I used to work with TransactionProxyFactoryBean quite a lot, back then when Spring 1.x was out and it worked quite nicely - especially when dealing with HibernateInterceptor as a preInterceptor it was quite useful. So imagine my surprise when I tried to mix out the new, shiny Spring 2.0 <code>&lt;aop:advice&gt;</code> anotation based <code>@Transactional</code> support: All session management code stopped working.<br />
<span id="more-219"></span><br />
Yes, I should have known better. No, I didn't think of this immediately. Yes I did waste a lot of time with this. No, you may not slap me across the face with a Spring manual, I RTFS...by now.</p>
<p>What happens if you mix the two is this: The AOP Advice will open a Hibernate session for the method you are currently doing work in, then you invoke your DAO code which is wired up with your old <code>TransactionProxyFactoryBean</code> and the <code>HibernateInterceptor</code>. <code>HibernateInterceptor</code> will say: "Alright, this isn't so bad, there is already an open session." and pass the steering wheel back to your DAO. When the DAO is finished, <code>HibernateInterceptor</code> is called again and closes whatever session it finds...which happens to be...the ONLY session you have. All further code that involves accessing your pojos will fail, from this point on.</p>
<p>Note to self: Read the docs more carefully.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=219&amp;md5=d4749fd41ade58426a6daaeaf0e80d13" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2007/11/21/never-mix-spring-aopadvice-and-transactionproxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing crashy Eclipse installations</title>
		<link>http://keyboardsamurais.de/2007/11/01/fixing-crashy-eclipse-installations/</link>
		<comments>http://keyboardsamurais.de/2007/11/01/fixing-crashy-eclipse-installations/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 19:46:41 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2007/11/01/fixing-crashy-eclipse-installations/</guid>
		<description><![CDATA[I've been suffering permanent Eclipse crashes. Especially when developing with the WTP on Tomcat. I found that it just takes some tweakage on the eclipse.ini file to get rid of this noisy little OutOfMemoryException permGen fucker. Here it is, my eclipse.ini. It works like a charm for me. -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256M -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m [...]]]></description>
			<content:encoded><![CDATA[<p>I've been suffering permanent Eclipse crashes. Especially when developing with the WTP on Tomcat. I found that it just takes some tweakage on the eclipse.ini file to get rid of this noisy little OutOfMemoryException permGen fucker. Here it is, my eclipse.ini. It works like a charm for me.</p>
<blockquote><p>-showsplash<br />
org.eclipse.platform<br />
--launcher.XXMaxPermSize<br />
256M<br />
-vmargs<br />
-Dosgi.requiredJavaVersion=1.5<br />
-Xms40m<br />
-Xmx512m<br />
-XX:PermSize=64m<br />
-XX:MaxPermSize=128m </p></blockquote>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=217&amp;md5=608b1ff0de465d7e54ad32ada4d1c11e" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2007/11/01/fixing-crashy-eclipse-installations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Gears, the app that would&#8217;ve been a godsent &#8211; ten years ago</title>
		<link>http://keyboardsamurais.de/2007/06/01/google-gears-the-app-that-wouldve-been-a-godsent-ten-years-ago/</link>
		<comments>http://keyboardsamurais.de/2007/06/01/google-gears-the-app-that-wouldve-been-a-godsent-ten-years-ago/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 11:10:18 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2007/06/01/google-gears-the-app-that-wouldve-been-a-godsent-ten-years-ago/</guid>
		<description><![CDATA[In case anyone accuses me of not getting the idea of Google Gears, let me say this: I don't get the whole Idea of google gears. I mean come on, it caches your javasript and html for offline use in a fashionable way and enables you to enter some input to your app which is [...]]]></description>
			<content:encoded><![CDATA[<p>In case anyone accuses me of not getting the idea of <a href="http://code.google.com/apis/gears/index.html">Google Gears</a>, let me say this: I don't get the whole Idea of google gears. I mean come on, it caches your javasript and html for offline use in a fashionable way and enables you to enter some input to your app which is later synchronized when you reconnect to the web. All right, this will certainly make things like <a href="http://www.bereal.ru/demo/js/tetris/">playing ajax Tetris</a> a whole lot easier. <a href="http://www.dzone.com/r/getting_started_with_google_gears.html">The</a> <a href="http://www.dzone.com/r/audible_ajax_episode_21_dojo_offline_on_google_ge.html">weblogs</a> <a href="http://www.dzone.com/r/google_gears_workerpool_message_passing_shared_no.html">are</a> <a href="http://www.dzone.com/r/more_on_offline_web_applications_google_gears.html">abuzz</a> <a href="http://www.dzone.com/r/httpblogassembleroncom20070531googlegearscachingo.html">about</a> <a href="http://www.dzone.com/r/sprinkle_ajax_with_some_scouring_powder_by_google.html">how</a> <a href="http://www.dzone.com/r/google_goes_offline_with_gears.html">google</a> <a href="http://www.dzone.com/r/syndication_aggregation_protocols.html">gears</a> is better than the second coming.</p>
<p>But wait...do you spot the error? Wasn't Ajax meant to do some significant computing on the server side? Wasn't the whole promise of Ajax, that you'd get some meaningful data from a remote server in a quick, painless way? </p>
<p>Right. What Gears accomplishes is nothing like that (how could they, it's technically impossible). Of course, you would be able to edit <a href="http://docs.google.com/">your spreadsheets and word processors</a> but <a href="http://office.microsoft.com/">these have been around for offline use since the advent of personal computing</a>. In other words: Google Gears will make it easier for developers that feel comfortable in that niche that is Ajax desktop computing. </p>
<p>But they do this in a way that is downright scary. Instead of keeping it simple, they add this enormous complex layer of technology between your browser and the actual server. God knows how any sane developer is going to be able to debug the mess this will likely create in all those bug scenarios. Additionally, webapp developers need to comply with some design principles of Gears to make their apps "Gears ready".</p>
<p>To make a long rant short: I know there are a lot of people out there, who desperately wish for a network computer - and so they hack away on applications that use ajax locally and eventually they can synchronize their data to the server. It's a nice toy for a computer hacker, but I think by the time something as complex as this will be usable by Mom and Dad, ubiquitous WLAN will be a reality and the need to use these frameworks will have disappeared. But let's wait and see if anyone can come up with some kind of killer app, that turns it all around ...I highly doubt it.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=209&amp;md5=4b3b6539d426eff670ee51081dac8291" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2007/06/01/google-gears-the-app-that-wouldve-been-a-godsent-ten-years-ago/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pain is the cost of Spring MVC&#8217;s elegance</title>
		<link>http://keyboardsamurais.de/2007/05/16/pain-is-the-cost-of-spring-mvcs-elegance/</link>
		<comments>http://keyboardsamurais.de/2007/05/16/pain-is-the-cost-of-spring-mvcs-elegance/#comments</comments>
		<pubDate>Wed, 16 May 2007 01:17:10 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2007/05/16/pain-is-the-cost-of-spring-mvcs-elegance/</guid>
		<description><![CDATA[I'm surprised about how far Spring has come without ever adressing simple everyday problems. If you really, honestly want to use Spring for your application all the way through, be prepared for some good shockers. Want some spring oddities? Lets start with a question, what do you think caused this exception? Caused by: java.lang.IndexOutOfBoundsException at [...]]]></description>
			<content:encoded><![CDATA[<p>I'm surprised about how far Spring has come without ever adressing simple everyday problems. If you really, honestly want to use Spring for your application all the way through, be prepared for some good shockers. Want some spring oddities?</p>
<p><span id="more-208"></span></p>
<p>Lets start with a question, what do you think caused this exception?</p>
<p><textarea cols="50" rows="10">Caused by: java.lang.IndexOutOfBoundsException<br />
        at java.nio.Buffer.checkIndex(Buffer.java:514)<br />
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:154)<br />
        at org.mortbay.io.nio.NIOBuffer.poke(NIOBuffer.java:110)<br />
        at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:399)<br />
        at org.mortbay.io.BufferUtil.putCRLF(BufferUtil.java:280)<br />
        at org.mortbay.jetty.HttpFields$Field.put(HttpFields.java:1367)<br />
        at org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:414)<br />
        at org.mortbay.jetty.HttpConnection.completeResponse(HttpConnection.java:512)<br />
        at org.mortbay.jetty.Response.complete(Response.java:948)<br />
        at org.mortbay.jetty.Response.sendRedirect(Response.java:345)<br />
        at org.springframework.web.servlet.view.RedirectView.sendRedirect(RedirectView.java:264)<br />
        at org.springframework.web.servlet.view.RedirectView.renderMergedOutputModel(RedirectView.java:168)<br />
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:243)<br />
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1141)<br />
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:878)<br />
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)<br />
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:461)<br />
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:426)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br />
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1049)<br />
        at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.j<br />
ava:198)<br />
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at net.remotecontrolme.web.MessageFilter.doFilter(MessageFilter.java:39)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)<br />
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:352)<br />
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:230)<br />
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)<br />
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)<br />
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)<br />
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)<br />
        at org.mortbay.jetty.Server.handle(Server.java:286)<br />
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:444)<br />
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:715)<br />
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)<br />
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)<br />
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:340)<br />
        at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)<br />
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)<br />
2007-05-16 01:43:23.156::WARN:  Nested in org.springframework.web.util.NestedServletException: Request processing failed<br />
; nested exception is java.lang.IndexOutOfBoundsException:<br />
java.lang.IndexOutOfBoundsException<br />
        at java.nio.Buffer.checkIndex(Buffer.java:514)<br />
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:154)<br />
        at org.mortbay.io.nio.NIOBuffer.poke(NIOBuffer.java:110)<br />
        at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:399)<br />
        at org.mortbay.io.BufferUtil.putCRLF(BufferUtil.java:280)<br />
        at org.mortbay.jetty.HttpFields$Field.put(HttpFields.java:1367)<br />
        at org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:414)<br />
        at org.mortbay.jetty.HttpConnection.completeResponse(HttpConnection.java:512)<br />
        at org.mortbay.jetty.Response.complete(Response.java:948)<br />
        at org.mortbay.jetty.Response.sendRedirect(Response.java:345)<br />
        at org.springframework.web.servlet.view.RedirectView.sendRedirect(RedirectView.java:264)<br />
        at org.springframework.web.servlet.view.RedirectView.renderMergedOutputModel(RedirectView.java:168)<br />
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:243)<br />
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1141)<br />
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:878)<br />
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)<br />
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:461)<br />
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:426)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br />
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1049)<br />
        at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.j<br />
ava:198)<br />
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at net.remotecontrolme.web.MessageFilter.doFilter(MessageFilter.java:39)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)<br />
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:352)<br />
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:230)<br />
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)<br />
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)<br />
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)<br />
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)<br />
        at org.mortbay.jetty.Server.handle(Server.java:286)<br />
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:444)<br />
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:715)<br />
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)<br />
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)<br />
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:340)<br />
        at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)<br />
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)<br />
2007-05-16 01:43:23.171::WARN:  /remotecontrolme/demopage.html;jsessionid=fsb3lnlb4gijk:<br />
java.lang.IndexOutOfBoundsException<br />
        at java.nio.Buffer.checkIndex(Buffer.java:514)<br />
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:154)<br />
        at org.mortbay.io.nio.NIOBuffer.poke(NIOBuffer.java:110)<br />
        at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:399)<br />
        at org.mortbay.io.BufferUtil.putCRLF(BufferUtil.java:280)<br />
        at org.mortbay.jetty.HttpFields$Field.put(HttpFields.java:1367)<br />
        at org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:414)<br />
        at org.mortbay.jetty.HttpConnection.completeResponse(HttpConnection.java:512)<br />
        at org.mortbay.jetty.Response.complete(Response.java:948)<br />
        at org.mortbay.jetty.Response.sendRedirect(Response.java:345)<br />
        at org.springframework.web.servlet.view.RedirectView.sendRedirect(RedirectView.java:264)<br />
        at org.springframework.web.servlet.view.RedirectView.renderMergedOutputModel(RedirectView.java:168)<br />
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:243)<br />
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1141)<br />
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:878)<br />
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)<br />
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:461)<br />
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:426)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br />
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1049)<br />
        at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.j<br />
ava:198)<br />
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at net.remotecontrolme.web.MessageFilter.doFilter(MessageFilter.java:39)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)<br />
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:352)<br />
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:230)<br />
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)<br />
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)<br />
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)<br />
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)<br />
        at org.mortbay.jetty.Server.handle(Server.java:286)<br />
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:444)<br />
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:715)<br />
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)<br />
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)<br />
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:340)<br />
        at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)<br />
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)<br />
2007-05-16 01:43:23.171::WARN:  /remotecontrolme/demopage.html;jsessionid=fsb3lnlb4gijk<br />
java.lang.IndexOutOfBoundsException<br />
        at java.nio.Buffer.checkIndex(Buffer.java:514)<br />
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:154)<br />
        at org.mortbay.io.nio.NIOBuffer.poke(NIOBuffer.java:110)<br />
        at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:399)<br />
        at org.mortbay.io.BufferUtil.putCRLF(BufferUtil.java:280)<br />
        at org.mortbay.jetty.HttpFields$Field.put(HttpFields.java:1367)<br />
        at org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:414)<br />
        at org.mortbay.jetty.HttpConnection.completeResponse(HttpConnection.java:512)<br />
        at org.mortbay.jetty.Response.complete(Response.java:948)<br />
        at org.mortbay.jetty.Response.sendRedirect(Response.java:345)<br />
        at org.springframework.web.servlet.view.RedirectView.sendRedirect(RedirectView.java:264)<br />
        at org.springframework.web.servlet.view.RedirectView.renderMergedOutputModel(RedirectView.java:168)<br />
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:243)<br />
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1141)<br />
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:878)<br />
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)<br />
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:461)<br />
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:426)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br />
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1049)<br />
        at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.j<br />
ava:198)<br />
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at net.remotecontrolme.web.MessageFilter.doFilter(MessageFilter.java:39)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)<br />
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)<br />
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)<br />
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:352)<br />
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:230)<br />
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)<br />
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)<br />
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)<br />
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)<br />
        at org.mortbay.jetty.Server.handle(Server.java:286)<br />
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:444)<br />
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:715)<br />
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)<br />
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)<br />
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:340)<br />
        at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)<br />
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)<br />
2007-05-16 01:43:23.187::WARN:  handle failed<br />
java.lang.IndexOutOfBoundsException<br />
        at java.nio.Buffer.checkIndex(Buffer.java:514)<br />
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:154)<br />
        at org.mortbay.io.nio.NIOBuffer.poke(NIOBuffer.java:110)<br />
        at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:399)<br />
        at org.mortbay.jetty.HttpFields$Field.put(HttpFields.java:1364)<br />
        at org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:414)<br />
        at org.mortbay.jetty.HttpConnection.completeResponse(HttpConnection.java:512)<br />
        at org.mortbay.jetty.Response.complete(Response.java:948)<br />
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:487)<br />
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:715)<br />
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)<br />
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)<br />
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:340)<br />
        at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)<br />
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)</textarea></p>
<p>Now, you may come to the conclusion that<br />
a.) Jetty has had a problem in transferring some streams back and forth<br />
d.) The Hibernate Session may have been closed<br />
c.) Space aliens hijacked your VM</p>
<p>...but, no - that all didn't happen. It was just the Spring way of telling me: Your Hibernate mapping needs some lazy loading if you're gonna mess around with circular dependencies. Nice one. Even better that the OpenSessionInViewFilter covered up the original error message that could've been actually helpful. Just adding <code>@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL,mappedBy="user")</code> helped me though. The time it took me to figure this out, would've bought me many a meal, had I only opted to spend it on <em>real</em> work.</p>
<p>But on to the next one: the Spring taglib. Whether you want to use the old <spring:bind> tags or the new form:* tags that spring offers you, you will have to specify a <strong>commandName</strong>. That wouldn't be so bad if it wasn't for the fact that the tags will just flip out and throw one hell of an Exception, if you fail to have <strong>an actual instance of the command</strong> that is being referenced in your Model. This means if you want to embed a login form on every page you use, you will have to make sure, that  <em>every</em> single Controller for <em>every</em> single page adds a blank LoginCommand class to your Model. Note that the form:* tag is Spring's the second take on tackling the problem of creating a usable taglib. Why Rob Harrop and Juergen Hoeller, the two (usually brilliant) guys who are to blame for this abomination, don't just crawl into a cave and cry, because of the shame they brought on themselves, is a mystery that boggles the mind. Why not just let the poor tag fail silently, like in EL? We may never know, what drugs were at play during design.</p>
<p>You think I'm joking? It gets better. Since the SimpleFormController allows only support for exactly <strong>one</strong> type of form-backing command, you will have to deal with multiple commands yourself - manually, or use a command that has nested properties - *yay*. What this means is, adding every command to the page with multiple forms, so those form:* tags don't detonate in your face. The SimpleFormController really isn't of much help here. Instead you have to mess around violently in xml hell, or abuse springs design principles to get what you need. That is, unless you take the time to bring the <a href="https://sourceforge.net/projects/mpsc-modules/">old MSPC modules</a>, whose sf.net page looks pretty dead to me, up to date. This is a problem the Spring community <a href="http://forum.springframework.org/search.php?searchid=659563">has been struggling with</a> for YEARS. I cannot possibly understand how it can be so hard to create something nice here. I am constantly tempted at writing my own spring extensions.</p>
<p>I had to vent. Overall Spring MVC isn't that bad - there are just some parts of it, you better just don't touch, lest you want to suffer a heart attack.</p>
<p><strong>Update</strong>: Found a <a href="http://jroller.com/page/Solomon?entry=tip_spring_mvc_dynamic_collection">cumbersome workaround for the taglib issue</a>.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=208&amp;md5=35c7b1eb57fa500856e78912812bef0c" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2007/05/16/pain-is-the-cost-of-spring-mvcs-elegance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Spring MVC and the &lt;welcome-file&gt; directive</title>
		<link>http://keyboardsamurais.de/2007/05/10/spring-mvc-and-the-directive/</link>
		<comments>http://keyboardsamurais.de/2007/05/10/spring-mvc-and-the-directive/#comments</comments>
		<pubDate>Thu, 10 May 2007 11:26:22 +0000</pubDate>
		<dc:creator>Toni</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://keyboardsamurais.de/2007/05/10/spring-mvc-and-the-directive/</guid>
		<description><![CDATA[If you use Spring's awesome MVC framework you will likely encounter one problem that is common among Web frameworks. If the first page you want to open is a jsp page with a Controller - i.e. a page where some java code is executed to prepare data for the invoked jsp...there seems to be no [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="http://www.springframework.org/">Spring's awesome MVC framework</a> you will likely encounter one problem that is common among Web frameworks. If the first page you want to open is a jsp page with a <code>Controller</code> - i.e. a page where some java code is executed to prepare data for the invoked jsp...there seems to be no traditional way to do it.</p>
<p>Say you want to be able to access the url <code>http://server.com/</code> to your servlet container that's just a directory. It will list the direcoty (if listig is enabled) or just show you a blank page. That is, unless you have defined a <code>&lt;welcome-file&gt;</code> directive in your web.xml which looks for a particular file to load in this case. But this is exactly the problem. </p>
<p>Assume you have defined the following:</p>
<blockquote><p>
<code>    &lt;welcome-file-list&gt;<br />
        &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;<br />
    &lt;/welcome-file-list&gt;</code></p></blockquote>
<p>And the index.html is the formView of, let's say a <code>SimpleFormController</code>. </p>
<p>Now what your container will do upon a request to its root context is this. It will look for a file in your <strong>filesystem</strong> called index.html and try to deliver it. Of course your index.html is not really a file, it's just mapped by, for example, a <code>SimpleUrlHandlerMapping</code>. Game over for the Server. It will not deliver what you expect.</p>
<p>Unfortunately there is no universal way of telling the container to take a look into the Spring context for the url. There is not even a possibility in web.xml to do simple forwards to other urls for the <code>&lt;welcome-file/&gt;</code>. </p>
<p>Instead the solution that seemed most practical to me was, to create a jsp as the <code>&lt;welcome-file&gt;</code>, save it as index.jsp and insert the following code:</p>
<blockquote><p><code>&lt;jsp:forward page="index.html" /&gt;</code></p></blockquote>
<p>I assume that you chose <code>*.html</code> as your url-pattern for the <code>DispatcherServlet</code> here.</p>
 <p><a href="http://keyboardsamurais.de/?flattrss_redirect&amp;id=207&amp;md5=bf26f87229b90f095a52643472b64772" title="Flattr" target="_blank"><img src="http://keyboardsamurais.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://keyboardsamurais.de/2007/05/10/spring-mvc-and-the-directive/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

