Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent modification exception under XML.load #459

Open
scabug opened this issue Jul 11, 2011 · 6 comments
Open

Concurrent modification exception under XML.load #459

scabug opened this issue Jul 11, 2011 · 6 comments

Comments

@scabug
Copy link

scabug commented Jul 11, 2011

Dispatch user reported this bug: https://github.com/n8han/Databinder-Dispatch/issues/33

Dispatch is using the load method of the XML singleton object from potentially many threads. The stack trace suggests that the the static method SAXParserFactory.newInstance called in XML.load -> XMLLoader.loadXML is not thread safe. This factory should only be instantiated one time and the instance retained for all calls to newSAXParser; otherwise, if the factory itself is rebuilt on each call to XML.load it will need to be synchronized.

caught javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.util.ConcurrentModificationException
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.util.ConcurrentModificationException
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134)
at scala.xml.factory.XMLLoader$class.parser(XMLLoader.scala:28)
at scala.xml.XML$.parser(XML.scala:40)
at scala.xml.factory.XMLLoader$class.load(XMLLoader.scala:53)
at scala.xml.XML$.load(XML.scala:40)
at dispatch.HandlerVerbs$$anonfun$$less$greater$1.apply(handlers.scala:88)
@scabug
Copy link
Author

scabug commented Jul 11, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4836?orig=1
Reporter: Nathan (n8han)

@scabug
Copy link
Author

scabug commented Jul 17, 2015

@SethTisue said:
The scala-xml library is now community-maintained. Issues with it are now tracked at https://github.com/scala/scala-xml/issues instead of here in the Scala JIRA.

Interested community members: if you consider this issue significant, feel free to open a new issue for it on GitHub, with links in both directions.

@scabug scabug closed this as completed Jul 17, 2015
@guizmaii
Copy link

Is this problem fixed? I can't find the corresponding ticket in the scala-xml repo. 🤔

@SethTisue
Copy link
Member

Is this problem fixed?

it nearly certainly isn't

@SethTisue
Copy link
Member

I'll transfer the issue. In 2015, that capability didn't exist on GitHub.

@guizmaii
Copy link

Thanks @SethTisue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants