<?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>Gerbrand on ICT &#187; flex</title>
	<atom:link href="http://www.gerbrand-ict.nl/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gerbrand-ict.nl</link>
	<description>Weblog on JEE and software-engineering</description>
	<lastBuildDate>Tue, 18 Oct 2011 14:10:32 +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>Combining Flex and Scala using Liftweb and BlazeDS</title>
		<link>http://www.gerbrand-ict.nl/2009/01/combining-flex-and-scala-using-liftweb-and-blazeds/</link>
		<comments>http://www.gerbrand-ict.nl/2009/01/combining-flex-and-scala-using-liftweb-and-blazeds/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 17:05:03 +0000</pubDate>
		<dc:creator>gerbrand</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://www.gerbrand-ict.nl/?p=64</guid>
		<description><![CDATA[I wanted to setup a sample project that uses Flex and Scala. I followed the excellent tutorial on FlexOnRails: Integrating Flex, BlazeDS, and Scala/Lift. The tutorial helps a lot explaining how to set up your sample project. Unfortunately the tutorial is a bit outdated with regard to latest versions. Fortunately I could solve all problems! [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to setup a sample project that uses Flex and Scala. I followed the excellent tutorial on FlexOnRails: <a href="http://flexonrails.net/?p=103">Integrating Flex, BlazeDS, and Scala/Lift</a>. The tutorial helps a lot explaining how to set up your sample project. Unfortunately the tutorial is a bit outdated with regard to latest versions. Fortunately I could solve all problems! I&#8217;ll list the problems I had. Also, I&#8217;ll post my project. I won&#8217;t redo the tutorial, as I certainly couldn&#8217;t to a better job then Derek Wischusen.</p>
<ul>
<li>First problem I had, was getting my backend compiled. The liftweb has changed slightly, as a result the class Boot.scala didn&#8217;t work anymore. I could solve it by downloading the latest <strong>Liftweb framework, version 0.9</strong>. I copied &amp; pasted the Boot.scala from the sites/examples dir. After a few tweaks (removing code I didn&#8217;t need), the project compiled successfully!</li>
<li>Then I wanted to setup the flex project. That was quite easy, using the latest version of <strong>Flexbuilder (version 3.0.2.214193)</strong>.<br />
I setup flexbuilder to deploy in the backend/webapp directly, as is explained in the tutorial.</li>
<li>I ran the project by running the following maven commands in the backend subdir:<br />
<strong>mvn package</strong><br />
<strong>mvn jetty:run</strong></li>
<li>While running the example, I got a AbstractMethodError. I wasn&#8217;t the first person to get that error, as I found on the <a href="http://markmail.org/message/sllcgvhebbp3nzbw#query:java.lang.AbstractMethodError%3A%20net.liftweb.http.SessionMaster%24.mailbox_%24eq(Lscala%2Factors%2FMessageQueue%3B)+page:1+mid:v5y2777ssl4mmqfq+state:results">Liftmailinglist</a>. I could fix the problem by using <strong>Scala version 2.7.1</strong> for my own project. All in all, when using bleeding-edge technologies, having the latest version isn&#8217;t good always!</li>
<li>After that I ran the project  again. Now I get a NullPointerException, seems the line <em>val msgBroker = MessageBroker.getMessageBroker(null)</em> returns Null.<br />
Turned out I forgot to update the web.xml, the Flex servlet and other configuration has to be added.</li>
</ul>
<p>I named the sample project Elegante. Download the source here: <a href="http://www.gerbrand-ict.nl/wp-content/uploads/2009/01/elegante.zip">elegante.zip</a>. For explanation see the original tutorial.</p>
<hr/>
<iframe src="http://rcm.amazon.com/e/cm?t=geonic-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0981531601&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gerbrand-ict.nl/2009/01/combining-flex-and-scala-using-liftweb-and-blazeds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

