Migration guide (2.0 => 2.1)

303 views
Skip to first unread message

Magnus Jensen

unread,
Mar 4, 2015, 9:20:46 AM3/4/15
to gat...@googlegroups.com
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

Magnus Jensen

unread,
Mar 4, 2015, 9:31:59 AM3/4/15
to gat...@googlegroups.com
And the migration guide says:

If you choose the latter, don’t forget to fix the simulationPackage in Recorder.scala.

What does it mean?
Where does it need to point in:

props.simulationPackage("${package}")

Magnus Jensen

unread,
Mar 4, 2015, 9:38:03 AM3/4/15
to gat...@googlegroups.com
To answer my own question:
I changed the
val gatlingConfUrl: Path = getClass.getClassLoader.getResource("gatling.conf"
).toURI

to

val gatlingConfUrl: Path = getClass.getClassLoader.getResource("gatling.conf").getPath

and the error is not there anymore.

And obviously the
props.simulationPackage("${package}")

should point to where I want to place my recroded simulations.

Sorry for being to fast with asking the question.

My problem is now, the only error msg left:

Error:scalac: bad symbolic reference. A signature in package.class refers to type compileTimeOnly
in package scala.annotation which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling package.class.


Any tips on what this is caused by?

Cheers

On Wednesday, March 4, 2015 at 3:20:46 PM UTC+1, Magnus Jensen wrote:
Reply all
Reply to author
Forward
0 new messages