Thursday, March 25, 2010

Jetty and JSPs

After enabling JSP support in embedded Jetty 1.7,  I got the following error

jetty PWC6033: Unable to compile class for JSP

I had to add tools.jar from the JDK\lib directory to get this to work properly.

Monday, March 22, 2010

Selenium Server doesn't use the newest version of ant

I'm using a neat little tool called Selenium to automate some web tests (open browser, click here, etc), and running those tests in Fitnesse.  However, when trying to integrate my tests with some load-process-these-files work that another team member had done, I repeatedly got the error

Failed executing Ant target [run-job]: The type doesn't support the "osfamily" attribute.

Googling revealed that the Ant exec type didn't get added to Ant until 1.7, so you were likely using the wrong version of the ant.jar.  But I knew that both my Eclipse Ant plugin and my installed ant at ANT_HOME were both 1.7.1.  Mysterious.

Hours of troubleshooting ensued: turning all log levels up to TRACE (omg SO SO much output), poring over classpaths, deleting every errant ant.jar on the system (even those not in classpath), fresh checkouts.

My colleague finally added the -verbose option to the commandline when running tests, and lo and behold, we saw that ant dependencies were being loaded out of the selenium-server.jar, because it was first in the classpath.  Who knew those bad boys were hiding in there?

So the solution is to place the jar last in the classpath, so ant gets picked up from something more recent first.

Nearly four days later, I can actually start work on my tests again.  Whew.  Developers have straaaange problems.

Tuesday, March 9, 2010

Tomcat integrated with Eclipse

If you're using Tomcat inside Eclipse, sometimes the processes Eclipse thinks it stopped aren't really stopped.  When you try to stop and start the Tomcat server, you end up getting errors that are something like "ports (x,y,z) are already in use."

There are usually leftover javaw.exe processes that are hanging out and actually still are using that port, even though they aren't responding to the ports' activity anymore.  Killing those off does the trick (although a reboot obviously fixes the problem too, it's a huge pain in my butt when I've got ten applications all running and just where I want them).

Monday, March 1, 2010

Gmail's prompting me for my password in Thunderbird

Even though my company switched to using Google for everything (mail, docs, etc) I just wasn't willing to give up the things that I feel Thunderbird gives me for mail sorting and scheduling.  We can have a screaming argument about this all day (and I have), but sometimes you just like the way you're doing things, and don't want to give up your tool.

Anyways, I've been struggling for a while with Thunderbird's calendar integration with Google Calendar-- every once in a while, it will prompt me over and over again for my password, and even though I am SURE I am typing it right, and have checked the "please will you please PLEASE remember this in the future" box, it keeps popping up the password prompt.

And man, if I thought I had some reasons to like Seth Godin before, hoooo boy is he my personal hero now.  He has a post here that says that Google might just be getting stuck on a captcha issue.  And sure enough, that fixed my problem on the first try.

So there is a hidden link that takes you to a little captcha prompt, which apparently resets the flag that says you might be someone suspicious.

Good stuff.

Does a row exist?

Mostly just tired of looking this one up in other places, because my brain can't seem to hang onto the syntax:

SELECT IF EXISTS (
SELECT column
FROM table
WHERE some stuff is true )
THEN 1
ELSE 0
ENDIF
FROM SYS.DUMMY