Getting "java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl" while running testNG tests

We’ve been using Gradle 1.0-milestone-8a for quite a while to build our code and execute our testNG test suite. Today I modified some existing code that is exercised by the tests and now I’m getting a ClassNotFoundException when building from Gradle (but it works just fine running TestNG directly from Eclipse).

The stack trace is at https://gist.github.com/4042222

The dependencies block of my subproject’s build.gradle file is at https://gist.github.com/4042295. “JSR311API” contains the RuntimeDelegateImpl class that doesn’t seem to be available when running the tests. All the dependencies are defined in the top-level build file and they seem to be 100% correct.

If there’s any other information I can provide for troubleshooting please let me know!

The jsr311-api Jar doesn’t seem to contain a ‘RuntimeDelegateImpl’ class, only a ‘RuntimeDelegate’ interface. So your tests are probably missing a dependency.

Oh wow that’s embarrassing. I really need to pay closer attention. Thanks Peter!