<?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>Javatech</title>
	<atom:link href="http://javatech.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://javatech.org</link>
	<description>The Bleeding Edge of Java Technology</description>
	<lastBuildDate>Wed, 24 Jun 2009 22:30:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hadoop Explained</title>
		<link>http://javatech.org/2009/06/hadoop-explained/</link>
		<comments>http://javatech.org/2009/06/hadoop-explained/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 07:10:21 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hadoop cloud]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/06/hadoop-explained/</guid>
		<description><![CDATA[
Cloudera Hadoop Training: Programming with Hadoop from Cloudera on Vimeo.
]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3584610&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3584610&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/3584610">Cloudera Hadoop Training: Programming with Hadoop</a> from <a href="http://vimeo.com/cloudera">Cloudera</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/06/hadoop-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Public Datasets on Amazon WebServices</title>
		<link>http://javatech.org/2009/06/public-datasets-on-amazon-webservices/</link>
		<comments>http://javatech.org/2009/06/public-datasets-on-amazon-webservices/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 06:35:10 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=93</guid>
		<description><![CDATA[Much to my excitement, Amazon is making public some really awesomely huge datasets to their Cloud customers.  These datasets are available as Snapshots which can be mounted as Volumes and then accessed by instances in EC2.  The datasets range in size from 10 Gigabytes to over 300 Gigabytes.  There are a couple [...]]]></description>
			<content:encoded><![CDATA[<p>Much to my excitement, Amazon is making public some <a title="Public Datasets on Amazon WebServices" href="http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=243">really awesomely huge datasets</a> to their Cloud customers.  These datasets are available as Snapshots which can be mounted as Volumes and then accessed by instances in EC2.  The datasets range in size from 10 Gigabytes to over 300 Gigabytes.  There are a couple of real perks that come along with this.  The first is that it doesn&#8217;t take a week to download the dataset in the first place &#8211; it took me only 5 minutes to get access to 50 Gigabytes of data.  Here&#8217;s how:</p>
<p>1) Locate the snapshotId you&#8217;d like to use ( <strong>snap-1781757e</strong> for Wikipedia Extraction (WEX))<br />
2) Create a volume from your AWS console &#8211; use the snapshotId here.  The volume size must be larger than the snapshot.  Also, I&#8217;ve found that I need to create the volume in the same zone as the instance I&#8217;m going to attach it to.<br />
3) Attach the volume to an instance.  Select the volume and then click &#8220;attach volume&#8221;.  Suppose for example you chose &#8220;/dev/sdf&#8221; as the mount point.<br />
4) ssh to your instance and mount the volume: <strong>mount /dev/sdf /vol</strong></p>
<p>There you have it.  But we&#8217;re not quite done &#8211; we still need to import all of this data into MySQL or Postgresql.  But that&#8217;s another post&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/06/public-datasets-on-amazon-webservices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon Cloud</title>
		<link>http://javatech.org/2009/06/amazon-cloud/</link>
		<comments>http://javatech.org/2009/06/amazon-cloud/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 05:41:03 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[s3]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/06/amazon-cloud/</guid>
		<description><![CDATA[WHEN YOU TERMINATE AN EC2 INSTANCE, IT'S LIKE YOU STUFFED THE CASE WITH TNT AND THREW IT INTO A CAMPFIRE.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with a Fedora system out in EC2 of late.  It&#8217;s pretty darn cool and I&#8217;ve got my system almost ready to start playing around seriously.  What this means is that I&#8217;ve got enough stuff installed on it to stop playing the install game.<br />
Being the type to optimize everything, I&#8217;m trying to get my system configured in the least amount of uptime.  So, I&#8217;ll have it up for an hour or two when I have a chance to work on it, and then if I make any good progress I&#8217;ll snap a new AMI and startup from this new AMI when I pick up the next time.<br />
It&#8217;s my first time using Fedora and I&#8217;m getting used to things being different from my comfort zone &#8211; Ubuntu.<br />
The first big difference is that &#8216;apt-get&#8217; doesn&#8217;t exist in Fedora.  But it does have an analog called &#8216;yum&#8217;.<br />
To install mysql on Fedora I simply ran:<br />
<strong>yum install mysql-server mysql</strong></p>
<p>To get apache web server with php/mysql support installed I just ran:<br />
<strong>yum install httpd php-mysql</strong><br />
This is every bit as easy as apt-get.  Making some really good progess.  So, the first time around I terminate the instance and figure I&#8217;ll pick up where I&#8217;ve left off.<br />
The next time when I come back to the AWS console &#8211; my instance isn&#8217;t there for me to restart.  Now, here&#8217;s the thing with the EC2 server instances :</p>
<p><strong>WHEN YOU TERMINATE AN EC2 INSTANCE, IT&#8217;S LIKE YOU STUFFED THE CASE WITH TNT AND THREW IT INTO A CAMPFIRE.</strong></p>
<p>That&#8217;s right, terminate doesn&#8217;t mean power-down.  It means obliterate.  Anything on the drives is G-O-N-E.  It is no more &#8211; it&#8217;s an ex-instance.</p>
<p>That was rather eye-opening.  So, back to the drawing board and this time, to be safe, I made sure to pick an AMI with EC2 utilities installed on it already.    I installed my software on the instance and this time even registered the services to startup automatically.<br />
<strong>service mysql start<br />
service httpd start<br />
</strong>I restarted the instance and tested that it came back up with apache and mysql running &#8211; it did.  Good enough &#8211; it was time to save this instance as an AMI into one of my S3 buckets.   After a bit of finagling I found the correct couple of incantations.<br />
<strong>ec2-bundle-vol &#8211;cert publicCert &#8211;privatekey privatePem &#8211;user awsAccountNumber</strong><br />
The above command will create an imageManifestXml which you&#8217;ll use in the following statement:<br />
<strong>ec2-upload-bundle &#8211;bucket s3BucketName &#8211;accessKey awsAccessKey &#8211;secretKey awsSecretKey &#8211;manifest imageManifestXml</strong></p>
<p>This took maybe ten minutes to run both of the above, but afterwards I had new starting point AMI to use &#8211; in theory at least&#8230;</p>
<p>I double checked everything by starting another instance ( before shutting down the good one ) with the new AMI and making sure that it passed snuff &#8211; which it did.  I shut down both instances and retired for the night &#8211; all of this to save 10 cents an hour.  But more importantly it is to understand the process.  No, it&#8217;s the money <img src='http://javatech.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
This virtualization stuff is really powerful &#8211; I&#8217;ll write some more on mounting Volumes and using existing Snapshots of open-sourced datasets soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/06/amazon-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discovering Roo</title>
		<link>http://javatech.org/2009/06/discovering-roo/</link>
		<comments>http://javatech.org/2009/06/discovering-roo/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 20:51:49 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Application Servers]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Web Frameworks]]></category>
		<category><![CDATA[aspectj]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[roo]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=77</guid>
		<description><![CDATA[I decided to follow along with the presentation given by Ben Alex during the SpringOne Keynote Address by Rod Johnson.
First &#8211; I have to install Roo and get the Roo shell up and running.  I&#8217;m really excited at this point because Roo does look really cool &#8211; really RAD!
So I download Roo and explode it [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to follow along with the presentation given by Ben Alex during the <a title="SpringOne Keynote Address by Rod Johnson" href="http://www.infoq.com/presentations/SpringOne-Keynote-Rod-Johnson" target="_self">SpringOne Keynote Address by Rod Johnson</a>.</p>
<p>First &#8211; I have to install Roo and get the Roo shell up and running.  I&#8217;m really excited at this point because Roo does look really cool &#8211; really RAD!</p>
<p>So I <a title="Download Roo 1.0.0.M1" href="http://s3.amazonaws.com/dist.springframework.org/milestone/ROO/spring-roo-1.0.0.M1.zip" target="_self">download Roo</a> and explode it out to where I explode all of my 3rd party tools and then open <a title="cygwin" href="http://www.cygwin.com/">cygwin</a> (I&#8217;m on Windows and am trying hard to move away from Dos&#8230;) and navigate to the new directory.  I find a bin directory with two scripts in it: roo.bat and roo.sh.  Sweet!  They have a linux version ( cygwin == linux in many ways ).  So I run roo.sh and get:</p>
<p><strong>./roo.sh</strong></p>
<pre style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 800px; height: 204px; text-align: left;" dir="ltr">Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/roo/bootstrap/Bootstrap
Caused by: java.lang.ClassNotFoundException: org.springframework.roo.bootstrap.Bootstrap
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: org.springframework.roo.bootstrap.Bootstrap.  Program will exit.</pre>
<p>OK &#8211; take a step back.  What have I done wrong here.</p>
<p>I back up a directory and also try <strong>./bin/roo.sh</strong>.  I look in the readme.txt and create the symlink for install on linux that they recommend:</p>
<p><strong>ln -s /path/to/roo/bin/roo.sh /usr/bin/roo</strong></p>
<p>I type in &#8216;roo&#8217; and get the same BootStrap Exception.</p>
<p>So then I invoke the wisdom of Google and learn that most everyone who encounters this error gets it because they are in Dos and are working in a different drive than where Roo is installed.  I&#8217;m on the same drive &#8211; but it&#8217;s not working in cygwin!  No hits on this somehow?!?  I find some other results which want me to additionally set an environment variable ROO_HOME.  I do this by running from the Roo install directory ( above bin, that is&#8230;):</p>
<p><strong>export ROO_HOME=`pwd`</strong></p>
<p><strong>env | grep ROO</strong></p>
<p>I still get the same problem (ClassNotFoundException: org.springframework.roo.bootstrap.Bootstrap), so I cave and go into a Dos prompt.  Well, first I add %ROO_HOME%\bin to my path, and *then* go into a Dos prompt.  I run &#8216;roo&#8217; and get the same Bootstrap Exception again.  But now, I am on the wrong drive, and cd to the same drive I installed Roo on &#8211; now things are working.</p>
<p>Time to even start using Roo in this example : <strong>15 minutes</strong></p>
<p>So, Roo is working now &#8211; I have a shell up and running.  I&#8217;m stoked because it really is cool.  It has &#8216;hint&#8217; as a keyword and tab-based auto-completion which is contextual &#8211; it auto-completes the correct things at the correct times.<br />
<a title="Creating a Project with Roo" href="http://javatech.org/article_yet_to_be_written">Creating a project with Roo</a> is a very nice experience : <strong>3 minutes</strong></p>
<p>I already have maven2 installed so I&#8217;m able to exit out of Roo and run &#8216;mvn eclipse:eclipse&#8217; and import the project into Eclipse : <strong>2 minute</strong>s</p>
<p>Wow, now we&#8217;re flying.  Except, wait, there a bunch of &#8220;.aj&#8221; files in my project.  Cool, <a title="Spring Roo Leverages AspectJ" href="http://javatech.org/article_yet_to_be_written">Roo is leveraging AspectJ</a>.  Suck, I don&#8217;t have AJDT plugin configured for Eclipse and I&#8217;m missing a bunch of the stuff Roo has added to my project ( 9 .aj files in all ).  Thinking this might not matter, I run the JUnitTest that Roo created for my project and see only 1 test being run &#8211; the demo has a bunch of tests being run ( added via AspectJ ).  Also, when I auto-complete on my entity class I created, I don&#8217;t get any of the framework added static methods.  Translation: I need to install the AJDT plugin for Eclipse: <strong>10 minutes</strong> ( http://download.eclipse.org/tools/ajdt/34/update ).</p>
<p>Now things are good to go &#8211; I now see the out-of-the box static methods added to my domain class ( Choice.java ).   And now when I run the JUnitTest I see that 8 new tests have been added and run.  But there&#8217;s something else stinky in the state of Denmark!</p>
<pre style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 800px; height: 40px; text-align: left;" dir="ltr">IllegalStateException: Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?</pre>
<p>No, the SpringAspects JAR is *NOT* configured as an AJC/AJDT aspects library!  I don&#8217;t know what the SpringAspects JAR is nor what it means to configure it as an AJC/AJDT aspects library.  Basically, this means you need to select the spring-aspects.jar to be in the Aspect Path of the AspectJ Build configuration of the project.  A picture is worth a 1,000 words here</p>
<div id="attachment_84" class="wp-caption alignnone" style="width: 310px"><img class="size-medium wp-image-84" title="aspectj_spring_aspects_configuration" src="http://javatech.org/wp-content/uploads/2009/06/aspectj_spring_aspects_configuration-300x170.jpg" alt="Adding spring-aspects.jar to AspectJ Build path" width="300" height="170" /><p class="wp-caption-text">Adding spring-aspects.jar to AspectJ Build path</p></div>
<p><strong>10 minutes</strong></p>
<p>So, we&#8217;re up to 40 minutes of time spent when the whole thing up until now should only be 5 minutes.</p>
<p>But wait, there&#8217;s more.  Now I find that I don&#8217;t have setters being woven into my Choice.java class by the Choice_Roo_Javabean.aj aspect.  I see the correct code in the aspect, but Eclipse&#8217;s autocomplete and the actual compilation fail when I attempt to access new Choice().setNamingChoice().    I can deal with this later because I&#8217;ve got to get on with the demo.</p>
<p>Next up &#8211; Roo will automatically update the companion aspect files it creates as new properties are added to the domain entity.  That is, if I simply add a new property called &#8216;description&#8217; to my entity, and I have roo running in the background, then the Choice_Roo_Javabean.aj is automatically updated with the new getter/setter methods, and the Choice_Roo_ToString.aj is updated to include description.  SUPER COOL.</p>
<p>On a tangent, it is not mandatory that these woven aspects dictate the toString and javabean parts of the entity class.  The class has annotations in it to specify that the framework will handle these concerns: @RooJavaBean, @RooToString.  There is also a @RooEntity which adds all of the dao-ish methods to the class.  This is a pattern taken from Grails.</p>
<p>At this point we have an autogenerated JavaBean and a companion TestCase that works.</p>
<p>What about the webapp?  Inside of Roo shell, we can now run:</p>
<p><strong>new controller automatic</strong></p>
<p>With a few arguments to generate the framework jsps, the wiring, the formBackingObject functionality and even the crud forms for the domain entity.  The ordering of the fields on the crud forms matches the order in which they appear in the java file.  Changing the order of properties in the java file will change their order in the ToString.aj and crud JSPs as well. <strong>2 minutes</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/06/discovering-roo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun to be bought by Oracle for $7.4 Billion</title>
		<link>http://javatech.org/2009/06/sun-to-be-bought-by-oracle-for-7-4-billion/</link>
		<comments>http://javatech.org/2009/06/sun-to-be-bought-by-oracle-for-7-4-billion/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 17:45:09 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=75</guid>
		<description><![CDATA[The mighty behemoth, proprietary squelchor of innovation, and extremely expensive Oracle is about to acquire the open-source, free, and always innovative Sun.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a little late on this to really consider it news in the sense that news is usually new.  And I must admit I was sceptical when I first heard it, but it&#8217;s true.  Sun themselves admit it : http://www.sun.com/aboutsun/pr/2009-04/sunflash.20090420.1.xml.</p>
<p>The mighty behemoth, proprietary squelchor of innovation, and extremely expensive Oracle is about to acquire the open-source, free, and always innovative Sun ( and with that Java!).  Anyway I look at this it sucks &#8211; for Java, at least.  This will, in my humble opinion, accelerate Java&#8217;s path to Cobol &#8211; which it is destined to become as more agile languages come to maturity and continue to grow in popularity ( ruby, python, erlang ).</p>
<p>Rod Johnson, with Spring, is singing an optimistic tune ( <a title="Rod Johnson talks about the future of Java" href="http://www.infoq.com/presentations/SpringOne-Keynote-Rod-Johnson" target="_self">Spring Keynote Address on Future of Java</a> ) .  One that talks about Java having reached maturity and that it doesn&#8217;t really need to evolve anymore.  C doesn&#8217;t really evolve &#8211; it does what it does and does it very well.  As Rod says, &#8220;It doesn&#8217;t pretend to be C#.&#8221;  Point taken.  He goes on to say that in many ways the innovation in the Java community has already moved outside of the Java core.  Language improvements include Groovy and Scala.  Framework improvements come in the form of Grails ( and, he doesn&#8217;t mention this, Seam ).</p>
<p>Rod&#8217;s address is largely true, but it is also to drum up excitement for their new application generation project ROO.  This gives alot of the functionality one would get from Rails or Seam, but does things within a shell rather than all command line.  This is actually kind of nice because the shell can keep track of the context each subsequent command is running in and also allows for some pretty snazzy auto-completion features.</p>
<p>Should we Javaheads run around screaming the sky is falling?  Probably not.  But if we don&#8217;t get up to snuff with Grails and new projects like Seam and Roo which look to make things a whole lot RAD-der, then we&#8217;d better accept our role as stewards to the next generation of Cobol applications.</p>
<p>One more thing &#8211; Ruby, for example, is still missing a lot of enterprise tooling which we take for granted in the Java world.  Applications like JConsole and JProfiler don&#8217;t yet exists &#8211; so another way to look at this is on the larger programming stage, where what we&#8217;ve learned with Java should be created for Ruby, Python, and Erlang to ease the passing of the torch when the time comes.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/06/sun-to-be-bought-by-oracle-for-7-4-billion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven2 &#8211; OutOfMemory</title>
		<link>http://javatech.org/2009/02/maven2-outofmemory/</link>
		<comments>http://javatech.org/2009/02/maven2-outofmemory/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 07:22:35 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Maven]]></category>
		<category><![CDATA[maven2]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/02/25/maven2-outofmemory/</guid>
		<description><![CDATA[Passing command line vmargs into mvn doesn&#8217;t work.  You have to set an environment variable MAVEN_OPTS like below:
MAVEN_OPTS="-Xmx1024m -Xms512m"
export MAVEN_OPTS
]]></description>
			<content:encoded><![CDATA[<p>Passing command line vmargs into mvn doesn&#8217;t work.  You have to set an environment variable MAVEN_OPTS like below:</p>
<pre style="margin: 0em">MAVEN_OPTS="-Xmx1024m -Xms512m"</pre>
<pre style="margin: 0em">export MAVEN_OPTS</pre>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/02/maven2-outofmemory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and replace in multiple files</title>
		<link>http://javatech.org/2009/02/search-and-replace-in-multiple-files/</link>
		<comments>http://javatech.org/2009/02/search-and-replace-in-multiple-files/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 08:19:45 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/02/25/search-and-replace-in-multiple-files/</guid>
		<description><![CDATA[If you ever need to search and replace strings throughout a bunch of files here&#8217;s a neat, somewhat alternative, way to do it.
for file in `ls **/*.txt`;do perl -pi -w -e &#8217;s/SEARCH_FOR_THIS/REPLACE_WITH_THIS/g;&#8217; $file; done
The nested &#8216;perl&#8217; command can work kind of like &#8217;sed&#8217;.  Here are what the arguments being passed in mean:
-e means execute the [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to search and replace strings throughout a bunch of files here&#8217;s a neat, somewhat alternative, way to do it.</p>
<p>for file in `ls **/*.txt`;do perl -pi -w -e &#8217;s/SEARCH_FOR_THIS/REPLACE_WITH_THIS/g;&#8217; $file; done</p>
<p>The nested &#8216;perl&#8217; command can work kind of like &#8217;sed&#8217;.  Here are what the arguments being passed in mean:</p>
<p><code>-e means execute the following line of code.<br />
-i means edit in-place<br />
-w write warnings<br />
-p loop</code></p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/02/search-and-replace-in-multiple-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java 101: building your java classpath from a lib folder</title>
		<link>http://javatech.org/2009/02/java-101-building-your-java-classpath-from-a-lib-folder/</link>
		<comments>http://javatech.org/2009/02/java-101-building-your-java-classpath-from-a-lib-folder/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 05:43:37 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/02/23/java-101-building-your-java-classpath-from-a-lib-folder/</guid>
		<description><![CDATA[OK &#8211; I admit it &#8211; my IDE and tools make me weak in many ways.  I was just having the hardest time getting my maven-managed project to run from a basic &#8220;java my.class.ClassName&#8221; command line invocation.  Why?  Because the freaking classpath is a million miles away from being a concern to me anymore.  So, [...]]]></description>
			<content:encoded><![CDATA[<p>OK &#8211; I admit it &#8211; my IDE and tools make me weak in many ways.  I was just having the hardest time getting my maven-managed project to run from a basic &#8220;java my.class.ClassName&#8221; command line invocation.  Why?  Because the freaking classpath is a million miles away from being a concern to me anymore.  So, jog the memory and immediately remember the -cp ( or -classpath ) option.  Also remember that I cannot specify a directory if I want to include all of the jars in that directory ( specifying a directory in the classpath will only load exploded .class files! ).</p>
<p>What I&#8217;ve got before me is a target/lib directory full of all of my maven2-managed dependencies.  I need to add each jar file explicitly into the classpath &#8211; barf!</p>
<p>Well, here&#8217;s a handy little shell script which will build that string for you:</p>
<p>for file in `ls lib`; do echo -n &#8216;lib/&#8217; &gt;&gt; classpath.txt;echo -n $file &gt;&gt; classpath.txt;echo -n &#8216;:&#8217; &gt;&gt; classpath.txt;done</p>
<p>Awesome &#8211; so just open the classpath.txt file and use that big &#8216;ol path however you want to.  Windows users would use a semi-colon instead of a colon above.  Also, remember that you need to specify the classpath option prior to the name of the class to run &#8211; otherwise the classpath is ignored ( as it is assumed to be an argument to the program and not a jvm option ).</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/02/java-101-building-your-java-classpath-from-a-lib-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL &#8211; importing data</title>
		<link>http://javatech.org/2009/02/mysql-importing-data/</link>
		<comments>http://javatech.org/2009/02/mysql-importing-data/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 22:09:54 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/02/22/mysql-importing-data/</guid>
		<description><![CDATA[I needed to bulk load data into a MySQL instance a bit ago and here&#8217;s the way to do it:
You should login to mysql and select the correct database/schema prior to running that command.
mysql -uusername -p
use &#60;schema&#62;;
load data local infile 'data.csv' into table &#60;tableName&#62;
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
(&#60;columnName1&#62;, &#60;columnName2&#62;, &#60;columnName3&#62;) ;
]]></description>
			<content:encoded><![CDATA[<p>I needed to bulk load data into a MySQL instance a bit ago and here&#8217;s the way to do it:</p>
<p>You should login to mysql and select the correct database/schema prior to running that command.</p>
<p>mysql -uusername -p</p>
<p>use &lt;schema&gt;;</p>
<p><code>load data local infile 'data.csv' into table &lt;tableName&gt;<br />
fields terminated by ','<br />
enclosed by '"'<br />
lines terminated by '\n'<br />
(&lt;columnName1&gt;, </code><code>&lt;columnName2&gt;</code><code>, </code><code>&lt;columnName3&gt;</code><code>)</code> ;</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/02/mysql-importing-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Conventionally Annotated Configuration &#8211; Spring, Hibernate, Eclipse</title>
		<link>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/</link>
		<comments>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 07:31:29 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/02/18/a-conventionally-annotated-configuration-spring-hibernate-eclipse/</guid>
		<description><![CDATA[I&#8217;m starting on a personal project and decided I was going to take the time to do things right.  This means different things to different folks, but to me it basically entails:

Using the latest and greatest versions of everything.  Eclipse 3.4.  Hibernate 3.3.1.  Spring 2.5.6.  Tomcat 6.  Maven 2.0.9.  Java 6 ( 7? ), DWR [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting on a personal project and decided I was going to take the time to do things right.  This means different things to different folks, but to me it basically entails:</p>
<ol>
<li>Using the latest and greatest versions of everything.  Eclipse 3.4.  Hibernate 3.3.1.  Spring 2.5.6.  Tomcat 6.  Maven 2.0.9.  Java 6 ( 7? ), DWR 3.0.</li>
<li>Using Eclipse plugins to do as much as possible without causing headaches</li>
<li>Using as little XML configuration as possible &#8211; conventions, conventions, conventions!!!</li>
<li>Using JPA annotations for ORM classes.</li>
<li>Using Annotations for IOC dependencies.</li>
<li>Using Annotations for Transactional demarcation.</li>
<li>Using Annotations for MVC mappings.</li>
<li>Using very basic JSTL-based JSP&#8217;s for views.</li>
<li>Using Sitemesh to present a uniform look and feel across all pages.</li>
<li>For icing on the cake I&#8217;d like to also include GWT components.</li>
</ol>
<p><strong>Using the latest and greatest versions of everything</strong><br />
If you install Eclipse 3.4 first, and then install the Maven Integration plugin, it will greatly simplify things.  Just add Maven Integration to your project and then use &#8220;Add Dependency&#8221; option to quickly scour the entire repository and find the exact groupIds, artifactIds, and versions you want.  It also has a great view of the dependency hierarchy!  Getting all of these bleeding-edge versions to play nice together has its fair share of challenges.</p>
<p><strong> Using as little XML configuration as possible</strong></p>
<p><strong>Using Eclipse plugins to do as much as possible without causing headaches</strong></p>
<p>I already mentioned Maven Integration above to help with getting the LAGV of all the technologies being used.  Also of great value and import are SysDeo and  Subclipse.  Sysdeo is great for deploying and debugging your webapp in Tomcat.  Subclipse is great for seamless integration with an SVN repostiory.  Yes &#8211; use SCM on personal projects, you never know when you&#8217;ll need to revert or bring the code down onto a new machine.</p>
<p>But where do we draw the line here?  When do we have so much annotation cruft that an externalized xml configuration will seem like the ideal solution ( from whence we currently come in search of clarity! ).</p>
<p><strong>Using very basic JSTL-based JSP&#8217;s for views</strong><br />
OK &#8211; well, tonight I was getting ready to put together the first couple of jsp&#8217;s now that the @Controller mappings are working and the pages are being served correctly.  I&#8217;ve got the method mapped correctly with @RequestMapping and I&#8217;ve got the model being put into pagescope with @ModelAttribute.  I&#8217;m ready to loop through a List using JSTL forEach.  But wait, can this possibly be true?  Tomcat6 has no implementation of JSTL.  JSTL 1.2 is the LAGV and the JSTL 1.1 is abandoned.  Only *Glassfish* ships with the reference implementation of JSTL 1.2?!?  Oh brother.  Thanks to <a title="Tomcat6 depends on Glassfish?!?" href="http://www.mularien.com/blog/2008/02/19/tutorial-how-to-set-up-tomcat-6-to-work-with-jstl-12/">Peter Mularien for writing a nice post</a> informing me of this.</p>
<p>As if needing to download and install glassfish in order to get the JSTL 1.2 implementation jars for Tomcat6 wasn&#8217;t bad enough, well I hit a couple more snags after that.  First of all, I want to know who decided on the namespaces for JSTL 1.1 vs 1.2.  Here they are:</p>
<p>1.0  == &lt;%@taglib prefix=&#8221;c&#8221; uri=&#8221;http://java.sun.com/jsp/core&#8221; %&gt;</p>
<p>1.1 &amp; 1.2 ==&lt;%@taglib prefix=&#8221;c&#8221; uri=&#8221;http://java.sun.com/jsp/jstl/core&#8221; %&gt;</p>
<p>I mean all they did was add the &#8220;jstl&#8221; into the path?!?  I&#8217;m supposed to remember this?  OK &#8211; I&#8217;ll try harder to remember for next time.</p>
<p>Then, I learned that Maven2 doesn&#8217;t copy &#8220;system&#8221; provided jars into WEB-INF/lib by default and they need to be placed there manually as part of the project.  So, the appserv-jstl.jar I copied from glassfish wasn&#8217;t being included because I linked Maven to it as a system ( vs provided, or compile, or test, etc&#8230; ) dependency.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
