random exception "The reference to entity "utm_medium" must end with the ';' delimiter."

781 views
Skip to first unread message

Lukasz Szwed

unread,
Jul 11, 2013, 9:22:43 AM7/11/13
to scalate...@googlegroups.com
Hi,

From time to time I see a random exception (
The reference to entity "utm_medium" must end with the ';' delimiter.)

I'm not able to reproduce it all the time,

I'm on:
 - scala 2.9.3
 - scalatest 2.0.M6-SNAP22

The command which I use to run test:

sbt "selenium:test-only com.giltgroupe.selenium.popeye.test.* -- -h target/html"

Have you seen any similar exception before ?

10),ModalPromoWithDiscountRegisterNewMembersOnly,com.giltgroupe.selenium.popeye.test.promotions.ModalPromoWithDiscountRegisterNewMembersOnly,Some(com.giltgroupe.selenium.popeye.test.promotions.ModalPromoWithDiscountRegisterNewMembersOnly),Some(95167),Some(MotionToSuppress),Some(TopOfClass(com.giltgroupe.selenium.popeye.test.promotions.ModalPromoWithDiscountRegisterNewMembersOnly)),None,None,pool-4-thread-9,1373482928626).
org.xml.sax.SAXParseException: The reference to entity "utm_medium" must end with the ';' delimiter.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
	at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
	at scala.xml.factory.XMLLoader$class.loadXML(XMLLoader.scala:40)
	at scala.xml.XML$.loadXML(XML.scala:40)
	at scala.xml.factory.XMLLoader$class.loadString(XMLLoader.scala:59)
	at scala.xml.XML$.loadString(XML.scala:40)
	at org.scalatest.tools.HtmlReporter.markup(HtmlReporter.scala:889)
	at org.scalatest.tools.HtmlReporter.org$scalatest$tools$HtmlReporter$$processInfoMarkupProvided(HtmlReporter.scala:427)
	at org.scalatest.tools.HtmlReporter$$anonfun$getSuiteHtml$1$$anonfun$apply$2.apply(HtmlReporter.scala:320)
	at org.scalatest.tools.HtmlReporter$$anonfun$getSuiteHtml$1$$anonfun$apply$2.apply(HtmlReporter.scala:320)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
	at scala.collection.Iterator$class.foreach(Iterator.scala:660)
	at scala.collection.immutable.VectorIterator.foreach(Vector.scala:621)
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
	at scala.collection.immutable.Vector.foreach(Vector.scala:36)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:194)
	at scala.collection.immutable.Vector.map(Vector.scala:36)
	at org.scalatest.tools.HtmlReporter$$anonfun$getSuiteHtml$1.apply(HtmlReporter.scala:320)
	at org.scalatest.tools.HtmlReporter$$anonfun$getSuiteHtml$1.apply(HtmlReporter.scala:270)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
	at scala.collection.Iterator$class.foreach(Iterator.scala:660)
	at scala.collection.immutable.VectorIterator.foreach(Vector.scala:621)
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
	at scala.collection.immutable.Vector.foreach(Vector.scala:36)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:194)
	at scala.collection.immutable.Vector.map(Vector.scala:36)
	at org.scalatest.tools.HtmlReporter.getSuiteHtml(HtmlReporter.scala:270)
	at org.scalatest.tools.HtmlReporter.makeSuiteFile(HtmlReporter.scala:206)
	at org.scalatest.tools.HtmlReporter.apply(HtmlReporter.scala:938)
	at org.scalatest.DispatchReporter$Propagator$$anonfun$run$1.apply(DispatchReporter.scala:158)
	at org.scalatest.DispatchReporter$Propagator$$anonfun$run$1.apply(DispatchReporter.scala:157)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:45)
	at org.scalatest.DispatchReporter$Propagator.run(DispatchReporter.scala:157)
	at java.lang.Thread.run(Thread.java:662)

Lukasz Szwed

unread,
Jul 11, 2013, 10:07:09 AM7/11/13
to scalate...@googlegroups.com
I forgot to add the mesaage:

Reporter completed abruptly with an exception after receiving event:  SuiteCompleted(Ordinal(0, ....

Lukasz Szwed

unread,
Jul 11, 2013, 11:25:47 AM7/11/13
to scalate...@googlegroups.com
OK, I've found and fixed the issue.

I was adding the url into html report. In some cases the URL would look like:
"http://XXX.xxx.com/stc?registerRandom=true&add_random_sku_to_wait_list_sku_available=true"
which was causing the reporter to crash

I used scala.xml.Utility.escape to fix it.

   private def includeCurrentUrlInReport(implicit driver: WebDriver) {
-    val currentUrl = webDriver.getCurrentUrl
+    val currentUrl = Utility.escape(webDriver.getCurrentUrl)
     markup("Failure Url - <a href=\"%s\">%s</a>".format(currentUrl, currentUrl))

Bill Venners

unread,
Jul 11, 2013, 11:31:24 AM7/11/13
to scalate...@googlegroups.com
Hi Lukasz,

Thanks for posting the solution. I'll add a ticket for us to investigate whether we can make this more bullet proof.

Bill


--
You received this message because you are subscribed to the Google
Groups "scalatest-users" group.
To post to this group, send email to scalate...@googlegroups.com
To unsubscribe from this group, send email to
scalatest-use...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/scalatest-users?hl=en
ScalaTest itself, and documentation, is available here:
http://www.artima.com/scalatest
---
You received this message because you are subscribed to the Google Groups "scalatest-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalatest-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Bill Venners
Artima, Inc.
http://www.artima.com
Reply all
Reply to author
Forward
0 new messages