Exception in thread "main" java.lang.RuntimeException: StackTraceElement size 0? stack: [java.lang.Thread.getStackTrace(Thread.java:1436), com.avaje.ebeaninternal.server.core.DefaultServer.createCallStack(DefaultServer.java:1842), com.avaje.ebeaninternal.server.core.DefaultServer.createQueryRequest(DefaultServer.java:1083), com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1353), com.avaje.ebeaninternal.server.querydefn.DefaultOrmQuery.findList(DefaultOrmQuery.java:834), unittest.RefMain.main(RefMain.java:35)] at com.avaje.ebeaninternal.server.core.DefaultServer.createCallStack(DefaultServer.java:1868) at com.avaje.ebeaninternal.server.core.DefaultServer.createQueryRequest(DefaultServer.java:1083) at com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1353) at com.avaje.ebeaninternal.server.querydefn.DefaultOrmQuery.findList(DefaultOrmQuery.java:834) at unittest.RefMain.main(RefMain.java:35)
And in JDK 6 the stack elements has reduced by 1 (we ignore the first x elements in the stack).
That is, Ebean needs to ignore a little bit less of the stack now.
You won't hit this unless you run in JDK6 with an Ebean query directly in a main method (and not nested further).
Fixed in HEAD. ( DefaultServer IGNORE_LEADING_ELEMENTS)