I read the other post about WrappedResultSet, makes sense, but it causes a problem with our application:
JBoss throws an IllegalArgumentException when trying to call getResultSet() if the rs is null. This can happen if, for example, you do an insert and an update count is returned. According to the API javadoc for Statement.getResultSet(), the method should return null if the result is an update count. In our case, we can work around this by checking the return value of Statement.execute() instead of getResultSet(), but I don't think the exception is correct behavior.
Since no one commented on this, I'll go ahead and add this as a bug.