# \[Gatling 2.0.0-M3\] Can't get HAR archives to load in Recorder

**URL:** <https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489>\
**Category:** Gatling (Open-Source)\
**Created:** [July 11, 2013, 4:31pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489 "2013-07-11T16:31:56Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Morris](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Morris](https://community.gatling.io/u/Jonathan_Morris)\
**Post date:** [July 11, 2013, 4:31pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/1 "2013-07-11T16:31:56Z")

</div>

Greetings. I have a HAR archive sitting on my desktop as foo.har and when I fire up the recorder and switch to HAR Converter, when I browse, I cannot select any files, and selecting a directory fails when I press ‘Start !’. I’m on Mac OS X 10.8.4; java is as detailed below.

java version “1.6.0\_51”  
Java™ SE Runtime Environment (build 1.6.0\_51-b11-457-11M4509)  
Java HotSpot™ 64-Bit Server VM (build 20.51-b01-457, mixed mode)

Any ideas? Additional details provided once you tell me what they are. Thanks!

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [July 11, 2013, 5:20pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/2 "2013-07-11T17:20:05Z")

</div>

I can reproduce with JDK6. It works well with JDK7.  
@Pierre?

---

<div class="post-metadata">

**Author:** ![Pierre\_DAL-PRA](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pierre\_DAL-PRA](https://community.gatling.io/u/Pierre_DAL-PRA)\
**Post date:** [July 11, 2013, 7:01pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/3 "2013-07-11T19:01:56Z")

</div>

I hadn’t tested it with a JDK6 when I refactored the Recorder.  
AWT’s native FileDialog is a bit broken with JDK7, but it simply doesn’t work with JDK6…  
However, it looks like Swing’s FileChooser works fine on both JDKs.  
We were switching to FileDialog on Mac when FileChooser was broken but now it’s the other way around !  
I’ll fix it ASAP but, as a temporary fix, you can :

- use Oracle’s JDK7
- As we’re looking at system properties to know if the Recorder’s running on a Mac, you can trick it into thinking it’s not a Mac, by launching the Recorder with the following argument : -Dos.name=Win

Cheers,

Pierre

---

<div class="post-metadata">

**Author:** ![Jonathan\_Morris](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Morris](https://community.gatling.io/u/Jonathan_Morris)\
**Post date:** [July 11, 2013, 7:33pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/4 "2013-07-11T19:33:44Z")

</div>

Thanks for the speedy response! I can now pick files to my heart’s content. When I try to run ‘Start !’ against them, I get a ‘Export to HAR file unsuccessful’ and it tells me to look at the log files. I looked both under the application directory and in /var/log and nothing jumped out at me in the gatling-recorder source. Where might I find this next level of detail? Thanks again.

Jonathan

---

<div class="post-metadata">

**Author:** ![Pierre\_DAL-PRA](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pierre\_DAL-PRA](https://community.gatling.io/u/Pierre_DAL-PRA)\
**Post date:** [July 11, 2013, 7:46pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/5 "2013-07-11T19:46:01Z")

</div>

I noticed that I log the stack trace with a DEBUG level, which is not the exactly the best logging level for errors…  
I’ll change it too 😉  
Currently, you have to lower the debug level : in logback.xml, in the last block (…), replace WARN by DEBUG, the stack trace will show up in the console.

Cheers,

Pierre

---

<div class="post-metadata">

**Author:** ![Jonathan\_Morris](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Morris](https://community.gatling.io/u/Jonathan_Morris)\
**Post date:** [July 11, 2013, 8:27pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/6 "2013-07-11T20:27:41Z")

</div>

I’m getting a file not found exception, which is odd, because I just selected the file in the file chooser…

13:24:56.354 [DEBUG] i.g.r.c.RecorderController - Error while processing HAR file  
java.io.FileNotFoundException: /Users/jonathan/Desktop/landingPage.har (No such file or directory)  
at java.io.FileInputStream.open(Native Method) ~[na:1.6.0\_51]  
at java.io.FileInputStream.(FileInputStream.java:120) ~[na:1.6.0\_51]  
at scala.io.Source$.fromFile(Source.scala:90) ~[scala-library-2.10.2.jar:na]  
at scala.io.Source$.fromFile(Source.scala:75) ~[scala-library-2.10.2.jar:na]  
at scala.io.Source$.fromFile(Source.scala:53) ~[scala-library-2.10.2.jar:na]  
at io.gatling.recorder.har.HarReader$.processHarFile(HarReader.scala:44) ~[gatling-recorder-2.0.0-M3.jar:na]  
at io.gatling.recorder.controller.RecorderController.startRecording(RecorderController.scala:72) ~[gatling-recorder-2.0.0-M3.jar:na]  
at io.gatling.recorder.ui.RecorderFrontend.startRecording(RecorderFrontEnd.scala:68) [gatling-recorder-2.0.0-M3.jar:na]  
at io.gatling.recorder.ui.swing.frame.ConfigurationFrame.io$gatling$recorder$ui$swing$frame$ConfigurationFrame$$reloadConfigurationAndStart(ConfigurationFrame.scala:387) [gatling-recorder-2.0.0-M3.jar:na]  
at io.gatling.recorder.ui.swing.frame.ConfigurationFrame$$anonfun$8.apply$mcV$sp(ConfigurationFrame.scala:86) [gatling-recorder-2.0.0-M3.jar:na]  
at scala.swing.Action$$anon$2.apply(Action.scala:60) [scala-swing-2.10.2.jar:na]  
at scala.swing.Action$$anon$1.actionPerformed(Action.scala:78) [scala-swing-2.10.2.jar:na]  
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) [na:1.6.0\_51]  
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) [na:1.6.0\_51]  
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) [na:1.6.0\_51]  
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) [na:1.6.0\_51]  
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) [na:1.6.0\_51]  
at java.awt.Component.processMouseEvent(Component.java:6414) [na:1.6.0\_51]  
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275) [na:1.6.0\_51]  
at java.awt.Component.processEvent(Component.java:6179) [na:1.6.0\_51]  
at java.awt.Container.processEvent(Container.java:2083) [na:1.6.0\_51]  
at java.awt.Component.dispatchEventImpl(Component.java:4776) [na:1.6.0\_51]  
at java.awt.Container.dispatchEventImpl(Container.java:2141) [na:1.6.0\_51]  
at java.awt.Component.dispatchEvent(Component.java:4604) [na:1.6.0\_51]  
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4619) [na:1.6.0\_51]  
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4280) [na:1.6.0\_51]  
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4210) [na:1.6.0\_51]  
at java.awt.Container.dispatchEventImpl(Container.java:2127) [na:1.6.0\_51]  
at java.awt.Window.dispatchEventImpl(Window.java:2489) [na:1.6.0\_51]  
at java.awt.Component.dispatchEvent(Component.java:4604) [na:1.6.0\_51]  
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717) [na:1.6.0\_51]  
at java.awt.EventQueue.access$400(EventQueue.java:82) [na:1.6.0\_51]  
at java.awt.EventQueue$2.run(EventQueue.java:676) [na:1.6.0\_51]  
at java.awt.EventQueue$2.run(EventQueue.java:674) [na:1.6.0\_51]  
at java.security.AccessController.doPrivileged(Native Method) [na:1.6.0\_51]  
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) [na:1.6.0\_51]  
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97) [na:1.6.0\_51]  
at java.awt.EventQueue$3.run(EventQueue.java:690) [na:1.6.0\_51]  
at java.awt.EventQueue$3.run(EventQueue.java:688) [na:1.6.0\_51]  
at java.security.AccessController.doPrivileged(Native Method) [na:1.6.0\_51]  
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) [na:1.6.0\_51]  
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687) [na:1.6.0\_51]  
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) [na:1.6.0\_51]  
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) [na:1.6.0\_51]  
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) [na:1.6.0\_51]  
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) [na:1.6.0\_51]  
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) [na:1.6.0\_51]  
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) [na:1.6.0\_51]

