<?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>Gigu's blog &#187; jdo</title>
	<atom:link href="http://blog.gigoo.org/tag/jdo/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gigoo.org</link>
	<description>wEBbLOG</description>
	<lastBuildDate>Thu, 01 Jul 2010 22:59:21 +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>Groovy with JDO on Google App Engine, enhancing with DataNucleus</title>
		<link>http://blog.gigoo.org/2009/04/27/groovy-with-jdo-on-google-app-engine-enhancing-with-datanucleus/</link>
		<comments>http://blog.gigoo.org/2009/04/27/groovy-with-jdo-on-google-app-engine-enhancing-with-datanucleus/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 01:52:25 +0000</pubDate>
		<dc:creator>Greg Gigon</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[datanucleus]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jdo]]></category>

		<guid isPermaLink="false">http://blog.gigoo.org/2009/04/27/groovy-with-jdo-on-google-app-engine-enhancing-with-datanucleus/</guid>
		<description><![CDATA[ I have some time this days and I’m trying to fly some clouds with Google App Engine (GAE), Now when they have released Java support I can try to use Groovy. Today I tried to implement some simple storage using JDO. GAE team supports some of its features via&#160; DataNucleus. DataNucleus is using a [...]]]></description>
			<content:encoded><![CDATA[<p><img style="display: inline; margin: 0px 10px 0px 0px" src="http://code.google.com/appengine/images/appengine_lowres.jpg" align="left" /> I have some time this days and I’m trying to fly some clouds with <a href="http://code.google.com/appengine/" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" target="_blank">Google App Engine</a> (GAE), Now when they have released Java support I can try to use <a href="http://groovy.codehaus.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/groovy.codehaus.org');" target="_blank">Groovy</a>. Today I tried to implement some simple storage using JDO. GAE team supports some of its features via&#160; <a href="http://www.datanucleus.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.datanucleus.org');" target="_blank">DataNucleus</a>. DataNucleus is using a post compilation hook to enhance any persistable classes. </p>
<p>Having Groovy in a <strong>lib</strong> folder of your <strong>war </strong>(GAE runs your application from this folder) I need to put <strong>asm </strong>library as well. Latest version of Groovy (1.6.1) has a dependency on <strong>asm </strong>library in version <strong>2.2.3. </strong>On the other hand DataNucleus enhancer has dependency on <strong>asm </strong>library in version <strong>3.1</strong>. </p>
<p>GAE Java SDK is shipped with <strong>Ant</strong> task for enhancing persistable classes. It also contains <strong>Ant </strong>macro definition file that makes it simple for usage. Unfortunately this macro includes all libraries from application <strong>lib </strong>folder. This is causing Enhancer to use <strong>asm</strong> library in a version that causes it to fail massively. </p>
<blockquote><p><strong><em>[enhance] SEVERE: An error occured for ClassEnhancer &quot;ASM&quot; when trying to call the method &quot;org.datanucleus.enhancer.as          <br />m.ASMClassEnhancer&quot; on class &quot;getClassNameForFileName&quot; : org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVi           <br />sitor;I)V</em></strong></p>
</blockquote>
<p>Number of this error messages is as big as the number of classes in my application.</p>
<p>Solution is to exclude <strong>asm </strong>library from the macro that Google shipped. Easiest way is to edit, or copy to your local application folder and use it there. The line problematic line of code is in <strong>classpath </strong>element.</p>
<blockquote><p><em>&lt;classpath&gt;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;pathelement path=&quot;${appengine.tools.classpath}&quot;/&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;pathelement path=&quot;@{war}/WEB-INF/classes&quot;/&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;fileset dir=&quot;@{war}/WEB-INF/lib&quot; includes=&quot;*.jar&quot;&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/fileset&gt;         <br />&lt;/classpath&gt;</em></p>
</blockquote>
<p>The easiest way to fix it is to exclude <strong>asm </strong>library in <strong>fileset </strong>element, just like this:</p>
<blockquote><p><em>&lt;classpath&gt;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;pathelement path=&quot;${appengine.tools.classpath}&quot;/&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;pathelement path=&quot;@{war}/WEB-INF/classes&quot;/&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;fileset dir=&quot;@{war}/WEB-INF/lib&quot; includes=&quot;*.jar&quot; <strong>excludes=&quot;asm*.jar&quot;&gt;</strong>         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/fileset&gt;         <br />&lt;/classpath&gt;</em></p>
<p>Hope that helps anyone with similar problem.</p>
<p>Cheers, Greg</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.gigoo.org/2009/04/27/groovy-with-jdo-on-google-app-engine-enhancing-with-datanucleus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
