agomezmoron / screen-recorder

Java screen recorder library
MIT License
21 stars 14 forks source link

Could not initialize class com.github.agomezmoron.multimedia.testng.configuration.VideoRecorderTestNGConfiguration #8

Open pritamkarmakar opened 6 years ago

pritamkarmakar commented 6 years ago

While running the maven test project from Jenkins I'm getting below error. Could you please look into it? If I run the project from IntelliJ everything is fine.

There was an error in the forked process Could not initialize class com.github.agomezmoron.multimedia.testng.configuration.VideoRecorderTestNGConfiguration org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process Could not initialize class com.github.agomezmoron.multimedia.testng.configuration.VideoRecorderTestNGConfiguration at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:673) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:280) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290) at org.apache.maven.cli.MavenCli.main(MavenCli.java:194) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

pritamkarmakar commented 6 years ago

My pom file has below dependency and repository


      <dependency>
            <groupId>com.github.agomezmoron</groupId>
            <artifactId>screen-recorder</artifactId>
            <version>0.0.3</version>
       </dependency>

      <repository>
            <id>screen-recorder</id>
            <name>Java screen recorder library by agomezmoron</name>
            <url>https://raw.github.com/agomezmoron/screen-recorder/mvn-repo</url>
      </repository>
pritamkarmakar commented 6 years ago

Can someone please look into it?

agomezmoron commented 6 years ago

Hi @pritamkarmakar ,

How are you invoking the VideoRecorderTestNGConfiguration class? Remember it cannot be invoked - maybe it should be abstract - but you should only use it as VideoRecorderTestNGConfiguration.methodNameX();

Best