Skip to main content
Solved

IFS Developer Studio 18 install fails with "Comparison method violates its general contract" error

  • October 10, 2024
  • 7 replies
  • 84 views

Forum|alt.badge.img+2

I am getting a “Comparison method violates its general contract” error when running the installer for IFS Developer Studio 18 that prevents it from working:
 

 

I obtained the installer from this website: https://developer.ifs.com/tools/devstudio

I’ve spent hours trying to get the installer to work, but I have not been successful. I have attached the log file for the installer (please see the attached IFSDeveloperStuidoInstalllFail.txt), and the stack trace for the error begins on line 233.

 

Best answer by jbaxter7

I got the installer to work.

As crazy as it sounds, the reason the installer was failing was because I had a shortcut on my desktop that was pointing to something that no longer existed. I basically figured it out by creating java code for a GUI that allows you to choose a location on the file system since from the stack trace in the log for the installer I realized that's what the installer was doing. When I created the code in eclipse, I set it up to use Open JDK 11 since that’s the JDK that the installer uses.

This is the code I used to replicate the error:
 

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JFileChooser;
import java.io.File;
public class MyDialog extends JDialog  {

    public MyDialog(){
        super(new JFrame("prova"));
    }

    
    void selectRoot() {
        JFileChooser ch = new JFileChooser();
        ch.showOpenDialog(this);
        File directory = new File("C:\\Users\\e302528\\Documents\\NMRO\\Software\\IFSDeveloperStudio");
        ch.setCurrentDirectory(directory);
    }
     


    public static void main(String[] args) throws Exception{
        MyDialog myDialog = new MyDialog();
        myDialog.show(true);
        myDialog.selectRoot();
    }
}

When I ran the code I was able to get the same exact error as the installer, and I put a break point at the call to Arrays.sort at line 317 in Win32ShellFolderManager2.class code (from the installer stack trace, I knew it was failing somewhere in Win32ShellFolderManager2) so that I could grab a list of file paths on my machine from the secondLevelFolders variable when I ran my code in debug mode:

I realized that the  majority of the file paths were paths to desktop shortcuts, and I deleted the shortcuts one by one until the installer worked. It worked right after I deleted a desktop shortcut that pointed to something that no longer exists.

View original
Did this topic help you find an answer to your question?

7 replies

DeshAbey
Do Gooder (Employee)
Forum|alt.badge.img
  • Do Gooder (Employee)
  • 3 replies
  • October 10, 2024

Hi @jbaxter7,

The issue appears to be related to your Java version. According to the log, you're using version 8, but IFS Developer Studio 18 requires JDK 11 or higher. It officially supports JDK 11, 17, and 20. Could you try updating your Java version and run it again? And please let us know the outcome.

Best Regards,
Deshan


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Customer)
  • 4 replies
  • October 10, 2024

I’ve tried using Open JDK 11 and that didn’t work either. I also have a coworker that only has JDK 8 installed but it worked for him.


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Customer)
  • 4 replies
  • October 14, 2024

From my understanding looks like the installer installs OpenJDK 11.0.11, and is using that to run since in the log file java.home is set to C:\Users\e302528\AppData\Local\Temp\NBI58890.tmp\_jvm and the first value for java.library.path in the log file is C:\Users\e302528\AppData\Local\Temp\NBI58890.tmp\_jvm\bin, which is the JDK that the installer created. When I go to C:\Users\e302528\AppData\Local\Temp\NBI58890.tmp\_jvm\bin in command prompt and run the command “java --version”,  it prints out Open JDK 11.0.11 which is also printed out in the log file. Since looks like the installer is installing this JDK and using it to run, I have no idea why it’s not working.


DeshAbey
Do Gooder (Employee)
Forum|alt.badge.img
  • Do Gooder (Employee)
  • 3 replies
  • October 15, 2024

We have made a new release of IFS Developer Studio 18 tool a two days ago. Could you please download it and try out?


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Customer)
  • 4 replies
  • October 15, 2024

I downloaded it but still got the same error when running it.


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Customer)
  • 4 replies
  • Answer
  • October 15, 2024

I got the installer to work.

As crazy as it sounds, the reason the installer was failing was because I had a shortcut on my desktop that was pointing to something that no longer existed. I basically figured it out by creating java code for a GUI that allows you to choose a location on the file system since from the stack trace in the log for the installer I realized that's what the installer was doing. When I created the code in eclipse, I set it up to use Open JDK 11 since that’s the JDK that the installer uses.

This is the code I used to replicate the error:
 

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JFileChooser;
import java.io.File;
public class MyDialog extends JDialog  {

    public MyDialog(){
        super(new JFrame("prova"));
    }

    
    void selectRoot() {
        JFileChooser ch = new JFileChooser();
        ch.showOpenDialog(this);
        File directory = new File("C:\\Users\\e302528\\Documents\\NMRO\\Software\\IFSDeveloperStudio");
        ch.setCurrentDirectory(directory);
    }
     


    public static void main(String[] args) throws Exception{
        MyDialog myDialog = new MyDialog();
        myDialog.show(true);
        myDialog.selectRoot();
    }
}

When I ran the code I was able to get the same exact error as the installer, and I put a break point at the call to Arrays.sort at line 317 in Win32ShellFolderManager2.class code (from the installer stack trace, I knew it was failing somewhere in Win32ShellFolderManager2) so that I could grab a list of file paths on my machine from the secondLevelFolders variable when I ran my code in debug mode:

I realized that the  majority of the file paths were paths to desktop shortcuts, and I deleted the shortcuts one by one until the installer worked. It worked right after I deleted a desktop shortcut that pointed to something that no longer exists.


DeshAbey
Do Gooder (Employee)
Forum|alt.badge.img
  • Do Gooder (Employee)
  • 3 replies
  • October 16, 2024

Glad to hear it worked! Happy coding! 💻✨


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings