about greg
outofmemory: greg's blog
projects


Ganymede JSP Validation Issue

November 14th, 2008 @ 12:01pm by Greg

Yesterday I had a heck of a time trying to figure out my my JSPs weren’t passing validation since I upgraded Ganymede from 3.4.0 to 3.4.1. There was a consistent issue where the JSP Validation did not like my scriptlet code, even when I dumbed it down to try even the simplest scriptlet. The validation errors looked like:

Syntax error on token "}", delete this token
Syntax error on token "catch", Identifier expected
Syntax error, insert "Finally" to complete TryStatement

I actually found out what my problem was through the Eclipse Web Tools usergroup. The issue for me was the use of the Spring form custom tag library. If you self-close the tag…

<form:errors path="*" />

…then you get the goofy JSP validation error. If you close the tag as if there was body content…

<form:errors path="*"></form:errors>

Then the error goes away. I need to follow-up with a bug for the Ganymede team.

Subclipse Tip on svn:keywords

November 6th, 2008 @ 11:56am by Greg

Keywords in SVN are used to insert dynamic information about a file, into the file, presumably in a comment header.  The SVN manual discusses keywords, however when I was configuring my repository and eclipse projects, I had trouble getting them to update on commit.  I found a blog entry that discussed the keywords property in the server configuration, so I hopped on my server and set up the configuration accordingly.  I restarted the service and commited a file with the following header:

/**
 * @version svn:$Id$
 */

After the commit, the file did not update as expected. I did some further digging and found a forum post that discussed another option where you set the property on the file. So I experimented with that using the Team > Set Property … command in eclipse on a single file. Setting the property name to svn:keywords and value to Id. I made a simple change to my file and committed it again. Voila! It worked.

The last step was to apply this keyword to all of my files…and preferably not manually. The answer was to go to the root of my project and set the property there, noting to check the Set property recursively check box. If I want to add more keywords later on, I can by going to the root, modifying the svn:keywords property by adding other keywords (refer to the manual again) separated by a single space.

Cubs Medicine: Soraino (or Lee) for Ichiro

October 7th, 2008 @ 12:17pm by Greg

When you get around to talking about the Hot Stove for the Cubs, consider a deal for Ichiro leveraging either Soriano or Lee. This move works on the following levels:

- Seattle’s players hate Ichiro.
- Seattle won’t want to lose their marquee player without getting a marquee-level player in return.
- Seattle is in flux and would be interested in making a deal.
- Their contracts are similar: Ichiro’s is 09:$17M, 10:$17M, 11:$17M, 12:$17M and Soriano’s is 09:$16M, 10-14:$18M. This is where the Cubs might have to add value to a deal since Ichiro is cheaper, albeit older by 2 years, than Soriano. Throw in Guzman or Samardzija. Neither projects to more than relief or 4th/5th starter roles.
- Cubs would get their lead-off hitter (career .377 OBP)
- Cubs would break-up the Soriano-Ramirez-Lee righty tri-fecta which has two years of post-season stank on them.
- Hoffpauir could play LF and platoon with DeRosa & Fontenot (cycling DeRosa back and forth from 2B to LF).
- Fukudome would have a countryman to play with in the OF. He seemed overwhelmed and lost in the second half and getting a fellow Japanese player could do wonders for his play in ‘09.

Or…trade Lee instead of Soriano…you still get all the same benefits and Seattle might even like this more as Lee is more of a team guy and costs less than Soriano. Talk this up…I think this is a realistic move that could actually give Cub fans hope in 2009.

Cubs Roster Check

October 7th, 2008 @ 9:58am by Greg

Here’s my quick take on what to do with the Cubs roster. There’s not much to do unless we can make a deal or score a high OBP lefty free-agent CF:

Cotts - contract up - re-sign
Fox - contract up - let go
Gaudin - contract up - re-sign
Guzman - contract up - re-sign
Howry - contract up - let go
Lieber - contract up - let go
Marmol - contract up - re-sign
Marshall - no data available - re-sign … take Harden’s spot in rotation
Samardzija - 5y/10m til 2011
Wood - contract up - re-sign
Dempster - contract up - re-sign
Harden - contract up - 2009 option @ 7m - decline
Lilly - 4y/40m til 2010
Marquis - 3y/21m through 2009
Weurtz - contract up
Zambrano - 5y/91.5m til 2012

Blanco - 2009 option @ 3m - accept
K.Hill - contract up - let go
Soto - contract up - re-sign

