cucumber/cucumber-jvm — Issue #180: cucumber.runtime.CucumberException: Error creating instance of: cucumber.formatter.HTMLFormatter
Author: restagner
Created: 2012-01-27 03:30:35+00:00
State: open

I'm having a tough time getting HTML output. I've put together the following pom file with the expectation of seeing HTML.

NOTE: my step definitions have been coded in Java

```

4.0.0
org.stag.cucumberjvm
example-cucumber-jvm-project
0.0.1-SNAPSHOT

1.0.0.RC14-SNAPSHOT
2.17.0
4.10

org.apache.maven.plugins
maven-surefire-plugin
2.10

true

org.codehaus.mojo
exec-maven-plugin
1.2.1

integration-test

java

test
cucumber.cli.Main

--format
html
--out
reports
--glue
org.stag.stepdefs
src/test/resources/features

info.cukes
cucumber-picocontainer
${cucumber-jvm.version}

info.cukes
cucumber-junit
${cucumber-jvm.version}

org.seleniumhq.selenium
selenium-java
${selenium.version}

org.seleniumhq.selenium
selenium-support
${selenium.version}

junit
junit
${junit.version}

```

However, when I execute Maven (mvn clean integration-test), I see the following exceptions

```

[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:662)
Caused by: cucumber.runtime.CucumberException: Error creating instance of: cucumber.formatter.HTMLFormatter outputting to java.io.FileWriter@a9509d
at cucumber.formatter.FormatterFactory.createFormatterFromClassName(FormatterFactory.java:58)
at cucumber.formatter.FormatterFactory.createFormatter(FormatterFactory.java:32)
at cucumber.cli.Main.run(Main.java:58)
at cucumber.cli.Main.main(Main.java:25)
... 6 more
Caused by: java.lang.NoSuchMethodException: cucumber.formatter.HTMLFormatter.(java.lang.Appendable)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
at cucumber.formatter.FormatterFactory.createFormatterFromClassName(FormatterFactory.java:55)
... 9 more
```