The processing instruction target matching [xX][mM][lL] is not allowed.

0
We're calling a webservice, hosted by Mendix, with an external connector. We're using this connector in combination with several mendix apps and with all of them we're getting strange exceptions in production: Could not parse XML; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 324; The processing instruction target matching "[xX][mM][lL]" is not allowed It's strange because the webservice xml seems to be valid. <?xml version="1.0" encoding="UTF-8"?> <portal:SendPriceData xmlns:portal="http://www.mendix.nl/ns/portal/1.0/"> <portal:Prices> <portal:Prices> <portal:Price> <portal:ArticleNumber>SPC13043</portal:ArticleNumber> <portal:Unit>STUK</portal:Unit> <portal:StartDate>2014-07-01</portal:StartDate> <portal:Price>0.75</portal:Price> </portal:Price> </portal:Prices> </portal:Prices> </portal:SendPriceData> This happens every day and when we re-import the files, we don't see any exception. The mendix app is serving thousands of calls every hour, so setting a lognode on TRACE is difficult in production. Anyone with an idea what's wrong? Edit after finding error in mendix log: I see this in the mendix log, exactly when the connector throws an exception. What is a ConcurrentModificationException? I also noticed that Mendix does not remove the session for this webservice user. The xml parse exception is probably caused by an unvalid xml response from Mendix. Sometimes Mendix sends an unvalid soap response back when the request fails. I see unescaped characters in the soap response, so it's not valid xml 2014-07-17 11:32:43.654 ERROR - Webservices: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(Unknown Source) at java.util.HashMap$KeyIterator.next(Unknown Source) at com.mendix.core.MxRuntime.a(SourceFile:1004) at iR.c(SourceFile:240) at iR.a(SourceFile:214) at iR.a(SourceFile:209) at nY.a(SourceFile:72) at oa.b(SourceFile:97) at oa.a(SourceFile:60) at com.mendix.modules.webservices.WebserviceModule.handleWebserviceCall(SourceFile:357) at jl.processRequest(SourceFile:27) at ji.a(SourceFile:74) at com.mendix.core.MxRuntime.processRequest(SourceFile:908) at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:45) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:351) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534) at java.lang.Thread.run(Unknown Source)
asked
1 answers
1

It sounds like a bug in mendix but for the definition of a ConcurrentModificationException

see: link

This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.

For example, it is not generally permissible for one thread to modify a Collection while another thread is iterating over it. In general, the results of the iteration are undefined under these circumstances. Some Iterator implementations (including those of all the general purpose collection implementations provided by the JRE) may choose to throw this exception if this behavior is detected. Iterators that do this are known as fail-fast iterators, as they fail quickly and cleanly, rather that risking arbitrary, non-deterministic behavior at an undetermined time in the future.

and

Note that this exception does not always indicate that an object has been concurrently modified by a different thread. If a single thread issues a sequence of method invocations that violates the contract of an object, the object may throw this exception. For example, if a thread modifies a collection directly while it is iterating over the collection with a fail-fast iterator, the iterator will throw this exception.

answered