# Print Report

**URL:** <https://forum.inductiveautomation.com/t/print-report/9714>\
**Category:** Ignition\
**Created:** [February 16, 2015, 10:55pm UTC](https://forum.inductiveautomation.com/t/print-report/9714 "2015-02-16T22:55:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [February 16, 2015, 10:55pm UTC](https://forum.inductiveautomation.com/t/print-report/9714/1 "2015-02-16T22:55:14Z")

</div>

When right clicking on the report screen and choosing print, I’m getting this error…

```auto
Comparison method violates its general contract!
```

Any ideas? I’m on version 7.5.12 running Java 7u75

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [February 19, 2015, 12:51am UTC](https://forum.inductiveautomation.com/t/print-report/9714/2 "2015-02-19T00:51:23Z")

</div>

Heres the full code…

[code]java.lang.IllegalArgumentException: Comparison method violates its general contract!  
at java.util.ComparableTimSort.mergeLo(Unknown Source)  
at java.util.ComparableTimSort.mergeAt(Unknown Source)  
at java.util.ComparableTimSort.mergeCollapse(Unknown Source)  
at java.util.ComparableTimSort.sort(Unknown Source)  
at java.util.ComparableTimSort.sort(Unknown Source)  
at java.util.Arrays.sort(Unknown Source)  
at java.util.Collections.sort(Unknown Source)  
at sun.java2d.Spans.sortAndCollapse(Unknown Source)  
at sun.java2d.Spans.intersects(Unknown Source)  
at sun.print.PeekGraphics.hitsDrawingArea(Unknown Source)  
at sun.print.RasterPrinterJob.printPage(Unknown Source)  
at sun.print.RasterPrinterJob.print(Unknown Source)  
at com.inductiveautomation.factorypmi.application.print.FPMIPrinterJob.print(FPMIPrinterJob.java:448)  
at com.reportmill.RMViewer.print(RMViewer.java:1001)  
at com.inductiveautomation.factorypmi.plugins.reporting.components.ReportBase.print(ReportBase.java:153)  
at com.inductiveautomation.factorypmi.plugins.reporting.components.ReportBase.print(ReportBase.java:142)  
at com.inductiveautomation.factorypmi.plugins.reporting.components.ReportPanel$1.actionPerformed(ReportPanel.java:70)  
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)  
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)  
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)  
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)  
at javax.swing.AbstractButton.doClick(Unknown Source)  
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)  
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)  
at java.awt.Component.processMouseEvent(Unknown Source)  
at javax.swing.JComponent.processMouseEvent(Unknown Source)  
at java.awt.Component.processEvent(Unknown Source)  
at java.awt.Container.processEvent(Unknown Source)  
at java.awt.Component.dispatchEventImpl(Unknown Source)  
at java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.awt.Component.dispatchEvent(Unknown Source)  
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)  
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)  
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)  
at java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.awt.Window.dispatchEventImpl(Unknown Source)  
at java.awt.Component.dispatchEvent(Unknown Source)  
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.awt.EventQueue.access$300(Unknown Source)  
at java.awt.EventQueue$3.run(Unknown Source)  
at java.awt.EventQueue$3.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)  
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue$4.run(Unknown Source)  
at java.awt.EventQueue$4.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.awt.EventDispatchThread.run(Unknown Source)

Ignition v7.5.13 (b1571)  
Java: Oracle Corporation 1.7.0\_75  
[/code]

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [February 19, 2015, 3:31am UTC](https://forum.inductiveautomation.com/t/print-report/9714/3 "2015-02-19T03:31:23Z")

</div>

This might only be a problem with Java 7. Java 7 had a change that causes this error to occur. You might want to try updating your Java version to a higher version. You could try Java 8.

Or you could try the following:  
Add `-Djava.util.Arrays.useLegacyMergeSort=true` as an argument to Java when when your client is started. More information here: [dertompson.com/2012/11/23/sort-a … in-java-7/](http://dertompson.com/2012/11/23/sort-algorithm-changes-in-java-7/)

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [February 19, 2015, 4:05am UTC](https://forum.inductiveautomation.com/t/print-report/9714/4 "2015-02-19T04:05:31Z")

</div>

I don’t think Java 8 works on the version I’m on. I had to drop from 8 to 7 to get it to work.

Shall I drop down to 6 ?

I’ll try adding the argument first. Having said that, I get the error when using the right click print option. Could i script it differently ?

Thankyou.

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [February 19, 2015, 4:14pm UTC](https://forum.inductiveautomation.com/t/print-report/9714/5 "2015-02-19T16:14:33Z")

</div>

This is the code for the client launcher.

[code]\<?xml version="1.0" encoding="utf-8"?\>

Mobile Spoolbase  
Inductive Automation  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
[/code]

Where in there do I add the new argument ?

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [February 19, 2015, 4:29pm UTC](https://forum.inductiveautomation.com/t/print-report/9714/6 "2015-02-19T16:29:34Z")

</div>

Try sticking this property in there under the existing properties:

```auto
<property name="java.util.Arrays.useLegacyMergeSort" value="true"/>
```

If that doesn’t work then use a native client launcher to create a shortcut to your project. Then add -Djava.util.Arrays.useLegacyMergeSort=true to the target of the shortcut. Here’s an example:

```auto
C:\Users\nick\Desktop\clientlauncher.exe scope=C project=CompanyProject windowmode=window gateway.addr=192.168.1.4:8088:8043 -Djava.util.Arrays.useLegacyMergeSort=true
```

Let me know how it goes.  
Best,

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [February 20, 2015, 3:00pm UTC](https://forum.inductiveautomation.com/t/print-report/9714/7 "2015-02-20T15:00:52Z")

</div>

Adding the property worked…

Thanks Nick.
