Generate reports failed (sometimes)

Hi,

I’ve this error which appears sometimes when generation reports. It’s not systematic.

Here simulation.log : https://drive.google.com/file/d/0B35VlJiv5im5bmFQU2F2cDR0WDA/edit?usp=sharing

Exception in thread “main” java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at io.gatling.core.result.reader.DataReader$.newInstance(DataReader.scala:26)
at io.gatling.app.Gatling.dataReader$lzycompute$1(Gatling.scala:235)
at io.gatling.app.Gatling.io$gatling$app$Gatling$$dataReader$1(Gatling.scala:235)
at io.gatling.app.Gatling$$anonfun$start$1.apply(Gatling.scala:242)
at io.gatling.app.Gatling$$anonfun$start$1.apply(Gatling.scala:242)
at io.gatling.app.Gatling.generateReports$1(Gatling.scala:170)
at io.gatling.app.Gatling.start(Gatling.scala:242)
at io.gatling.app.Gatling$.fromMap(Gatling.scala:52)
at io.gatling.app.Gatling$.runGatling(Gatling.scala:77)
at io.gatling.app.Gatling$.runGatling(Gatling.scala:56)
at io.gatling.app.Gatling$.main(Gatling.scala:48)
at io.gatling.app.Gatling.main(Gatling.scala)
Caused by: scala.MatchError: - with linked exception: (of class java.lang.String)
at io.gatling.charts.result.reader.FileDataReader$$anonfun$io$gatling$charts$result$reader$FileDataReader$$firstPass$1.apply(FileDataReader.scala:95)
at io.gatling.charts.result.reader.FileDataReader$$anonfun$io$gatling$charts$result$reader$FileDataReader$$firstPass$1.apply(FileDataReader.scala:91)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at io.gatling.charts.result.reader.FileDataReader.io$gatling$charts$result$reader$FileDataReader$$firstPass(FileDataReader.scala:91)
at io.gatling.charts.result.reader.FileDataReader$$anonfun$6.apply(FileDataReader.scala:148)
at io.gatling.charts.result.reader.FileDataReader$$anonfun$6.apply(FileDataReader.scala:148)
at io.gatling.charts.result.reader.FileDataReader.doWithInputFiles(FileDataReader.scala:60)
at io.gatling.charts.result.reader.FileDataReader.(FileDataReader.scala:148)
… 16 more

Regards,

Fun: there are some Exception messages that contain end-of-line characters…

javax.xml.bind.UnmarshalException

  • with linked exception:
    [org.xml.sax.SAXException: FWK005 parse may not be called while parsing.]

I didn’t expect that we’d have to sanitize them… Will do.

Fixed, thanks for reporting!
https://github.com/excilys/gatling/issues/1947

The error message gets me concerned: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.

Do you have a stacktrace where this happens (might have to lower logging level).
This is typically caused by a SAX parser being accessed from concurrent thread, but those are not thread safe.

Does this happens in Gatling or in some custom code of yours?

Yes, I think this error message comes from my custom code :frowning:
Thanks for fix.

You can have multiple SAX parser instances in a ThreadLocal as Gatling doesn’t use lots of threads.
That’s what we do.