English 中文(简体)
How do I get karate-gatling example project to compile?
原标题:
  • 时间:2023-10-01 19:19:44
  •  标签:
  • karate

I downloaded the karate-gatling example project from here: https://github.com/karatelabs/karate/tree/master/karate-gatling

I opened the project in IntelliJ and ran the following command: mvn clean test-compile gatling:test

I am getting an error - "Compiler bridge file is not installed yet".

Below is the full log:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< com.intuit.karate:karate-gatling >------------------
[INFO] Building karate-gatling 1.4.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] Parameter  disableCompiler  is unknown for plugin  gatling-maven-plugin:4.2.9:test (default-cli) 
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ karate-gatling ---
[INFO] Deleting C:Repositorykarate-gatling	arget
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ karate-gatling ---
[INFO] skip non existing resourceDirectory C:Repositorykarate-gatlingsrcmain
esources
[INFO]
[INFO] --- compiler:3.8.1:compile (default-compile) @ karate-gatling ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:Repositorykarate-gatling	argetclasses
[INFO] /C:/Repository/karate-gatling/src/main/scala/com/intuit/karate/gatling/GatlingMavenJobConfig.java: C:Repositorykarate-gatlingsrcmainscalacomintuitkarategatlingGatlingMavenJobConfig.java uses unchecked or unsafe
operations.
[INFO] /C:/Repository/karate-gatling/src/main/scala/com/intuit/karate/gatling/GatlingMavenJobConfig.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- scala:4.5.6:compile (default) @ karate-gatling ---
[INFO] Using incremental compilation using Mixed compile order
[INFO] Compiler bridge file: C:Users******.sbt1.0zincorg.scala-sbtorg.scala-sbt-compiler-bridge_2.13-1.5.8-bin_2.13.9__65.0-1.5.8_20211211T222914.jar
[INFO] Compiler bridge file is not installed yet
error:
  bad constant pool index: 0 at pos: 48445
     while compiling: <no file>
        during phase: globalPhase=<no phase>, enteringPhase=<some phase>
     library version: version 2.13.9
    compiler version: version 2.13.9
  reconstructed args: -bootclasspath C:Users******.m2
epositoryorgscala-langscala-library2.13.9scala-library-2.13.9.jar -classpath C:Users******.m2
epository
etjavadevjnajna5.9.0jna-5.9.0.jar;C:Usersm1872
65.m2
epositoryorgscala-sbtutil-interface1.5.6util-interface-1.5.6.jar;C:Users******.m2
epositoryorgscala-langscala-compiler2.13.9scala-compiler-2.13.9.jar;C:Users******.m2
epositoryorgscala-langscala-re
flect2.13.9scala-reflect-2.13.9.jar;C:Users******.m2
epositoryorgscala-sbtcompiler-interface1.5.8compiler-interface-1.5.8.jar;C:Users******.m2
epositoryorgjlinejline3.21.0jline-3.21.0.jar;C:Users******.
m2
epositoryiogithubjava-diff-utilsjava-diff-utils4.12java-diff-utils-4.12.jar;C:Users******.m2
epositoryorgscala-langscala-compiler2.13.9scala-compiler-2.13.9.jar;C:Users******.m2
epositoryorgscala-lang
scala-library2.13.9scala-library-2.13.9.jar;C:Users******.m2
epositoryorgscala-langscala-reflect2.13.9scala-reflect-2.13.9.jar;C:Users******.m2
epositoryiogithubjava-diff-utilsjava-diff-utils4.12java-diff-
utils-4.12.jar;C:Users******.m2
epositoryorgjlinejline3.21.0jline-3.21.0.jar;C:Users******.m2
epository
etjavadevjnajna5.9.0jna-5.9.0.jar -d C:Users******AppDataLocalTempscala-maven-plugin-compiler-b
ridge-classes3663274618389181747

  last tree to typer: EmptyTree
       tree position: <unknown>
            tree tpe: <notype>
              symbol: null
           call site: <none> in <none>

== Source file context for tree position ==

error: scala.reflect.internal.FatalError:
  bad constant pool index: 0 at pos: 48445
     while compiling: <no file>
        during phase: globalPhase=<no phase>, enteringPhase=<some phase>
     library version: version 2.13.9
    compiler version: version 2.13.9
  reconstructed args: -bootclasspath C:Users******.m2
