Skip to content

Troubleshooting

Lucas Carnevalli edited this page Mar 31, 2020 · 7 revisions

Configurando IntelliJ runner

Erro:

Pode ocorrer quando o feature está sendo executado pela IDE mas não está achando os steps do Easy Cucumber.

objc[20650]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10663b4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1066bb4e0). One of the two will be used. Which one is undefined.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/transaction/TransactionDefinition
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetPublicMethods(Class.java:2902)
	at java.lang.Class.getMethods(Class.java:1615)
	at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:39)
	at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:82)
	at cucumber.runner.Runner.<init>(Runner.java:38)
	at cucumber.runner.SingletonRunnerSupplier.createRunner(SingletonRunnerSupplier.java:38)
	at cucumber.runner.SingletonRunnerSupplier.get(SingletonRunnerSupplier.java:32)
	at cucumber.runtime.Runtime.run(Runtime.java:74)
	at cucumber.api.cli.Main.run(Main.java:26)
	at cucumber.api.cli.Main.main(Main.java:8)
Caused by: java.lang.ClassNotFoundException: org.springframework.transaction.TransactionDefinition
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 12 more

Solução:

  1. Abra o IntelliJ.
  2. Depois de abrir IntelliJ, selecione Run/Debug Configuration e selecione Edit Configurations...

  1. Em Defaults da janela Run/Debug Configuration selecione Cucumber Java.

  1. Adicione Glue como io.github.osvaldjr
Clone this wiki locally