June 6th, 2009 @ 3:58pm by Greg
I was working on a Spring project this morning and while I was re-writing my build script I ended up leaving out some key libraries during WAR builds. When the application was deployed to Tomcat, I tried to start it up using the Tomcat admin manager and received an error regarding my application’s context being invalid. The server logs weren’t much help as there was merely a single line stating:
SEVERE: Error listnerStart
After some GoogleFu, I found a thread on the SpringSource forums with a great tip on where to debug the application to find the issue. Dropping a break point in the ContextLoaderListener where you see:
this.contextLoader.initWebApplicationContext(event.getServletContext());
Start your application using Tomcat’s admin manager and your break point will catch this line. Allow one Step Return and view the ‘t’ variable in your runtime variables (upper right-hand corner). You’ll see the offending exception.
This listener class is acting as the bootstrap to start up the Spring container, so when this call fires, it rips through all the XML and builds your beans, etc. This is why applications die before they start … any exception thrown during the bootstrap or bean creation phases will kill the application.
Thanks to SpringSource forum user “adam_jh”!
Tags: Eclipse, Spring, Tomcat
Posted in Eclipse, Spring Framework, Tomcat | No Comments »
May 5th, 2009 @ 1:12am by Greg
Owen Augustus was born on 4/20 @ 8:15pm! He and Kristin are doing great … I couldn’t be more proud of my family.
As for my side projects, my iPhone application was nearly completed when I read about Blizzard sending cease & desist letters to all active iPhone application authors who have done any work on their game-related property. So much for tackling that niche community…oh well, it was a good learning experience.
On the web front, I spent some time during my paternity leave working on some design tweaks for my MLB boxscore website (Boxscore Junkie). Still have a lot of ideas for it but I am also working on new iPhone application ideas so my time will be split once again.
Tags: Boxscore Junkie, GAE
Posted in Google App Engine, Miscellaneous | No Comments »
April 8th, 2009 @ 5:34pm by Greg
Two bits of news today:
- It’s here! Java is now officially supported on GAE. Exciting news and I’m ready to finally spend the time learning the datastore now. Learn more from the source.
- Standford is posting their iPhone Development course free online via iTunes. Follow along at the course website.
There’s never enough time in the day, is there? So many things to learn…
Tags: GAE, iPhone, Java, Objective-C
Posted in Google App Engine, Java | No Comments »
March 19th, 2009 @ 9:01am by Greg
NYTimes.com has a story on IBM preparing to purchase Sun Microsystems for about $10 a share. There are no confirmations from top executives, but Gartner’s analysis makes sense.
“The technologies of greatest interest to I.B.M. are Java and Solaris, and those are notably not hardware technologies,” said David M. Smith, an analyst at Gartner.
As a Java engineer, there are a couple of things that hit me right away. What would this mean for the NetBeans and Eclipse? They are completely separate IDEs with various pluses and minuses. Personally, I like Eclipse for almost all web development thanks to open source plug-ins for PHP, Python, HTML/CSS/JavaScript. Rich-Client Platform development is also a value-add Eclipse brings to the table as many companies are building RCP suites with reuseable components that operate both online and offline. Where NetBeans excels (in my short experience with the product) is in their GUI editor for Swing development. Any developer who has written AWT/Swing code can probably attest to the convenience of the drag-and-drop palettes opposed to prgrammatically aligning your GridBagLayout containter within a FlowLayout JFrame…but I digress.
Secondly, what will happen to Glassfish in the face of WebSphere? Would IBM try to consolidate? Would they let the Sun developers and researchers continue their work with the free application server?
As an infrastructure engineer, you need to ask the long-term question of why would IBM support Solaris when it is heavily into other flavors of Unix? Currently it is competitive business between the two entities Sun and IBM. But if they were to be owned by the same parent, would it be fiscally prudent to continue to develop both paths? I can’t imagine it would be, which would reduce the rate at which we grow these technologies (given that competition is the greatest motivation for innovation). Granted, there’s a lot of customers out there who will be impacted and a lot of contracts on the books for years to come that would prevent IBM from potentially shutting down the Solaris side of things. Or maybe IBM moves their Linux resources into the Solaris space? Interesting to ponder.
I’ve probably raised a lot of fantasy questions here, but it’s worth pondering. The NYTimes article talks about IBM/Sun building a Java front against Microsoft…well…that would certainly be a formidable company for sure and would most likely ensure that Java stays at the forefront of software technologies for the next decade or two at least.
Tags: Eclipse, Glassfish, IBM, Java, NetBeans, Sun
Posted in Miscellaneous, WebSphere | No Comments »
February 19th, 2009 @ 2:19am by Greg
Been awhile since I posted, so I figure I’d chime in about the MacBook I bought at the end of January.
After getting used to way the deskop and applications interact, it’s pretty smooth to get around. I really love the Command+Space Spotlight shortcut…Windows needs this feature in their next OS. Finder is pretty solid, though I’ve yet to figure out why sometimes I can see files in Finder and sometimes I can’t, or, sometimes I’ll see them on the file system using Terminal but still can’t find them in Spotlight or Finder. Strange … I must be doing something wrong.
I’ve made it about halfway through Cocoa Programming for Mac OS X and half to say I am really enjoying it. It’s definitely got the feel of the RCP dabbling I did in Eclipse but it feels like there is some stronger third party at work.
I also got Apache and PHP configured and running (comes with!), and installed MySQL. In addition to LAMP, I installed the Google Application Engine and copied over my applications from my Vista machine. I really like the GAE launcher that is installed…a nice GUI interface to launch applications from, look at logs, and manage multiple apps / port numbers running off the app server script.
Long story short, I am very impressed with the Mac and I haven’t even gotten into iMovie or iPhoto. Next on my plate is to finish my first iPhone application and to setup my Java development environment here on Leopard. Oh, and I need to figure out if I want a local SVN or try out this GIT version control system…to be continued!
Tags: Cocoa, Leopard, Objective-C
Posted in Cocoa, Objective-C | 2 Comments »
January 20th, 2009 @ 10:49am by Greg
During one of my project engagements I found that the application was leaking by taking on a lot of Strings and character arrays over time. Using heaproots, I was able to identify the container as the class instance of org.apache.taglibs.standard.lang.jstl.ELEvaluator. This class evaluates Expression Language (EL) expressions and caches them for performance, as each expression is translated into an object representation of that expression that is later used for processing. What that means, though, is that your expressions cannot be dynamic, or else you will leak out over time as the cache is very plain and does not have a limit, nor does it purge least recently used entries like an LRU cache.
Read the rest of this entry »
Tags: EL, JSP, JSTL
Posted in Java, Programming, Web Hosting | 2 Comments »
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…
…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.
Tags: Ganymede, JSP, Spring Framework
Posted in Java, Programming, Spring Framework, Web Hosting | 3 Comments »
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.
Tags: Eclipse, Subclipse, SVN
Posted in Programming | No Comments »
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 »
Tags: Java, JSTL, synchronization
Posted in Java | 1 Comment »
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.
Tags: BSG
Posted in Miscellaneous | No Comments »