specify / specify6

Source Code for Specify 6, Biological Collections Management Platform
https://specifysoftware.org
GNU General Public License v2.0
14 stars 6 forks source link

java.lang.ClassNotFoundException on Specify launch #613

Closed maxpatiiuk closed 4 years ago

maxpatiiuk commented 4 years ago

Originally reported by @yvonneekanim and Curtis Clough from the University of Minnesota

Specify crashes on launch Console output:

C02P75XDFVH3:~ Ralph$ /Applications/Specify/bin/Specify4GB.app/Contents/MacOS/./JavaApplicationStub
15:42:23 DEBUG brc.specify.Specify$53:3375 - Checking for update....
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/apple/eawt/AboutHandler
    at edu.ku.brc.specify.Specify.preStartUp(Specify.java:181)
    at edu.ku.brc.specify.Specify.startApp(Specify.java:3280)
    at edu.ku.brc.specify.Specify$53.run(Specify.java:3496)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: com.apple.eawt.AboutHandler
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 16 more

Original message:

We have an installation of Specify 6.7.04 on a MAC with OS version 10.14.6 After clicking on Specify icon to start it the Specify pop up window is displayed and than it goes away.We've tried removing the Specify and re-installing, but it has the same behavior. My SQL is installed and running.

How can I troubleshoot this issue with Specify?

maxpatiiuk commented 4 years ago

@timo11 Do you know how this can be fixed? Currently, they can not open Specify because of that

timo11 commented 4 years ago

Was Specify successfully installed and then stopped working?

It's not possible to run a non-mac specify installer on a mac, right?

timo11 commented 4 years ago

Perhaps Java 1.8 is configured strangely? Or damaged?

yvonneekanim commented 4 years ago

They are having the same issue after installing Amazon Corretto 11

maxpatiiuk commented 4 years ago

Maybe they should try Amazon Corretto 8?

timo11 commented 4 years ago

Yeah. We know 8 should work. We've never tested 11 as far as I know.

maxpatiiuk commented 4 years ago

I tried 11 (a while ago) but it gave me the same exception We may want to consider that in the future

timo11 commented 4 years ago

This may be relevant: http://openjdk.java.net/jeps/272

One of the main points discussed: "In the forthcoming release of JDK 9, internal APIs such as those in the Mac OS X com.apple.eawt package will no longer be accessible"

Hopefully 8 will work.

yvonneekanim commented 4 years ago

They still can't get it to work with Corretto 8. Here's the most recent log file they sent:

Last login: Fri Feb 28 14:29:41 on ttys000-bash: /usr/local/Cellar/jenv/0.2.0-201404260/libexec/../completions/jenv.bash: No such file or directoryC02P75XDFVH3:~ Ralph$ /Applications/Specify/bin/Specify4GB.app/Contents/MacOS/./JavaApplicationStub14:33:50 DEBUG brc.specify.Specify$53:3375 - Checking for update....Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/apple/eawt/AboutHandler at edu.ku.brc.specify.Specify.preStartUp(Specify.java:181) at edu.ku.brc.specify.Specify.startApp(Specify.java:3280) at edu.ku.brc.specify.Specify$53.run(Specify.java:3496) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)Caused by: java.lang.ClassNotFoundException: com.apple.eawt.AboutHandler at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 16 moreC02P75XDFVH3:~ Ralph$

maxpatiiuk commented 4 years ago

@timo11 said that they should delete Amazon Corretto 11 completely This error message still references to files from 11

timo11 commented 4 years ago

The most recent error msg references exactly the same line numbers and files which seems to indicate the same version of java is being used, but it is possible those files did not change between java 8 and 11.

yvonneekanim commented 4 years ago

Someone else from the university of Minnesota is getting a similar error. Both users claim to have uninstalled corretto 11 successfully.

Last login: Wed Mar 18 14:06:32 on console