epositoryorgscala-langscala-library2.13.9scala-library-2.13.9.jar -classpath C:Users******.m2
epository
etjavadevjnajna5.9.0jna-5.9.0.jar;C:Usersm1872
65.m2
epositoryorgscala-sbtutil-interface1.5.6util-interface-1.5.6.jar;C:Users******.m2
epositoryorgscala-langscala-compiler2.13.9scala-compiler-2.13.9.jar;C:Users******.m2
epositoryorgscala-langscala-re
flect2.13.9scala-reflect-2.13.9.jar;C:Users******.m2
epositoryorgscala-sbtcompiler-interface1.5.8compiler-interface-1.5.8.jar;C:Users******.m2
epositoryorgjlinejline3.21.0jline-3.21.0.jar;C:Users******.
m2
epositoryiogithubjava-diff-utilsjava-diff-utils4.12java-diff-utils-4.12.jar;C:Users******.m2
epositoryorgscala-langscala-compiler2.13.9scala-compiler-2.13.9.jar;C:Users******.m2
epositoryorgscala-lang
scala-library2.13.9scala-library-2.13.9.jar;C:Users******.m2
epositoryorgscala-langscala-reflect2.13.9scala-reflect-2.13.9.jar;C:Users******.m2
epositoryiogithubjava-diff-utilsjava-diff-utils4.12java-diff-
utils-4.12.jar;C:Users******.m2
epositoryorgjlinejline3.21.0jline-3.21.0.jar;C:Users******.m2
epository
etjavadevjnajna5.9.0jna-5.9.0.jar -d C:Users******AppDataLocalTempscala-maven-plugin-compiler-b
ridge-classes3663274618389181747

  last tree to typer: EmptyTree
       tree position: <unknown>
            tree tpe: <notype>
              symbol: null
           call site: <none> in <none>

== Source file context for tree position ==


        at scala.reflect.internal.Reporting.abort(Reporting.scala:69)
        at scala.reflect.internal.Reporting.abort$(Reporting.scala:65)
        at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:28)
        at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.errorBadIndex(ClassfileParser.scala:408)
        at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getExternalName(ClassfileParser.scala:263)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.readParamNames$1(ClassfileParser.scala:842)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.parseAttribute$1(ClassfileParser.scala:848)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.$anonfun$parseAttributes$6(ClassfileParser.scala:925)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.parseAttributes(ClassfileParser.scala:1497)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.parseMethod(ClassfileParser.scala:625)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:548)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.$anonfun$parse$2(ClassfileParser.scala:175)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.$anonfun$parse$1(ClassfileParser.scala:160)
        at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:143)
        at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:342)
        at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.$anonfun$complete$2(SymbolLoaders.scala:249)
        at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:247)
        at scala.reflect.internal.Symbols$Symbol.completeInfo(Symbols.scala:1563)
        at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1535)
        at scala.reflect.internal.Definitions.scala$reflect$internal$Definitions$$enterNewMethod(Definitions.scala:48)
        at scala.reflect.internal.Definitions$DefinitionsClass.String_$plus$lzycompute(Definitions.scala:1261)
        at scala.reflect.internal.Definitions$DefinitionsClass.String_$plus(Definitions.scala:1261)
        at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreMethods$lzycompute(Definitions.scala:1583)
        at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreMethods(Definitions.scala:1565)
        at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1596)
        at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1596)
        at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1652)
        at scala.tools.nsc.Global$Run.<init>(Global.scala:1236)
        at scala.tools.nsc.Driver.doCompile(Driver.scala:47)
        at scala.tools.nsc.MainClass.doCompile(Main.scala:30)
        at scala.tools.nsc.Driver.process(Driver.scala:68)
        at scala.tools.nsc.Main.process(Main.scala)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at sbt.internal.inc.RawCompiler.getReporter$1(RawCompiler.scala:56)
        at sbt.internal.inc.RawCompiler.apply(RawCompiler.scala:77)
        at sbt_inc.SbtIncrementalCompiler.getCompiledBridgeJar(SbtIncrementalCompiler.java:301)
        at sbt_inc.SbtIncrementalCompiler.<init>(SbtIncrementalCompiler.java:71)
        at scala_maven.ScalaCompilerSupport.incrementalCompile(ScalaCompilerSupport.java:354)
        at scala_maven.ScalaCompilerSupport.compile(ScalaCompilerSupport.java:122)
        at scala_maven.ScalaCompilerSupport.doExecute(ScalaCompilerSupport.java:89)
        at scala_maven.ScalaMojoSupport.execute(ScalaMojoSupport.java:305)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
        at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
        at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
        at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
        at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
        at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.698 s
[INFO] Finished at: 2023-10-01T14:00:04-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.5.6:compile (default) on project karate-gatling: Execution default of goal net.alchim31.maven:scala-maven-plugin:4.5.6:compile failed.: CompileFailed -> [Hel
p 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

I am getting the same error in my own Karate test automation project and I was hoping the example would work to help me figure it out. I am unfamiliar with Gatling and would really appreciate some clues as to what is wrong here. Thank you.

问题回答

暂无回答




相关问题
How do I get karate-gatling example project to compile?

I downloaded the karate-gatling example project from here: https://github.com/karatelabs/karate/tree/master/karate-gatling I opened the project in IntelliJ and ran the following command: mvn clean ...

Reading Data with from csv file in Karate

Below is the data, I have maintained in the csv file Data "[{ label : Karate is the only open-source tool to combine API test-automation, mocks, performance-testing and even UI automation into ...

Conditional logic for Karate UI

I am trying to add a conditional logic for karate UI feature that I am trying to build. The requirement is this: There are 5 fields; select(‘select[id=currency]’, ‘EUR’) // has a random logic to ...

热门标签