<?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>off-topic &#187; Software Development</title>
	<atom:link href="http://off-topic.biz/en/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://off-topic.biz/en</link>
	<description>A collection of off-topic posts</description>
	<lastBuildDate>Thu, 07 Apr 2011 09:16:38 +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>Eclipse + Maven + AppEngine: Invalid classpath publish/export dependency</title>
		<link>http://off-topic.biz/en/eclipse-maven-appengine-invalid-classpath-publish-export-dependency/</link>
		<comments>http://off-topic.biz/en/eclipse-maven-appengine-invalid-classpath-publish-export-dependency/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 15:52:46 +0000</pubDate>
		<dc:creator>Olaf</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://off-topic.biz/en/?p=57</guid>
		<description><![CDATA[While working with Eclipse and Google Plugin for Eclipse the Maven Integration Plugin I ran into the problem that the dependency on the JDO API library jdo2-api-2.3-ea.jar appears in the App Engine SDK and in the Maven dependencies imported from &#8230; <a href="http://off-topic.biz/en/eclipse-maven-appengine-invalid-classpath-publish-export-dependency/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
While working with <a href="http://eclipse.org/">Eclipse</a> and <a href="http://code.google.com/appengine/docs/java/tools/eclipse.html">Google Plugin for Eclipse</a> the <a href="http://m2eclipse.sonatype.org/">Maven Integration Plugin</a> I ran into the problem that the dependency on the JDO API library jdo2-api-2.3-ea.jar appears in the App Engine SDK and in the Maven dependencies imported from another project. The Eclipse Classpath Dependency Validator showed the following error message:
</p>
<blockquote><p>Invalid classpath publish/export dependency /local/eclipse/galileo/plugins/com.google.appengine.eclipse.sdkbundle_1.2.2.v200907291526/appengine-java-sdk-1.2.2/lib/user/orm/jdo2-api-2.3-ea.jar. The project contains another dependency with the same archive name.</p></blockquote>
<p>
The solution for this problem was using the notion of <a href="http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html">explicit dependency exclusion</a> of Maven 2.x in the pom.xml.</p>
]]></content:encoded>
			<wfw:commentRss>http://off-topic.biz/en/eclipse-maven-appengine-invalid-classpath-publish-export-dependency/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ConversionException when parsing XML with XStream: Element is not defined</title>
		<link>http://off-topic.biz/en/conversionexception-when-parsing-xml-with-xstream-element-is-not-defined/</link>
		<comments>http://off-topic.biz/en/conversionexception-when-parsing-xml-with-xstream-element-is-not-defined/#comments</comments>
		<pubDate>Wed, 27 May 2009 12:04:00 +0000</pubDate>
		<dc:creator>Olaf</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XML Parser]]></category>
		<category><![CDATA[XStream]]></category>

		<guid isPermaLink="false">http://off-topic.biz/en/?p=39</guid>
		<description><![CDATA[XStream is an easy to use Java library to serialize objects to XML and back again. Yesterday I wanted to parse a XML document generated by a third party software with the following structure: &#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62; &#60;AuditTrail&#62; &#60;Entry type=&#34;ExecutionReport&#34; &#8230; <a href="http://off-topic.biz/en/conversionexception-when-parsing-xml-with-xstream-element-is-not-defined/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://xstream.codehaus.org/">XStream</a> is an easy to use Java library to serialize objects to XML and back again. Yesterday I wanted to parse a XML document generated by a third party software with the following structure:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;AuditTrail<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Entry</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;ExecutionReport&quot;</span> <span style="color: #000066;">msgId</span>=<span style="color: #ff0000;">&quot;2544804979&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;field</span> <span style="color: #000066;">tag</span>=<span style="color: #ff0000;">&quot;35&quot;</span> <span style="color: #000066;">val</span>=<span style="color: #ff0000;">&quot;8&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;field</span> <span style="color: #000066;">tag</span>=<span style="color: #ff0000;">&quot;34&quot;</span> <span style="color: #000066;">val</span>=<span style="color: #ff0000;">&quot;000023&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;field</span> <span style="color: #000066;">tag</span>=<span style="color: #ff0000;">&quot;43&quot;</span> <span style="color: #000066;">val</span>=<span style="color: #ff0000;">&quot;N&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;field</span> <span style="color: #000066;">tag</span>=<span style="color: #ff0000;">&quot;52&quot;</span> <span style="color: #000066;">val</span>=<span style="color: #ff0000;">&quot;20090526-20:08:31&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;field</span> <span style="color: #000066;">tag</span>=<span style="color: #ff0000;">&quot;6556&quot;</span> <span style="color: #000066;">val</span>=<span style="color: #ff0000;">&quot;today12&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;field</span> <span style="color: #000066;">tag</span>=<span style="color: #ff0000;">&quot;17&quot;</span> <span style="color: #000066;">val</span>=<span style="color: #ff0000;">&quot;73740.1243368511.0&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;field</span> <span style="color: #000066;">tag</span>=<span style="color: #ff0000;">&quot;32&quot;</span> <span style="color: #000066;">val</span>=<span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Entry<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Entry</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Acknowledged&quot;</span> <span style="color: #000066;">msgId</span>=<span style="color: #ff0000;">&quot;1540251818&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Entry<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/AuditTrail<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>I created three classes <code>AuditTrail</code>, <code>AuditTrailEntry</code> and <code>AuditTrailEntryField</code> for the elements <code>AuditTrail</code>, <code>Entry</code>, and <code>field</code>, respectively. In addition, I set the aliases accordingly:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">XStream xStream <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> XStream <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
xStream.<span style="color: #006633;">alias</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;AuditTrail&quot;</span>, AuditTrail.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
xStream.<span style="color: #006633;">alias</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Entry&quot;</span>, AuditTrailEntry.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
xStream.<span style="color: #006633;">alias</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;field&quot;</span>, AuditTrailEntryField.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>A call to the method <code>fromXml()</code> of the <code>XStream</code> object resulted in the following exception:</p>
<pre>
ConversionException: Element [NAME] of type [TYPE]
                     is not defined as [NAME] in type [TYPE]
</pre>
<p>Because I did not find a quick solution via a Google search I was forced to read the XStream documentation. ;-) There I learned something about <a href="http://xstream.codehaus.org/annotations-tutorial.html#ImplicitCollections">Implicit Collections</a> in XStream. Whenever you have a collection which does not display it&#8217;s root tag, you can map it as an implicit collection:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">xStream.<span style="color: #006633;">addImplicitCollection</span> <span style="color: #009900;">&#40;</span>AuditTrailEntry.<span style="color: #000000; font-weight: bold;">class</span>, <span style="color: #0000ff;">&quot;fields&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
xStream.<span style="color: #006633;">addImplicitCollection</span> <span style="color: #009900;">&#40;</span>AuditTrail.<span style="color: #000000; font-weight: bold;">class</span>, <span style="color: #0000ff;">&quot;entries&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>with</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">List</span> <span style="color: #339933;">&lt;</span>AuditTrailEntryField<span style="color: #339933;">&gt;</span> fields<span style="color: #339933;">;</span></pre></div></div>

<p>in class <code>AuditTrailEntry</code> and</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">List</span> <span style="color: #339933;">&lt;</span>AuditTrailEntry<span style="color: #339933;">&gt;</span> entries<span style="color: #339933;">;</span></pre></div></div>

<p>in class <code>AuditTrail</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://off-topic.biz/en/conversionexception-when-parsing-xml-with-xstream-element-is-not-defined/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tomcat + Hibernate + C3P0 + MySQL: Communications link failure</title>
		<link>http://off-topic.biz/en/tomcat-hibernate-c3p0-mysql-communications-link-failure/</link>
		<comments>http://off-topic.biz/en/tomcat-hibernate-c3p0-mysql-communications-link-failure/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 15:27:14 +0000</pubDate>
		<dc:creator>Olaf</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[connection pooling]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://off-topic.biz/en/?p=16</guid>
		<description><![CDATA[After deploying a Google GWT application using Hibernate and C3P0 connection pooling backed by a MySQL database server to a test server running Tomcat everything seemed to run correctly. But letting the server run over night a login attempt failed &#8230; <a href="http://off-topic.biz/en/tomcat-hibernate-c3p0-mysql-communications-link-failure/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After deploying a <a href="http://code.google.com/webtoolkit/">Google GWT</a> application using <a href="http://www.hibernate.org/">Hibernate</a> and C3P0 connection pooling backed by a <a href="http://mysql.com/">MySQL</a> database server to a test server running <a href="http://tomcat.apache.org/">Tomcat</a> everything seemed to run correctly. But letting the server run over night a login attempt failed the next day. A quick search showed me that I am not the only one on this planet who ran into the following error:</p>
<pre>org.hibernate.exception.JDBCConnectionException:
  could not execute query
[...]
com.mysql.jdbc.CommunicationsException:
  Communications link failure due to underlying exception:
[...]</pre>
<p>This problem occurs because MySQL drops idle JDBC connection after 8 hours, but the C3P0 connection pooling mechanism still considers these connection as alive and valid.</p>
<p>I found several possible solution on the Internet. Some people recommend to set the &#8220;autoReconnect&#8221; parameter in the JDBC URL, but this is <a href="http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html">not recommended</a> by the MySQL team.</p>
<p>Others recommend to set the C3P0 properties accordingly in order to check and close idle database connections. In most cases the proposed solution looks like the <a href="http://www.hibernate.org/214.html">&#8220;official&#8221;</a> configuration provided by the Hibernate crew:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;c3p0.min_size&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;c3p0.max_size&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>25<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;c3p0.acquire_increment&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;c3p0.max_statements&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>50<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;c3p0.timeout&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>14400<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;c3p0.idle_test_period&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>3600<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>But as I have found in many, many comments in discussion groups this also did not work in a large number of cases. In order to get C3P0 connection pooling in Hibernate3 work correctly with a MySQL database one important property setting is still missing. I found this hint in a comment to the above &#8220;official&#8221; configuration. In addition one has to explicitly set the connection provider class:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;connection.provider_class&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  org.hibernate.connection.C3P0ConnectionProvider
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>After setting this property the above C3P0 configuration works correctly. At least for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://off-topic.biz/en/tomcat-hibernate-c3p0-mysql-communications-link-failure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to write untestable code</title>
		<link>http://off-topic.biz/en/how-to-write-untestable-code/</link>
		<comments>http://off-topic.biz/en/how-to-write-untestable-code/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 09:12:23 +0000</pubDate>
		<dc:creator>Olaf</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://off-topic.biz/en/?p=10</guid>
		<description><![CDATA[In the talk &#8220;Unit Testing&#8221; within the series of Google &#8220;Clean Code Talks&#8221; Miško Hevery first asks the audience how they would write untestable code. There were not much answers although we are all very good at it. Question: &#8220;How &#8230; <a href="http://off-topic.biz/en/how-to-write-untestable-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the talk &#8220;<a href="http://googletesting.blogspot.com/2008/11/clean-code-talks-unit-testing.html">Unit Testing</a>&#8221; within the series of Google &#8220;Clean Code Talks&#8221; <a>Miško Hevery</a> first asks the audience how they would write untestable code. There were not much answers although we are all very good at it. Question: &#8220;How to write untestable code?&#8221; Answer: &#8220;I don&#8217;t know. It just works.&#8221; Fortunately he also offers ideas how to write testable code during the talk.</p>
<div class="youtube-video"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="src" value="http://www.youtube.com/v/wEhu57pih5w&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/wEhu57pih5w&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;fs=1" allowfullscreen="true"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://off-topic.biz/en/how-to-write-untestable-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XPP3 pull-parser causing an ArrayIndexOutOfBoundsException: Google GWT with Eclipse, Maven and Hibernate</title>
		<link>http://off-topic.biz/en/xpp3-pull-parser-causing-an-arrayindexoutofboundsexception-google-gwt-with-eclipse-maven-and-hibernate/</link>
		<comments>http://off-topic.biz/en/xpp3-pull-parser-causing-an-arrayindexoutofboundsexception-google-gwt-with-eclipse-maven-and-hibernate/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 18:35:56 +0000</pubDate>
		<dc:creator>Olaf</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[XML Parser]]></category>

		<guid isPermaLink="false">http://off-topic.biz/en/?p=3</guid>
		<description><![CDATA[Today I lost almost two hours of productive work because I had problems compiling a simple Google GWT application. For software development I use Eclipse 3.4 (Ganymede) with the Maven Integration plugin. In case of GWT I also use the &#8230; <a href="http://off-topic.biz/en/xpp3-pull-parser-causing-an-arrayindexoutofboundsexception-google-gwt-with-eclipse-maven-and-hibernate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I lost almost two hours of productive work because I had problems compiling a simple Google GWT application. For software development I use Eclipse 3.4 (Ganymede) with the Maven Integration plugin. In case of GWT I also use the Cypal Studio.</p>
<p>My GWT application makes RPCs to a server backed by Hibernate. Including Hibernate (org.hibernate:hibernate-core-3.3.1.GA from the JBoss repository) into the classpath via Maven also includes XPP3 and the pull-parser-2 libraries. Then for some reason the Google GWT compiler uses the pull-parser-2 to parse the XML of the inherited modules.</p>
<p>The module com.google.gwt.user.User includes the module com.google.gwt.i18n.I18N which causes an ArrayIndexOutOfBoundsException:</p>
<pre>[ERROR] Line 29: Unexpected exception while processing element 'inherits'
java.lang.ArrayIndexOutOfBoundsException: null
    at java.lang.System.arraycopy(Native Method)
    at org.gjt.xpp.impl.tokenizer.Tokenizer.next(Tokenizer.java:1274)
    at org.gjt.xpp.impl.pullparser.PullParser.next(PullParser.java:392)
    at org.gjt.xpp.sax2.Driver.parseSubTree(Driver.java:415)
    at org.gjt.xpp.sax2.Driver.parse(Driver.java:310)
    at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:310)</pre>
<p>This seems to be a bug in the pull-parser-2. Excluding the pull-parser from the hibernate-core dependency removes it from the class path, but the GWT compiler continues using it for parsing its XML modules. The solution was to include the pull-parser-2.1.10 in the Java Build Path of Eclipse and put it to the first position in the build class path order in Eclipse.</p>
]]></content:encoded>
			<wfw:commentRss>http://off-topic.biz/en/xpp3-pull-parser-causing-an-arrayindexoutofboundsexception-google-gwt-with-eclipse-maven-and-hibernate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

