[Building Sakai] setenv.sh file configuration

Matthew Jones matthew at longsight.com
Mon Jul 21 11:58:28 PDT 2014


Yes, if you're using any version of Java 7 you should use this flag unless
you want to see random errors ArrayIndexOutOfBounds errors.

The issue was http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8011944.

Update: However Java 7 Update 65 was *just* released a last week on July
15, 2014 and as expected the fix for a few of the breaking sort bugs is in
there.

I *just* tested 1.7.0_55 and it fails the MergeSort test where 1.7.0_65
passes. 1.7.0_65 is so new it isn't even in the Ubuntu repos yet so I
tested with the Oracle JRE.

It's possible we have may sorts that are still a problem with the new
MergeSort so I'm not sure if this takes care of every sort problem with the
new sort, but seems much better after _65.

%java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
%java BreakTimSort
 Total:  40201
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 19
at java.util.ComparableTimSort.pushRun(ComparableTimSort.java:352)
 at java.util.ComparableTimSort.sort(ComparableTimSort.java:181)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
 at java.util.Arrays.sort(Arrays.java:472)
at BreakTimSort.run(BreakTimSort.java:67)
at BreakTimSort.main(BreakTimSort.java:71)

%java -version
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
%java BreakTimSort
 Total:  40201




On Mon, Jul 21, 2014 at 1:35 PM, Sanghyun Jeon <euksa99 at gmail.com> wrote:

> Hello all,
>
> I read -Djava.util.Arrays.useLegacyMergeSort=true is required for Java 7
>
> "As of June 19, 2013, an issue has been reported with respect to Java 7
> compatibility. The problem is in the Comparators and the workaround is to
> use the JVM property
>
> -Djava.util.Arrays.useLegacyMergeSort=true"
>
> I am using Sakai 2.9.3 with Tomcat 7 and Java 7 and I am wondering this is
> still true: do I need to add "-Djava.util.Arrays.useLegacyMergeSort=true"
>
> into Sakai 2.9.3?
>
>
> Thank you in advance.
>
>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140721/dd75ac12/attachment.html 


More information about the sakai-dev mailing list