<?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>Nils Preusker &#187; code</title>
	<atom:link href="http://www.nilspreusker.de/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nilspreusker.de</link>
	<description>Pragmatic Technologist</description>
	<lastBuildDate>Tue, 23 Mar 2010 10:44:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SVN + OS X + &#8220;Umlaute&#8221;</title>
		<link>http://www.nilspreusker.de/2010/03/23/svn-os-x-umlaute/</link>
		<comments>http://www.nilspreusker.de/2010/03/23/svn-os-x-umlaute/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 10:44:19 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Unicode]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=333</guid>
		<description><![CDATA[The Mac OS file system —Mac OS Extended (Journaled)— stores umlaut characters as two separate letters (i.e. &#8216;a&#8217; and &#8216;¨&#8217;). This is referred to as NFD or Normalization Form D with canonical decomposition (see &#8220;Unicode Standard Annex #15 &#8211; Unicode Normalization Forms&#8221;, http://unicode.org/reports/tr15/#Norm_Forms).
This behavior can have unfortunate side effects in applications. Especially remote applications that work [...]]]></description>
			<content:encoded><![CDATA[<p>The Mac OS file system —Mac OS Extended (Journaled)— stores umlaut characters as two separate letters (i.e. &#8216;a&#8217; and &#8216;¨&#8217;). This is referred to as NFD or Normalization Form D with canonical decomposition (see &#8220;Unicode Standard Annex #15 &#8211; Unicode Normalization Forms&#8221;, <a href="http://unicode.org/reports/tr15/#Norm_Forms" target="_blank">http://unicode.org/reports/tr15/#Norm_Forms</a>).</p>
<p>This behavior can have unfortunate side effects in applications. Especially remote applications that work path based and interact with different operating systems can run into problems here.</p>
<p>I came across this when I tried to access a subversion repository that contained file names with German umlauts from my Mac. I am running subversion 1.6.5 and when I check out a file with an umlaut in its name, executing &#8220;svn stat&#8221; will list the file twice, once as missing (with an &#8216;!&#8217;) and once as unversioned (with a &#8216;?&#8217;). A search in the collabnet discussion forums finally confirmed that this is a know issue. The following links provide some documentation:<br />
<a href="http://www.opensimwiki.net/index.php/SVN" target="_blank">http://www.opensimwiki.net/index.php/SVN</a><br />
<a href="http://svn.apache.org/repos/asf/subversion/trunk/notes/unicode-composition-for-filenames" target="_blank">http://svn.apache.org/repos/asf/subversion/trunk/notes/unicode-composition-for-filenames</a></p>
<p>However, the subversion issues are just one specific bug. For application developers it is important to know that Unicode equivalence is a term to keep in mind. The wikipedia article (<a href="http://en.wikipedia.org/wiki/Unicode_equivalence" target="_blank">http://en.wikipedia.org/wiki/Unicode_equivalence</a>) mentions a bug in the samba protocol due to different representations of Unicode characters.</p>
<p>So, next time you come across an issue that involves a Mac and umlauts, <strong>Unicode equivalence</strong> might be the term to look for.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2010/03/23/svn-os-x-umlaute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jBPM 4.3 and Spring</title>
		<link>http://www.nilspreusker.de/2010/01/06/jbpm-4-3-and-spring/</link>
		<comments>http://www.nilspreusker.de/2010/01/06/jbpm-4-3-and-spring/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 19:24:25 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[jBPM 4]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jBPM4]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=310</guid>
		<description><![CDATA[jBPM has just been released in version 4.3 and the spring integration has been changed. If you used to have an application that uses the spring integration of previous versions of jBPM, this might lead to exceptions like this:
org.springframework.beans.factory.BeanCurrentlyInCreationException:
Error creating bean with name 'repositoryService': Requested bean
is currently in creation: Is there an unresolvable circular
reference?
The problem [...]]]></description>
			<content:encoded><![CDATA[<p>jBPM has just been released in version 4.3 and the spring integration has been changed. If you used to have an application that uses the spring integration of previous versions of jBPM, this might lead to exceptions like this:</p>
<pre>org.springframework.beans.factory.BeanCurrentlyInCreationException:
Error creating bean with name 'repositoryService': Requested bean
is currently in creation: Is there an unresolvable circular
reference?</pre>
<p>The problem is that rather than having to declare all of jBPM&#8217;s services in your application context — like it used to be up to jBPM 4.2 —, the new spring integration provides access to them through the Process Engine. All you need in your application context is this:</p>
<pre>&lt;bean id="springHelper"&gt;
  &lt;property name="jbpmCfg" value="PATH TO YOUR jbpm.cfg.xml"&gt;
&lt;/property&gt;
&lt;/bean&gt;
&lt;bean id="processEngine" factory-bean="springHelper"
factory-method="createProcessEngine" /&gt;</pre>
<p>Now you can inject the processEngine into your classes and retrieve jBPM&#8217;s services like this:</p>
<pre>processEngine.getExecutionService() …
processEngine.getRepositoryService() …
…</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2010/01/06/jbpm-4-3-and-spring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven Dependency Conflicts</title>
		<link>http://www.nilspreusker.de/2009/09/24/maven-dependency-conflicts/</link>
		<comments>http://www.nilspreusker.de/2009/09/24/maven-dependency-conflicts/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 14:05:50 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[mvn]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=270</guid>
		<description><![CDATA[Have you ever seen an exception like this:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'XY' defined in class path resource
[applicationContext.xml]: Instantiation of bean failed; nested
exception is org.springframework.beans.
BeanInstantiationException: Could not instantiate bean class
[XY]: Constructor threw exception; nested exception is
java.lang.LinkageError: You are trying to run JAXB 2.0 runtime
(from jar:file:/.../WEB-INF/lib/jaxb-impl-2.1.8.jar!/com/sun/
xml/bind/v2/model/impl/ModelBuilder.class)but you have old
JAXB 1.0 runtime earlier in the classpath (at [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever seen an exception like this:</p>
<pre>org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'XY' defined in class path resource
[applicationContext.xml]: Instantiation of bean failed; nested
exception is org.springframework.beans.
BeanInstantiationException: Could not instantiate bean class
[XY]: Constructor threw exception; nested exception is
java.lang.LinkageError: You are trying to run JAXB 2.0 runtime
(from jar:file:/.../WEB-INF/lib/jaxb-impl-2.1.8.jar!/com/sun/
xml/bind/v2/model/impl/ModelBuilder.class)but you have old
JAXB 1.0 runtime earlier in the classpath (at jar:file:
/.../WEB-INF/lib/jaxb-impl-1.0.4.jar!/com/sun/xml/bind/
WhiteSpaceProcessor.class) Please remove the JAXB 1.0
runtime for 2.0 runtime to work correctly.</pre>
<p>Well, I have, several times&#8230; and the task of having to figure out which library causes this dependency conflict seemed <span style="text-decoration: line-through;">unresolvable</span> pretty scary at first! Luckily, there is the m2eclipse plug-in with its excellent dependency graph. So if you are using Eclipse, whether you are actually using m2eclipse to manage your project or not, just the dependency graph makes it worth having a look at it. I still run my maven tasks on the command line, but have m2eclipse installed, just to be able to use the graph.</p>
<p><img title="Dependency Graph" src="http://www.nilspreusker.de/wp-content/uploads/2009/09/dep-graph.png" alt="Dependency Graph" /></p>
<p>After identifying which library is causing the dependency conflict, all you have to do is to add an &#8220;exclude&#8221; node to that dependency in your pom.xml. In the above case, this snipped did the trick:</p>
<pre>&lt;dependency&gt;
    &lt;groupId&gt;...&lt;/groupId&gt;
    &lt;artifactId&gt;...&lt;/artifactId&gt;
    &lt;version&gt;...&lt;/version&gt;
    <strong>&lt;exclusions&gt;
        &lt;exclusion&gt;
</strong><strong>            &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;
            &lt;groupId&gt;javax.xml&lt;/groupId&gt;
        &lt;/exclusion&gt;
        ...
    &lt;/exclusions&gt;</strong>
&lt;/dependency&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/09/24/maven-dependency-conflicts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java and Snow Leopard</title>
		<link>http://www.nilspreusker.de/2009/09/22/java-and-snow-leopard/</link>
		<comments>http://www.nilspreusker.de/2009/09/22/java-and-snow-leopard/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 11:38:46 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=259</guid>
		<description><![CDATA[I noticed that there isn&#8217;t a whole lot of useful information about Java and Snow Leopard (OS X 10.6) out there on the web. Maybe this is because there isn&#8217;t a whole lot to say about it. Snow Leopard comes with Java 6 (1.6.0_15 that is) only, which means that the links that still exist [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed that there isn&#8217;t a whole lot of useful information about Java and Snow Leopard (OS X 10.6) out there on the web. Maybe this is because there isn&#8217;t a whole lot to say about it. Snow Leopard comes with Java 6 (1.6.0_15 that is) <span style="text-decoration: underline;"><strong>only</strong></span>, which means that the links that still exist in the</p>
<pre>/System/Library/Frameworks/JavaVM.framework/Versions/</pre>
<p>directory all point to &#8220;CurrentJDK&#8221;, which points to &#8220;1.6&#8243;. The thing is that Snow Leopard ships with a 32 bit version and a 64 bit version of the VM (Virtual Machine), 64 bit being the default one. The Java Preferences app shows this nicely:</p>
<p><img src="http://www.nilspreusker.de/wp-content/uploads/2009/09/java-preferences.png" alt="Java Preferences Application" /></p>
<p>And that is the big news about it, since a 32 bit version of java 6 didn&#8217;t previously exist for OS X.</p>
<p>Now I&#8217;ve previously had to tweak Eclipse to use the 1.5 VM (see &#8220;<a title="Java Versions on Mac OS X" href="http://www.nilspreusker.de/2009/03/03/java-versions-on-mac-os-x/" target="_self">Java Versions on Mac OS X</a>&#8220;), and now it just works. I&#8217;m assuming that this is because of the &#8220;mixed mode&#8221;:</p>
<pre>$ java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode)</pre>
<p>&#8230;so the VM would automatically detect if an application should be executed in 64 or 32 bit mode and then start the correct VM. I still need to investigate how this actually works. Anyway, the good news is that java and eclipse seems to be working better with Snow Leopard. I&#8217;ll write more on this as I continue working with it, for now here is an interesting post on the topic:</p>
<p><a title="Eclipse, Java and Snow Leopard" href="http://blog.zvikico.com/2009/09/eclipse-java-and-snow-leopard.html" target="_blank">http://blog.zvikico.com/2009/09/eclipse-java-and-snow-leopard.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/09/22/java-and-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Find out which applications are listening to which port on Mac OSX</title>
		<link>http://www.nilspreusker.de/2009/09/11/find-out-which-applications-are-listening-to-which-port-on-mac-osx/</link>
		<comments>http://www.nilspreusker.de/2009/09/11/find-out-which-applications-are-listening-to-which-port-on-mac-osx/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 16:31:07 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=254</guid>
		<description><![CDATA[If you ever wonder which ports are open on your OS X machine, or whether e.g. jboss is still running, this command will help you:
$sudo lsof -Pi &#124; grep -i "listen"
FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
Man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
]]></description>
			<content:encoded><![CDATA[<p>If you ever wonder which ports are open on your OS X machine, or whether e.g. jboss is still running, this command will help you:</p>
<pre>$sudo lsof -Pi | grep -i "listen"</pre>
<p>FAQ: <a title="FAQ" href="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ" target="_blank">ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ</a><br />
Man page: <a title="Man Page" href="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man" target="_blank">ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/09/11/find-out-which-applications-are-listening-to-which-port-on-mac-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Different Maven Versions on OS X</title>
		<link>http://www.nilspreusker.de/2009/04/24/different-maven-versions-on-os-x/</link>
		<comments>http://www.nilspreusker.de/2009/04/24/different-maven-versions-on-os-x/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 14:06:08 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=246</guid>
		<description><![CDATA[I keep running into the problem that different projects I&#8217;m working on require different versions of maven. I have two versions installed, maven 2.0.6 in /usr/share/maven-2.0.6 and maven 2.0.9 in /usr/share/maven. To find out which version of maven you are running, open a terminal and type the following
$ mvn --version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: [...]]]></description>
			<content:encoded><![CDATA[<p>I keep running into the problem that different projects I&#8217;m working on require different versions of maven. I have two versions installed, maven 2.0.6 in /usr/share/maven-2.0.6 and maven 2.0.9 in /usr/share/maven. To find out which version of maven you are running, open a terminal and type the following</p>
<pre>$ mvn --version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: "mac os x" version: "10.5.6" arch: "x86_64" Family: "mac"</pre>
<p>In this case, maven 2.0.9 is running, so we&#8217;ll see how to switch to maven 2.0.6. First we need to know where the maven executable, or in this case, the symbolic link to the executable is located:</p>
<pre>$ which mvn
/usr/bin/mvn</pre>
<p>Next, we&#8217;ll use ls to check where the symbolic link is pointing:</p>
<pre>$ ls -l /usr/bin/mvn
lrwxr-xr-x  1 root  wheel  24 Apr 24 14:26 /usr/bin/mvn -&gt; /usr/share/maven/bin/mvn</pre>
<p>Finally, if you have different maven versions installed, you can switch between them by overwriting the symbolic link:</p>
<pre>$ sudo ln -fhsv /usr/share/maven-2.0.6/bin/mvn /usr/bin/mvn</pre>
<p>After providing your password, the symbolic link should now be pointing to the maven 2.0.6 executable. To doublecheck, type</p>
<pre>$ mvn --version</pre>
<p>The output should be something like this</p>
<pre>Maven version: 2.0.6</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2009/04/24/different-maven-versions-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overview of reliable open source frameworks</title>
		<link>http://www.nilspreusker.de/2008/12/19/overview-of-reliable-open-source-frameworks/</link>
		<comments>http://www.nilspreusker.de/2008/12/19/overview-of-reliable-open-source-frameworks/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 14:02:39 +0000</pubDate>
		<dc:creator>nils</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.nilspreusker.de/?p=80</guid>
		<description><![CDATA[In a Time of Less, Do More with Open Source: Top 25 Open Source Projects That Will Help Trim Development Budgets
Palamida published a useful list of reliable open source frameworks on their blog. There are no surprises on the list but they put it in relation to the person years it took to create these [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>In a Time of Less, Do More with Open Source: Top 25 Open Source Projects That Will Help Trim Development Budgets</p></blockquote>
<p>Palamida published a useful <a title="25 OSS Frameworks" href="http://www.palamida.com/blogs/25-hot-open-source-projects-organizations-should-be-using-today" target="_blank">list </a>of reliable open source frameworks on their blog. There are no surprises on the list but they put it in relation to the person years it took to create these frameworks. Interesting!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nilspreusker.de/2008/12/19/overview-of-reliable-open-source-frameworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
