lightbody / browsermob-proxy

A free utility to help web developers watch and manipulate network traffic from their AJAX applications.
http://bmp.lightbody.net
Apache License 2.0
2.17k stars 659 forks source link

Getting "org.codehaus.jackson.JsonParseException: Unrecognized field '_error' in response element" while fetching data from HAR response #623

Open PallaviMRao opened 7 years ago

PallaviMRao commented 7 years ago

HI,

I am using eclipse with java coding to fetch particular eVars and props from particular omniture call. I am using BMP to fetch network traffic and HarLib to access all the entries in Har file. But I am getting below error, whenever I try to fetch data from HAR file.

Error" org.codehaus.jackson.JsonParseException: Unrecognized field '_error' in response element"

image

My code goes like this,

Har har = Config.proxy.getHar(); File harFile = new File(Config.sFileName); har.writeTo(harFile);

System.out.println ("Har file ready!!!!!!!!!!!!!!!!!!!");
HarFileReader r = new HarFileReader(); try { System.out.println("Reading data!!!!!!!!!!!!!!!! "); List warnings = new ArrayList(); HarLog log = r.readHarFile(harFile, warnings); for (HarWarning w : warnings)

             System.out.println("File:" + harFile + " - Warning:" + w);

System.out.println("Reading " + harFile); System.out.println("Reading & Logging data!!!!!!!!!!!!!!!! ");

      HarEntries entries = log.getEntries();
      System.out.println("Entries fetched from log successfully!!!!!!!!!!!!!!!! ");

List hentry = entries.getEntries(); System.out.println("SubEntries put in List successfully!!!!!!!!!!!!!!!! ");

              System.out.println("Fetching & Printing Request data!!!!!!!!!!!!!!!! ");
       for (HarEntry entry : hentry)

{ HarRequest Req = entry.getRequest(); HarQueryString R = Req.getQueryString(); List list1 = R.getQueryParams(); if(Req.getUrl().startsWith(Config.urlPattern)) {
for(HarQueryParam Param : list1) {

                        if(Param.getName().matches(Config.Name))
                            {

                                System.out.println("PageName============"); 

                            System.out.println(Param.getValue());   

                            }
                            if(Param.getName().matches(Config.c5))
                            {
                                System.out.println("c5============");

                            System.out.println(Param.getValue());

                            }
                            }

} }

I am trying to fetch below eVars and props from java code above:

image

Please help me to resolve this issue.

PallaviMRao commented 7 years ago

@jekh : Please suggest on this :)