Community
Participate
Working Groups
I get such error when I try to do something in my roo project java.lang.NoClassDefFoundError at org.aspectj.weaver.bcel.ClassPathManager.addPath(ClassPathManager.java:110) at org.aspectj.weaver.bcel.ClassPathManager.<init>(ClassPathManager.java:84) at org.aspectj.weaver.bcel.BcelWorld.<init>(BcelWorld.java:285) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:841) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:253 ... ker.run(Worker.java:60) Compile error: NoClassDefFoundError thrown: Could not initialize class org.aspectj.weaver.bcel.ClassPathManager$JImageEntry
Happens on Linux when trying to build Eclipse plugins of RCPTT Runtime.
Are you possibly passing a classpath with a jrt-fs.jar entry when working on a JDK less than 9? I can imagine that would cause this. Rather then ignoring jrt-fs.jar we assume you passed it because you are working on Java9+ and attempt to use the JDK to work with it - if the JDK is in fact Java8 or lower we will not find those JDK classes and I think that could cause initialization problems in JImageEntry.
Actually I see what could be happening here, it is perhaps because the filesystem initialization is done in static initialization of the class rather than when actually required. Changed it around.