---

<div class="post-metadata">

**Author:** ![Pierre\_DAL-PRA](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pierre\_DAL-PRA](https://community.gatling.io/u/Pierre_DAL-PRA)\
**Post date:** [July 11, 2013, 9:08pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/7 "2013-07-11T21:08:30Z")

</div>

That’s strange, I have no trouble converting HAR files, whether I use master or 2.0.0-M3…

---

<div class="post-metadata">

**Author:** ![Jonathan\_Morris](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Morris](https://community.gatling.io/u/Jonathan_Morris)\
**Post date:** [July 11, 2013, 9:17pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/8 "2013-07-11T21:17:03Z")

</div>

Can I email you a ZIP file to convert for me? Only partly joking 🙂 .

---

<div class="post-metadata">

**Author:** ![Pierre\_DAL-PRA](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pierre\_DAL-PRA](https://community.gatling.io/u/Pierre_DAL-PRA)\
**Post date:** [July 11, 2013, 9:21pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/9 "2013-07-11T21:21:17Z")

</div>

No problem 😉  
Here’s my email address: pdalpra at excilys dot com

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [July 12, 2013, 5:31am UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/10 "2013-07-12T05:31:26Z")

</div>

Did you use the trick Pierre suggested (forcing the [os.name](http://os.name) System prop)? I’m not sure that would be a good idea, might mess with other stuffs such as file separator. That would explain your FNFE.

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [July 12, 2013, 4:10pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/11 "2013-07-12T16:10:49Z")

</div>

FYI, I’ve opened an issue: [https://github.com/excilys/gatling/issues/1291](https://github.com/excilys/gatling/issues/1291)

---

<div class="post-metadata">

**Author:** ![Jonathan\_Morris](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Morris](https://community.gatling.io/u/Jonathan_Morris)\
**Post date:** [July 15, 2013, 3:01pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/12 "2013-07-15T15:01:56Z")

</div>

Thank you. (I did try the different OS trick, which led to a parsing issue that Pierre is looking into.)

---

<div class="post-metadata">

**Author:** ![Pierre\_DAL-PRA](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pierre\_DAL-PRA](https://community.gatling.io/u/Pierre_DAL-PRA)\
**Post date:** [July 15, 2013, 7:12pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/13 "2013-07-15T19:12:09Z")

</div>

Hi,

The parsing error has been fixed on master : [https://github.com/excilys/gatling/commit/62415adbb872a3f0129a9cd9145fb4b2c6f22250](https://github.com/excilys/gatling/commit/62415adbb872a3f0129a9cd9145fb4b2c6f22250)  
It came from one of the POST requests in your HAR file, which had no _postData_ block, which led to an empty iterator, throwing an exception.

However, I’m still working on a clean fix for the FileNotFound exception.

I can prepare a bundle with the fix if you like 😉

Cheers,

Pierre

---

<div class="post-metadata">

**Author:** ![Jonathan\_Morris](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Morris](https://community.gatling.io/u/Jonathan_Morris)\
**Post date:** [July 15, 2013, 7:17pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/14 "2013-07-15T19:17:32Z")

</div>

That would be most excellent! Many thanks.

---

<div class="post-metadata">

**Author:** ![Pierre\_DAL-PRA](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pierre\_DAL-PRA](https://community.gatling.io/u/Pierre_DAL-PRA)\
**Post date:** [July 15, 2013, 7:33pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/15 "2013-07-15T19:33:09Z")

</div>

Here it is : [https://docs.google.com/file/d/0B6\_4DxjhiwVsczVLTThjWC1jRkE/edit?usp=sharing](https://docs.google.com/file/d/0B6_4DxjhiwVsczVLTThjWC1jRkE/edit?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Jonathan\_Morris](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Morris](https://community.gatling.io/u/Jonathan_Morris)\
**Post date:** [July 15, 2013, 9:43pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3-cant-get-har-archives-to-load-in-recorder/489/16 "2013-07-15T21:43:22Z")

</div>

Would it be possible to provide this as a one-off version as well, like I’ve seen Stephane do from time to time? That would be very helpful. Thanks.
