I am upgrading from 2.0.1 to 2.1.4.
I have updated to scala 2.11 and the otter things in the migration guide is accounted for.
I have also copiy/pasted the enigine, ideapathhelper and recorder files into the old ones.
However when running the Engine, i get the error:
Error:(5, 38) Reference to method getClassLoader in class Class should not have survived past type checking,
it should have been processed and eliminated during expansion of an enclosing macro.
val gatlingConfUrl: Path = getClass.getClassLoader.getResource(“gatling.conf”).toURI
^
Clicking on it, the IDEAPathHelper I get the newly pasted code:
import java.nio.file.Path
import io.gatling.core.util.PathHelper._
object IDEPathHelper {
val gatlingConfUrl: Path = getClass.getClassLoader.getResource("gatling.conf").toURI
val projectRootDir = gatlingConfUrl.ancestor(3)
val mavenSourcesDirectory = projectRootDir / "src" / "test" / "scala"
val mavenResourcesDirectory = projectRootDir / "src" / "test" / "resources"
val mavenTargetDirectory = projectRootDir / "target"
val mavenBinariesDirectory = mavenTargetDirectory / "test-classes"
val dataDirectory = mavenResourcesDirectory / "data"
val bodiesDirectory = mavenResourcesDirectory / "bodies"
val recorderOutputDirectory = mavenSourcesDirectory
val resultsDirectory = mavenTargetDirectory / "results"
val recorderConfigFile = mavenResourcesDirectory / "recorder.conf"
}
An IntelliJ marsk up
getClass.getClassLoader
Any tips in solving this issue?
getClass.getClassLoader