You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karthik (JIRA)" <ji...@apache.org> on 2017/03/25 06:51:42 UTC

[jira] [Created] (SUREFIRE-1347) Kafka 0.10.2.0 maven sure fire plugin crash

Karthik created SUREFIRE-1347:
---------------------------------

             Summary: Kafka 0.10.2.0 maven sure fire plugin crash
                 Key: SUREFIRE-1347
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1347
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Surefire Plugin
    Affects Versions: 2.10
            Reporter: Karthik


I am trying to create mock kafka server using the following code :

public MockKafkaServer() throws IOException, InterruptedException {
    int zkPort = this.mockZooKeeper.start();
    this.port = this.getAvailablePort();
    File logDirectory = Files.createTempDir();
    Properties properties = new Properties();
    properties.put("zookeeper.connect", "127.0.0.1:" + zkPort);
    properties.put("num.partitions", "1");
    properties.put("host.name", "localhost");
    properties.put("port", String.valueOf(this.port));
    properties.put("log.dir", logDirectory.getAbsolutePath());
    properties.put("auto.create.topics.enable", "true");
    this.broker = new KafkaServerStartable(new KafkaConfig(properties));
}

public void start() throws IOException, InterruptedException {
    this.broker.startup();
}

But when I start the server and use it run unit test cases, I get the following error:

log4j:WARN No appenders could be found for logger (kafka.server.KafkaServer).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.087 s
[INFO] Finished at: 2017-03-24T23:24:25-07:00
[INFO] Final Memory: 59M/970M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.2-SNAPSHOT:test (default-test) on project restj: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream
[ERROR] ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj && /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/bin/java -server -Xss128m -Xms64m -Xmx256m -XX:+UseCompressedOops -XX:+UseG1GC -XX:G1HeapWastePercent=50 -XX:+CMSClassUnloadingEnabled -XX:MaxGCPauseMillis=10 -XX:+CMSScavengeBeforeRemark '-javaagent:/Users/testuser/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/jacoco.exec,excludes=**/com/company/project/restj/services/MockActiveStreamsService*' -jar /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/surefire/surefirebooter6808271075445909902.jar /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/surefire 2017-03-24T11-23-55_783-jvmRun2 surefire8078542159586310233tmp surefire_18213721157775376322tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] com.company.project.restj.RestControllerTest
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj && /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/bin/java -server -Xss128m -Xms64m -Xmx256m -XX:+UseCompressedOops -XX:+UseG1GC -XX:G1HeapWastePercent=50 -XX:+CMSClassUnloadingEnabled -XX:MaxGCPauseMillis=10 -XX:+CMSScavengeBeforeRemark '-javaagent:/Users/testuser/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/jacoco.exec,excludes=**/com/company/project/restj/services/MockActiveStreamsService*' -jar /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/surefire/surefirebooter6808271075445909902.jar /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/surefire 2017-03-24T11-23-55_783-jvmRun2 surefire8078542159586310233tmp surefire_18213721157775376322tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] com.company.project.restj.RestControllerTest
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:494)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:441)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:294)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1075)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:905)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:783)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj && /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/bin/java -server -Xss128m -Xms64m -Xmx256m -XX:+UseCompressedOops -XX:+UseG1GC -XX:G1HeapWastePercent=50 -XX:+CMSClassUnloadingEnabled -XX:MaxGCPauseMillis=10 -XX:+CMSScavengeBeforeRemark '-javaagent:/Users/testuser/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/jacoco.exec,excludes=**/com/company/project/restj/services/MockActiveStreamsService*' -jar /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/surefire/surefirebooter6808271075445909902.jar /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/surefire 2017-03-24T11-23-55_783-jvmRun2 surefire8078542159586310233tmp surefire_18213721157775376322tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] com.company.project.restj.RestControllerTest
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:679)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:532)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$600(ForkStarter.java:117)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:429)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:406)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[ERROR] at java.lang.Thread.run(Thread.java:745)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.2-SNAPSHOT:test (default-test) on project restj: There are test failures.

Please refer to /Users/testuser/Desktop/TVE5/Src-Repo/CBR/maven/restj/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream
ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?

If I switch back to kafka to 0.8.x, it works perfectly fine. Any help in troubleshooting is appreciated. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)