2010/08/01

Solving java.lang.SecurityException when adding Hamcrest in Eclipse

Added the full version of Hamcrest 1.2 to my Eclipse project today and got a java.lang.SecurityException as soon as I tried to run my unit tests:

java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:807)

After some fruitless googling, I finally came across this post. Don't entirely follow the reference to plugins, but the intent seems pretty clear. After editing my project's build order so Hamcrest is before JUnit4, the problem went away. Definitely looking forward to trying out more Matcher style asserts in my unit tests.

2010/07/22

Style a GXT Grid Row Using GridViewConfig

At work, we're using Sencha's Ext GWT library for much of our GWT based application. A few weeks back, I needed to implement some functionality to style rows in the grid based on information in the model data. After struggling through a number of poor approaches, I found GridViewConfig, which sorted things out nicely. While the logic for determining style in our app is more complex, this simple case demonstrates the principle:


Tho I've found the CSS side of things to be more finicky than I would have hoped:

2007/04/26

Java Introspection

About two weeks ago at work we got into a classic "works fine in development / doesn't work in staging" situation. I finally tracked it down to the fact that development and staging are running slightly different versions of Java. This surfaces because one of the Struts forms doesn't follow the standard for indexed properties. Evidently, version A of Java 1.3 handles introspection differently than version B. After working this out, I was able to jam the JRE from WebSphere in staging into the appropriate place in WSAD and now development breaks just like staging. Apparently this isn't an uncommon issue in Java 1.3 land, but from newgroups it sounds like it generally surfaces with an InvalidArgumentException rather than silently failing.

2007/02/08

The Internet is a Series of... Pipes?

I spent some time playing around with Yahoo Pipes tonight and I have to say it's a blast! I didn't build a particularly revolutionary pipe, but it was fun and intuitive. To Yahoo's credit, they managed to distract me from my GWT experiment :) which is the other technology I'm playing with that is surprisingly fun.