The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. Abbeys-MacBook-Air:~ abbeyhall$ /Applications/Specify/bin/Specify4GB.app/Contents/MacOS/./JavaApplicationStub 14:08:01 DEBUG brc.specify.Specify$53:3375 - Checking for update.... Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/apple/eawt/AboutHandler at edu.ku.brc.specify.Specify.preStartUp(Specify.java:181) at edu.ku.brc.specify.Specify.startApp(Specify.java:3280) at edu.ku.brc.specify.Specify$53.run(Specify.java:3496) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) Caused by: java.lang.ClassNotFoundException: com.apple.eawt.AboutHandler at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) ... 17 more

yvonneekanim commented 4 years ago

I've pasted the follow up email from Minnesota concerning the errors below. Does this relate to the Java version @timo11 ?

I had one of my MAC guys look at our email and he replied with this info. Ultimately, it looks like this is what is causing the program to fail to launch:

/usr/local/Cellar/jenv/0.2.0-201404260/libexec/../completions/jenv.bash

That file doesn't exist. From what it looks like (without any sort of context) that is a script that is launching the java virtual environment on which Specify works. jenv.bash <-- bash script"

timo11 commented 4 years ago

I have a feeling this doesn't have anything to do with Specify. As far as I can tell jEnv is a software package that "helps you forget how to set your java environment variables". Specify doesn't use it. It's remotely possible install4j does, but my mac doesn't have jenv or jenv.bash and Specify works.

Maybe they should uninstall jenv?

(possibly relevant jenv.bash search result; https://github.com/jenv/jenv/issues/86)

yvonneekanim commented 4 years ago

You're right. It works when the date is on a separate row. Should that be modified in the commented out section on the forms @tlammer ?

tlammer commented 4 years ago

I can. I would expect users to add them one at a time though so I'm not too concerned with it. As long as it is working when added separately, I would mark the bug as confirmed fixed. If you're getting an error message that does not appear to be related to the actual issue when the colspan is too high, I would make that a separate issue, for a future release.

yvonneekanim commented 4 years ago

Another user is having the same issue but this time she's running OS Mojave and Corretto 8. Error log: 12:35:28 DEBUG brc.specify.Specify$53:3375 - Checking for update.... Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/apple/eawt/AboutHandler at edu.ku.brc.specify.Specify.preStartUp(Specify.java:181) at edu.ku.brc.specify.Specify.startApp(Specify.java:3280) at edu.ku.brc.specify.Specify$53.run(Specify.java:3496) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) Caused by: java.lang.ClassNotFoundException: com.apple.eawt.AboutHandler at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) ... 17 more

maxpatiiuk commented 4 years ago

@yvonneekanim tell them to run the following commands in the Terminal and ask them to send the results: ls -ahl /Library/Java/JavaVirtualMachines and java -version

Here is the example output:

Screen Shot 2020-04-08 at 1 14 05 PM
maxpatiiuk commented 4 years ago

I fixed this in macOS 10.15 (Mojave)

The uninstall instructions from the official website worked perfectly: Just execute the following in the terminal: sudo rm -rf /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk

After that, the user can proceed to install Amazon Corretto 8 from here (no restart required)

yvonneekanim commented 4 years ago

That's fine but like I said yesterday, she doesn't have Corretto 11 installed

otal 0 drwxr-xr-x 4 root wheel 128B Apr 7 11:11 ./ drwxr-xr-x 5 root wheel 160B May 23 2019 ../ drwxr-xr-x 3 root wheel 96B Feb 21 13:14 amazon-corretto-8.jdk/ drwxr-xr-x 3 root wheel 96B Feb 23 2018 jdk-9.0.4.jdk/ Rebeccas-iMac:~ ryk$ java -version java version "9.0.4" Java(TM) SE Runtime Environment (build 9.0.4+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

timo11 commented 4 years ago

java 9 is just as bad as 11. 9 is the version at which the apple libraries become unavailable.

maxpatiiuk commented 4 years ago

This will probably delete Java 9 (full instructions here):

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Oracle/Java

Though, before deleting it, they need to make sure that no other application relies on Java 9

maxpatiiuk commented 4 years ago

@timo11 so this probably occurs because JAVA_HOME points to Java 9. Can we make Specify search for amazon corretto 8 and revert to java only if it not present?