Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauge Specs execution failed. null: GaugeExecutionFailedException #71

Open
tdauth opened this issue Apr 28, 2021 · 4 comments
Open

Gauge Specs execution failed. null: GaugeExecutionFailedException #71

tdauth opened this issue Apr 28, 2021 · 4 comments

Comments

@tdauth
Copy link

tdauth commented Apr 28, 2021

Hi,
I have setup my existing Java project with Gauge. When I use maven to execute the Gauge target with the following command:

mvn gauge:execute -DspecsDir=specs/example.spec

I get the following error:

[ERROR] Failed to execute goal com.thoughtworks.gauge.maven:gauge-maven-plugin:1.4.0:execute (default-cli) on project mobileproducts-test-client: Gauge Specs execution failed. null: GaugeExecutionFailedException -> [Help 1]
        at org.reflections.Reflections.<init>(Reflections.java:126)
        at com.thoughtworks.gauge.execution.parameters.parsers.base.ParameterParsingChain.createReflections(ParameterParsingChain.java:47)
        at com.thoughtworks.gauge.execution.parameters.parsers.base.ParameterParsingChain.<init>(ParameterParsingChain.java:33)
[ERROR] 
        at com.thoughtworks.gauge.connection.MessageProcessorFactory.initializeExecutionMessageProcessors(MessageProcessorFactory.java:112)
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
        at com.thoughtworks.gauge.connection.MessageProcessorFactory.getProcessor(MessageProcessorFactory.java:87)
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
        at com.thoughtworks.gauge.RunnerServiceHandler.lambda$validateStep$17(RunnerServiceHandler.java:332)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[ERROR] 
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[ERROR] For more information about the errors and possible solutions, please read the following articles:
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: org.jboss.annotation.ejb.Producers
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:388)
        ... 10 more

I tried to use older versions of the gauge maven plugin which still lead to exceptions (but maybe different ones). The error message is not meaningful to me and I don't know what to do. I is an existing Java project which I have initialized using gauge init. There are many additional classes in packages below the StepImplementation class and NOT in the "lib" folder. I want to use those classes later in the StepImplementation class. Maybe this is a problem?

@sriv
Copy link
Contributor

sriv commented Apr 28, 2021

Can you try running mvn test-compile gauge:execute -DspecsDir=specs/example.spec?

@tdauth
Copy link
Author

tdauth commented Apr 28, 2021

It works hurray and how can I supress all the reflection errors like:

WARN org.reflections.Reflections - could not get type for name org.jboss.ejb3.ContainerPlugin from any class loader
org.reflections.ReflectionsException: could not get type for name org.jboss.ejb3.ContainerPlugin

@omutwar
Copy link

omutwar commented May 18, 2023

Can you try running mvn test-compile gauge:execute -DspecsDir=specs/example.spec?

Hello @sriv : I am new to Gauge as well, when I ran some existing project, it's failing with <Failed to execute goal com.thoughtworks.gauge.maven:gauge-maven-plugin:1.4.1:execute (default) on project (I think): Gauge Specs execution failed. null>

in my case the project was set up in a structure like this:

specs: //
| concepts
| xxx.cpt file(s)
| API_specFiles
| specFile1
| specFile2
| UI_specFiles
| specFile1
| specFile2

when I run with page1 as param, I am getting above failure; additionally, when I run different test suites with different tags, and it works for some.

I can vaguely tell it should be about the test cases under certain folder, but I cannot tell, where the issue is, because I don't see any complaint from IDE, abut syntactical issue.

would like to hear your opinion if possible.

thanks

@omutwar
Copy link

omutwar commented May 18, 2023

@tdauth sorry, had to ask under your question, since we faced similar issue (from where I look )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants