0
votes

I`m trying to run my sbt project, based on TestNG, but when I run it I get error

Error:scalac: error while loading ITestContext, class file '~.ivy2\cache\org.testng\testng\jars\testng-6.8.jar(org/testng/ITestContext.class)' is broken (class java.lang.NullPointerException/null) Warning:scalac: Class com.google.inject.Module not found - continuing with a stub.

I don't see com.google.inject in dependencies tree and don't know, how to add it manually

2
SBT version is 0.13.6 - Dmitry Meshkov

2 Answers

0
votes

What version of SBT are you using? I experienced that same issue when I was using SBT version 0.13.1. Upgrading to 0.13.5 or 0.13.6 resolved the NullPointerException for me.

As for

[warn] Class com.google.inject.Module not found - continuing with a stub.

I am still uncertain why that is cropping up. For myself it runs 7 times for both my test classes and my main classes but does not prevent functionality.

0
votes

Adding:

libraryDependencies ++= {
    "com.google.inject" % "guice" % "3+",
    "org.glassfish.hk2" % "custom-resolver-example" % "2+",
}

fixed the problem, but I`m not sure, that it's good solution.