When using Jetty in an embedded manner with no extraction of war files, Jetty has a array index exception when trying to use the fill method within ResourceCache. I have not been able to reproduce this problem when simply using the out of the box jetty. The following code shows the problem that I am seeing.
protected void fill(Content content)
I've attached a patch that addresses the problem, but I don't believe that it handles the root of the problem. For some reason, the length in ResourceCache.java:146 returns the correct value, but the fill method sometimes returns -1.