When I try to deploy ejd-ear, web-ear on to glassfish server. I added an ejb client dependency in web project. The ejb-ear deploys successfully. But when I try to deploy web
Had the same exception recently with JUnit. The situation was like this:
@SuiteClasses({MyTestClass.class})
public class MySuite {
...
}
Problem is that JVM was unable to process MyTestClass because it was missing dependencies in the classpath (another JAR file was missing). But the exception provided no information on which class was missing.
Solution was to temporarily add a static initialization block to MySuite, that instantiates MyTestClass:
@SuiteClasses({MyTestClass.class})
public class MySuite {
static {
new MyTestClass();
}
}
this causes JVM to run the static block first, try to instantiate MyTestClass, find out the missing class and report a proper exception. Then you can add the missing dependency and remove the temporary static block.