I'm calling XML.loadString(...)
in a MDB in WebSphere 6.1 ND. I'm getting java.lang.VerifyError
, similar to that described in this question.
The stacktrace is:
java.lang.VerifyError: class loading constraint violated (class: scala/collection/mutable/StringBuilder method: toSeq()Lscala/collection/Seq;) at pc: 0
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at scala.xml.parsing.FactoryAdapter.<init>(FactoryAdapter.scala:40)
at scala.xml.parsing.NoBindingFactoryAdapter.<init>(NoBindingFactoryAdapter.scala:18)
at scala.xml.factory.XMLLoader$class.adapter(XMLLoader.scala:24)
at scala.xml.XML$.adapter(XML.scala:40)
at scala.xml.factory.XMLLoader$class.loadXML(XMLLoader.scala:37)
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 my code
It happens if I use ConstructingParser
too:
java.lang.VerifyError: class loading constraint violated (class: scala/collection/mutable/StringBuilder method: toSeq()Lscala/collection/Seq;) at pc: 0
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at scala.xml.parsing.MarkupParser$class.$init$(MarkupParser.scala:102)
at scala.xml.parsing.ConstructingParser.<init>(ConstructingParser.scala:47)
at scala.xml.parsing.ConstructingParser$.fromSource(ConstructingParser.scala:22)
I'm using Scala v2.9.0.1
How can I diagnose this class linkage problem?
Edit #1
On some reflection I realised that the problem occured after an unrelated change. On a hunch I fully uninstalled the application from WAS and then reinstalled it. The problem was gone. The problem recurred after the next application update (i.e. overwrite).
After several more hours, and other changes unlreated to Scala XML parsing, I forgot to uninstall/reinstall and did an update instead. The problem did not recur. I can no longer replicate the issue.
Edit #2
The problem came back and can not be solved with uninstall/reinstall alone. Retried with Scala 2.8.1, but the problem persists. Will now try uninstall/turn off server/delete temp files/reinstall/restart server. Wish me luck.