Installing and/or running HepRApp

Hi, I hope you can help with running HepRApp. However I run
java -jar HepRApp.jar I get the same error:

Error: Unable to initialize main class heprapp.application.Main
Caused by: java.lang.NoClassDefFoundError: org/omg/CORBA/ORB

My problem seems to be java-related but I have the latest java in my path and the output of java -version is
java version “13.0.1” 2019-10-15

I find it hard to follow the documentation on https://www.slac.stanford.edu/~perl/HepRApp. There it is suggested to

Run the self extractor via:
./j2sdk…bin

well, that is not really a Linux syntax, besides the latest jdk-13.0.1 does not provide any j2sdk… I updated CLASSPATH to point to both the directory where HepRApp.jar is and my java environment with no help.

Also, I am puzzled while the file HepRApp.jar is actually a zip file even though I downloaded it with wget (!). Anyhow, unpacking that in /usr/lib/jvm/heprapp and adding that to the path did not seem to help.

Any ideas ? Is HepRApp still maintained ? Where can I find help ??
thanks

1 Like

More info: running a fresh kubuntu 18 on a virtual vmware machine. thx

As HepRApp is for visualization, I’ve moved to the relevant subforum as it may get a better answer here.

thanks. My choice of topics list was very limited hence I had no idea there is HepRApp subforum. Was not one of the choices I believe…

Any update on this issue? I find this same issue when I use newer versions of java. I get the error:

Error: Unable to initialize main class heprapp.application.Main
Caused by: java.lang.NoClassDefFoundError: org/omg/CORBA/ORB

I still have a machine with older versions of java installed and using an older version allows me to use the HepRApp.jar file.

All I can suggest is contacting the HepRApp developers through the methods on the homepage. As the last update was in 2016, it’s likely additional fixes are needed for newer Javas.

I’m afraid we no longer have any funded activity to maintain HepRApp.
If anyone with Java expertise wants to offer to update the package to work with newer Java versions, I can share the source code with them.
But I don’t have the capacity to do this work myself at this time.

HepRApp indeed contains Corba capabilities, due its past use as a client-server event display for physics collaborations. As Corba is not supported in the newer Java versions, it gives this error. We would need a new Java expert to step up, omit the Corba parts of the code (should not be very difficult), and then re-build for the newer Java. As I have not touched Java development myself in many years, it would take me significant time to ramp up to do this task, and I just don’t have funded time to do that work.

Most of the capabilities that were present in HepRApp are also nicely supported by the Geant4 Qt GUI, so I would recommend most users switch to Qt for the kind of interactive capabilities they previously had in HepRApp.

Thank you @jiperl for this update. It’s helpful to know where things stand so I know that it is time to move on. I will have to familiarize myself with the Qt GUI as you suggest. My initial experience with it is with watching some colleagues use it and it doesn’t appear to be quite as easy to perform operations like measuring distances, getting information about volumes, and other geometry debugging tasks that seem so intuitive in HepRApp. But it’s possible that I haven’t seen the full feature set of the Qt GUI.

Thanks!

I faced the same problem. It works fine at my centOS because I had installed it long back in 2018. But now when I am installing it in my ubuntu it shows the same error. I am very used to working with HepRApp. But it seems like there won’t be any update any soon.

Hey, Hello. Just like you, I have been using HepRapp since a very long and I think I might not have installed geant4 with QT flag On (I don’t remember exactly). Have you been able to switch to QT smoothly ? What commands did you use to initiate Qt for your project. I am using the following code block in my main program for setting up UI.

  G4UImanager* UI = G4UImanager::GetUIpointer();  

  if (argc!=1)   // batch mode  
    {
     G4String command = "/control/execute ";
     G4String fileName = argv[1];
     UI->ApplyCommand(command+fileName);
    }
    
  else           //define visualization and UI terminal for interactive mode
    { 
#ifdef G4VIS_USE
   G4VisManager* visManager = new G4VisExecutive;
   visManager->Initialize();
#endif
    
#ifdef G4UI_USE
      G4UIExecutive * ui = new G4UIExecutive(argc,argv);      
      ui->SessionStart();
      delete ui;
#endif
     
#ifdef G4VIS_USE
     delete visManager;
#endif

@jiperl any help will be useful.
Thanks :slight_smile:

Yes, Qt is a good option.

Also, just to say…

For several years, G4VIS_USE and G4UI_USE are no longer needed (see any example) and from 10.6 are no longer set, so you should remove those lines. Also, no harm in instantiating the vis manager even in batch mode, since you could write a HepRepFile file, for example. Also, with Qt it’s good to instantiate G4UIExecutive early (and SessionStart later when you’re ready) in order to capture G4cout.

Hi @jiperl, I ended up using an older version of Java to run the HepRep Viewer.

Hello,

I had the same problem as @tanbotto recognized in his original post (the whole Caused by: java.lang.NoClassDefFoundError: org/omg/CORBA/ORB bit), with my java version. In the end, I was able to get HepRApp working. The problem was somehow in my Mac java setup, perhaps something that came up after my last operating system update to macOS 11.6 Big Sur.

The only java version I had on my path was the one found in /usr/bin/java. This is actually a Mac thing that points to whatever the OS thinks is the most recent version of java on the system. For some reason, it had not found the right one. I got tipped off to this because it produced a different version than was listed in the Java System Preferences window. You can look inside /Library/Java/JavaVirtualMachines/ to see all the different ones you have. I had 12 different JDK’s in there from various updates, 11 of which had a directory name of jdk1.8.0_XYZ.jdk. The 12th one was jdk-12.0.2.jdk, and this was somehow being enumerated as the most recent, even though it was one of the oldest. I followed the directions on this Stack Overflow answer to disable enumeration of that jdk, and it worked no problem. This just meant opening that directory and renaming the info.plist file to info.plist.disabled.

So, you shouldn’t have to revert to an old version to get this to work, it may just be a minor problem with the java setup. I hope this is useful to someone else who is trying to use HepRApp these days.

1 Like

Thank you for these tips, Sam.

John