5

I'm trying to profile a Clojure app using JMC, but get the following exception when I try to start the flight recorder:

java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"

JMC does let me start the MBean server, so I'm quite puzzled.

I've run JMC with the -consoleLog option, and got the following result when trying to start Flight Recorder:

!SESSION 2016-02-25 09:41:32.311 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_GB
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -consoleLog

!ENTRY com.jrockit.mc.core 4 0 2016-02-25 09:41:49.289
!MESSAGE java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"

I haven't found any mention of this issue in my searches and am a bit at a loss where to proceed with my investigation. Anyone has any suggestions?

Thanks!

2 Answers2

3

Enterprise applications we have so many 3rd party libraries, custom configurations etc. it is hard to figure out what went wrong with what library/configuration.

Today I wasted 3-4 hours due to this, solution was given in comment of other answer:

-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
Vipin
  • 4,851
  • 3
  • 35
  • 65
2

I found the culprit.

I tried running the Flight recorder on a blank Clojure project and it worked. So I deduced that the problem must lie somewhere in the code, either mine or the dependencies.

I added each of my dependencies to my blank project and found that Dali was causing the bug.

I have no idea what within Dali is causing the problem!

  • 1
    This sounds really weird. Did you get a recording file (*.jfr) that causes the problem, that you could somehow share with us in the JMC team? – Klara Feb 26 '16 at 08:48
  • Hi @Klara, thanks for jumping in. I don't think I got a file, as the flight recording window wouldn't even open. I'll look now if it was generated anywhere. FYI I wrote the steps to reproducing the problem [here](https://github.com/stathissideris/dali/issues/2). – Antoine Chesnais Feb 26 '16 at 11:39
  • The Flight Recording doesn't start at all, so I can't choose where it saves the recording. I tried starting it with command line options but get the same error message in my terminal: `Could not start recording. Unexpected error occured when loading setting default from JRE_HOME/lib/jfr. UnsupportedOperationException: This parser does not support specification "null" version "null"` – Antoine Chesnais Feb 26 '16 at 11:49
  • 5
    Ah, I got confused by "parser" being in the error message, and thought it was the parsing of the actual flight recording. But it seems it is the parsing of the jfc settings file. One theory is that Dali messes with the xml parser settings, we've seen similar problems before. Try running with -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl (See https://community.oracle.com/thread/3618691?start=0&tstart=0 ) – Klara Feb 28 '16 at 07:36