Cedeno - contract up - re-sign
DeRosa - 3y/13m through 2009
Fontenot - contract up - re-sign
Hoffpauir - contract up - re-sign
Lee - 5y/65m til 2010
Ramirez - 5y/75m til 2011
Theriot - contract up - re-sign

Edmonds - contract up … replace with FA or Pie … keep if can’t find good lefty replacement
Fukudome - 4yr/48m til 2011
Johnson - contract up - re-sign
Pie - contract up - re-sign
Soriano - 8y/136m til 2014
Ward - contract is up … replace with Hoffpauir

Contract data courtesy of Cot’s Contracts.

Synchronization Locks in Standard Taglibs Earlier Than v1.0.6

October 1st, 2008 @ 9:08am by Greg

Sometimes an oversight can lead to interesting results. We were testing a servlet-based application and in our test scripts, we had a hitch where if the script encountered an error, the re-try cycle didn’t have think time included. Which means anytime the script encountered an application error, it would then send re-try requests at a sub-second (inhuman) rate.

This increased our load from 10 pages per second to over 100 … our first indicator that something was wrong. We saw a corresponding spike in CPU from 8% to over 90% as the single JVM system tried to handle this new load. The application seized and thread dumps uncovered an interesting side effect. Read the rest of this entry »

Frack the Vote?

September 12th, 2008 @ 12:55pm by Greg

If you are a Battlestar Galactica fan, you’ll appreciate this campaign parody to McCain and Palin.  Good for a chuckle on a Friday.

Google Chrome Beta

September 2nd, 2008 @ 10:08am by Greg

I really like the process manager aspect of Google’s new browser Chrome.  Check out their compelling comic explanation and pick up the Beta after 1pm CST today.

I also enjoyed John Resig’s take on where this takes browsers and the web in general.

Operation MacBook Recon

September 1st, 2008 @ 8:37am by Greg

My mom was kind enough to let me borrow her MacBook this weekend so I could get a feel for OS X and maybe tackle some HelloWorld initiatives in Cocoa.  Unfortunately, I didn’t get a chance to fire it up until this morning due to two days of BBQs (my stomach is not complaining).  I hopped out to Dunkin Donuts, got my large cream & sugar, and returned home eager to start coding in this new, strange world.

Alas, my first task was to find XCode, the free IDE from Apple for developing anything Mac-related.  My Mac-savy uncle told me that XCode comes with OS X so there’s nothing to buy.  True words, though, after combing through the Finder list, I was unsuccessful in finding the darn thing.  Then it dawned on me that XCode may not be a default installation option and after a quick trip to the Apple Developer Center (ADC) I found out why.  XCode is a weighty 1+ GB depending on the version.

Version.  Hmm … the download page for XCode 3.1 mentioned that its built for “Intel or PowerPC Mac running Leopard.”  Well nuts.  Even being a Mac newbie, I remember that my Mom told me that her MacBook is on Tiger and not running Leopard yet because she’s in the middle of an iMovie/iPhoto project and heard there were changes moving from 10.4 to 10.5 in that software.  Thwarted in my first attempt, I would not be denied.  I quickly googled for “XCode on 10.4″ and learned that the ideal version of XCode for Tiger is 2.4.  Googling for XCode 2.4 came up with a couple links to XCode (I ignored these, the URIs seemed generic and they just pointed to the latest XCode downloads) and a legacy link to the XCode 2.4 download.  Huzzah!

I downloaded the disk image (entertained by the DMG extension; pronouncing it as “damage”) and when its done I’ll install and finally get to work!  I only have an hour this morning, so I’ll be installing and starting my development poking and prodding later today.

OutOfMemory Errors During Deployment

August 25th, 2008 @ 7:21am by Greg

Some development teams I work with have been reporting an issue where the JVM runs out of memory during deployment of an application using our standard heap size settings (initial 2 GB and maximum 2 GB). When they changed the initial heap size from 2 GB to 512 MB, the no longer receive the OutOfMemory error. To understand what’s happening, continue on. Read the rest of this entry »

Understanding Sorting Algorithms

August 13th, 2008 @ 8:26am by Greg

Chris Coyier found a great visualization of sorting algorithms created by David R. Martin, an Assistant Professor at Boston College. If you’re new to sorting algorithms and Big O notation, check out the textbooks he references in addition to enjoying the fantastic visual representation.