1

I am trying to record JFR for a java application hosted in tomcat server. I have used following jvm args .

-XX:+UnlockCommercialFeatures -XX:+FlightRecorder

And i am using following linux command to record the JFR.

 /opt/java/perf/jdk1.7.0_79/bin/jcmd 32627 JFR.start duration=900s 
   settings=/opt/profile.jfc filename=/opt/flight_17-Mar-2016.jfr

But i am getting this error :

**32627:
java.text.ParseException: JSON object must begin with '{', line=0, column=0 : 
 <?xml version="1.0" encodi    ng="UTF-8"?>
<configuration version="1.0" name="Profiling" description="Lo**

Please suggest if anyone has any idea about this. Thanks in advance.

Kire Haglin
  • 6,569
  • 22
  • 27
Sophiya
  • 99
  • 1
  • 4

1 Answers1

0

JDK 7u40 was the first Oracle JDK release that had full Java Flight Recorder support. Releases prior to that didn't have any JVM events, so it would make little sense to configure it using a settings file.

When JVM events were added to Hotspot, the file format was updated so it would better support configuration from Java Mission Control, which meant a switch from JSON to XML.

Fix is to use a later release of the Oracle JDK.

Kire Haglin
  • 6,569
  • 22
  • 27