Search code examples
guicextext

How do I update Guice for an XText project?


I have an XText project that I am trying to write tests for. The problem is that the tests on the compiled code fail with an uninformative trace starting with:

com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: org/eclipse/jdt/core/compiler/CategorizedProblem
    at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
    at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)

I have read that it is a problem with an old version of Guice (https://github.com/google/guice/issues/757).

However, whilst I have downloaded the latest Guice.jar I cannot understand how to get XText to use it over previous versions.

I have plug-in dependencies such as com.google.inject that I figured should point to the latest Guice.jar, but pointing them there did not help.

Any ideas?


Solution

  • the error says: jdt is missing on the classpath of the test project. make sure you add it by means of the build system you use (manifest / pom / build.gradle / ant / ...)