Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load JRE from The bundle “Java SE 8” #3587

Closed
sentian opened this issue Dec 28, 2017 · 77 comments
Closed

Could not load JRE from The bundle “Java SE 8” #3587

sentian opened this issue Dec 28, 2017 · 77 comments
Labels
os: macOS status: waiting-for-feedback The submitter or other users need to provide more information about the issue

Comments

@sentian
Copy link

sentian commented Dec 28, 2017

I'm using MAC. When I update JabRef from 4.0 to 4.1, I get the following error when I try to open the application. I tried to reinstall the 4.0 version and even tried the 4.2 developer version. No luck. I also tried to update my Java from 1.8.0_151 to 1.8.0_152, and the problem is still not resolved. I would appreciate any help since I use JabRef everyday. Thanks.

Error message: An internal error occurred (error code: Could not load JRE from The bundle “Java SE 8” couldn’t be loaded because its executable couldn’t be located..)

JabRef version: 4.0 and 4.1, on macOS High Sierra 10.13.2
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

@LinusDietz
Copy link
Member

Thats quite odd, and it does not happen on my system, which admittedly is still on Java 1.8.0_144. Maybe there is a problem with newer Java versions?
Unfortunately, I can't check it out any time soon, since I'm on travel. Would you mind checking if JabRef starts on your Mac with Java 1.8.0_144?

@LinusDietz LinusDietz added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Dec 29, 2017
@sentian
Copy link
Author

sentian commented Dec 29, 2017

Thanks for the prompt reply. I can confirm that the error occurs with Java 1.8.0_144. I actually upgraded from 144 to 152, to see whether that can fix the issue. But it still exists.

@LinusDietz
Copy link
Member

Okay, can you try compiling jabref from the sources? That would be:

git clone https://github.com/JabRef/jabref.git --depth 1
cd jabref
./gradlew run

If this works, there's a problem with your Java environment. If it doesn't, it will probably exactly tell you what the problem of your Java environment is. (;
(Third option is that our MacOs packaging is broken, but, at least you can run JabRef from command line while we fix that)

@tobiasdiez
Copy link
Member

You may also try to run JabRef from the terminal using java -jar JabRef.jar. This usually displays a more detailed error message.

@sentian
Copy link
Author

sentian commented Dec 29, 2017

Thank you both for the help. I tried compiling from sources and also running JabRef from the terminal. Both worked. I then reinstalled using the mac dmg file and now it's working. Does it have something to do with my Java environment?

Thanks again for the prompt help.

@bsecon
Copy link

bsecon commented Jan 3, 2018

Hi,
I am experiencing the same problem but the workarounds suggested above do not work for me. Strangely, building from source fails with an exception.
I am using macOS High Sierra 10.13.2
java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

Any help would be greatly appreciated.

@halirutan
Copy link
Collaborator

@bsecon To the best of my knowledge, Java 9 is still not supported. Please try with Java 1.8.0_152.

@KennethJohnKelly
Copy link

Same happened to me, including failure to build:

Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
Could not create service of type CrossBuildFileHashCache using BuildSessionScopeServices.createCrossBuildFileHashCache().

Do you not have an archive that would allow me to use JabRef again?

@nathanielolin
Copy link

I had the same problem as @sentian (and confirmed my version of Java, reinstalled the JRE and JDK, restarted, etc).

Compiling from source worked to run the application, as did running the standalone JabRef.jar download from the terminal. However, when I do either of those, the application runs incredibly slowly, freezing up (spinning rainbow wheel) for about 10 seconds whenever I click on anything, and CPU usage jumping to 40%. I'm on OS X Sierra, and did double-check that the localhost issue referenced in the installation documentation is fixed (it is).

Any ideas where this lag would be coming from / why I can't start the app up normally?

java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

@Siedlerchr
Copy link
Member

I googled a bit around and the only thing I find is this:
Maybe it works if we switch back the inlcuded jre to 144?
https://bugs.openjdk.java.net/browse/JDK-8189730
Maybe we need to add the 144 version back to mac in install4j? I will try to create a branch config and you can test that

@Siedlerchr
Copy link
Member

I created a version of the current dev version which explicit uses 144 for mac:
http://builds.jabref.org/install4jmacjavaversion/
Could you please try if this works for you?

@nathanielolin
Copy link

Thanks for putting that together @Siedlerchr . I tried the dmg, but got the same results:
image

@halirutan
Copy link
Collaborator

Compiling from source worked to run the application, as did running the standalone JabRef.jar download from the terminal. However, when I do either of those, the application runs incredibly slowly, freezing up (spinning rainbow wheel) for about 10 seconds whenever I click on anything, and CPU usage jumping to 40%. I'm on OS X Sierra, and did double-check that the localhost issue referenced in the installation documentation is fixed (it is).

@nathanielolin I cannot confirm this. I compiled from the current source yesterday with java 1.8.0_144 and I'm on High Sierra on my work Mac too. I don't know the exact version now. If you indeed use the java version you reported and you ran ./gradlew releaseJar from inside the JabRef directory on the latest master, I'm not sure what to suggest. This is very odd.

@radeksimik
Copy link

I can report the same problem (current High Sierra and Java). I keep getting it even after downgrading to 4.0. This time with this message:

screen shot 2018-01-05 at 11 12 25

@matthiasgeiger
Copy link
Member

Sounds to me like an install4j problem...

@Siedlerchr
Copy link
Member

This would be my second idea, because we updated the install4j version, too

@nathanielolin
Copy link

@halirutan perhaps moot at this point but I'm running Sierra, not High Sierra. Not sure if that matters.

@Siedlerchr
Copy link
Member

@nathanielolin Could you please try again with that version here?`https://builds.jabref.org/install4jmacjavaversion/
I downgraded the install4j version. Hope that helps.

@nathanielolin
Copy link

Thanks @Siedlerchr , I appreciate the continued help. Unfortunately, I now get the same error message @radeksimik is getting:

image

@Siedlerchr
Copy link
Member

Damn, okay, as I don't own a Mac I have no further ideas what the problem could be

@bsecon
Copy link

bsecon commented Jan 8, 2018

@nathanielolin Could you please try again with that version here?`https://builds.jabref.org/install4jmacjavaversion/
I downgraded the install4j version. Hope that helps.

@Siedlerchr
This version works for me, thank you for your help! I also downgraded to the following Java version: Build 1.8.0_152-b16
I hope this will work for others, too.

@radeksimik
Copy link

@nathanielolin & @Siedlerchr Thanks guys, this combination works for me too (although necessarily in that order: first Java downgrade, then JabRef update). So relieving to see my JabRef up and running again.

@Siedlerchr
Copy link
Member

Siedlerchr commented Jan 8, 2018

Okay, this is good to know. Then I think we can conclude that this is an install4j bug in the current version
Would you please just state your environment (mac version and 32bit/64bit) then we can report this to isntall4j

@radeksimik
Copy link

radeksimik commented Jan 8, 2018

@Siedlerchr Well, I should add that I haven't tried 4.1 in combination with the downgraded Java version. If it works, then there might also be an incompatibility with current Java, rather than just a bug in install4j. Here's the system info:

screen shot 2018-01-08 at 10 39 47

@bsecon
Copy link

bsecon commented Jan 8, 2018

@Siedlerchr @radeksimik 4.1. did not work for me after downgrading Java, so the install4j explanation appears to make sense.
Here is my info:
bildschirmfoto 2018-01-08 um 10 39 07

@radeksimik
Copy link

@bsecon Ok cool, although there clearly also an issue with current Java (or the way the 4.2-beta JabRef interacts with it).

@aniruhil
Copy link

aniruhil commented Jan 8, 2018

https://builds.jabref.org/install4jmacjavaversion/JabRef-4.2-dev--snapshot--2018-01-06--install4jmacjavaversion--9ec81c0c7.jar

This launches on my macOS Sierra version 10.12.6 (16G1114)

and I have Java updated to version 8 build 151

but the dmg fails to launch jabref after install

@aniruhil
Copy link

$ echo $PATH
/usr/local/opt/imagemagick@6/bin:/usr/local/opt/gdal2/bin:/usr/local/opt/openssl/bin:/Users/ruhil/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/munki:/Library/TeX/texbin

@halirutan
Copy link
Collaborator

OK, no mystical Java entry there either.

In any case, the only reliable way on Mac OS seems to be to ship the JRE with the application. Then, JabRef should always use the JRE we provide without trying to find it on the users' machine.

One last question. Does it work now if you start JabRef from the commandline with

INSTALL4J_LOG=yes /Applications/JabRef.app/Contents/MacOS/JavaApplicationStub 2&> JabRefLog.txt

and if yes, I would be interested in the log as well. I want to see if it uses the 161 version now. If it doesn't work, would you be so kind to restart your computer and try again?

@aniruhil
Copy link

aniruhil commented Jan 24, 2018

Here it is ...

JabRefLog.txt

I upgraded to 9.0.4 so hopefully that hasn't made all the difference or messed up your diagnoses.

@halirutan
Copy link
Collaborator

@aniruhil Nice. Now it looks OK although you installed the wrong JRE 😄 because you used version 9, which is not supported. But what happens now is that the launcher sees the invalid version 9 and tries the other locations. In the end, it uses your 1.8.0_161 JDK that you have installed during the many trials

@aniruhil
Copy link

:) my apologies but all I can say is thanks for your hard work. I am finally at peace now that all is well with my JabRef world!

@serialc
Copy link

serialc commented Jan 24, 2018

I can confirm that running the latest release *.jar works right away, but a regular installation with a dmg file requires uninstalling JabRef and then reinstalling the *.dmg.

TLDR: Uninstall JabRef then reinstall latest dmg

@halirutan
Copy link
Collaborator

I just received a message from Install4J support that I posted in the chat. Their suggestions would indeed explain the weird behavior we saw.

I would really like to verify this. Therefore, if someone still has this issue and installed JabRef under /Applications, it would be helpful if he could check what the following terminal command gives:

 ls -R /Applications/JabRef.app/Contents/PlugIns/

@aniruhil
Copy link

@halirutan

Caveat: JabRef works for me but curiously enough I get

$ ls -R /Applications/JabRef.app/Contents/PlugIns/
ls: /Applications/JabRef.app/Contents/PlugIns/: No such file or directory

I then manually checked package contents and under Contents I only have

/java
/MacOS
/Resources
Info.plist
PkgInfo
vmoptions.txt

So no PlugIns folder at all!

@martinweiss
Copy link

I get the same message as @aniruhil when executing the command.

@halirutan
Copy link
Collaborator

halirutan commented Jan 25, 2018

@aniruhil Yes, and if JabRef works now, it is correct that you don't have this directory. I believe the following happened:

  1. You had an old JabRef installation that did contain this directory and a JRE inside it
  2. This JRE will always be used as default if it is available
  3. It would explain why @aniruhil had a mysterious Java version 1.8.0_112 that was nowhere to be found
  4. You all fixed it by uninstalling JabRef first and then re-installing it which obviously deletes everything. If you just install a new dmg without deleting the old one, it seems that the old JRE was kept

What I would like to know is, if either you @aniruhil or you @martinweiss would first completely delete the old JabRef and then just grab the latest dmg from the master branch, does it work as well?

You can install JabRef in a whole different directory, without deleting the old one. That should work too

@aniruhil
Copy link

I just did, @halirutan, and it installed and launched as expected

@stefan-kolb
Copy link
Member

Can we close this or do we have to act in some way, still?

@halirutan
Copy link
Collaborator

@stefan-kolb Yes. In the end, we could clearly identify what went wrong. It's summarized in my previous comment.

@Dapscoptyltd
Copy link

Having the same problem now. Should have continued ignoring the update request ;-( LOL. Anyway. Realising it isn't your fault. I'll go through what I had and did. (Sorry, I didn't note which version of Java I was using before build 161 - but it was a Java 7 (scary 8-{ mistake there I know).

Sequence today at 31 March 2018:

  1. With Java 7(?) installed.
    • Downloaded "JabRef_macos_4_1.dmg"
  2. Installed (noting I selected existing version update option).
    • Security settings initially refused to install - manual override clicked.
  3. Followed install and selected "Run JabRef".
    • JRE error as above shown in "nathanielolin commented on 5 Jan" post.
  4. Reinstall run of "JabRef_macos_4_1.dmg".
    • Same error.
  5. Load Java 8 Build 161. (Oops...)
  6. Re run install of "JabRef_macos_4_1.dmg".
    • Same error as above.
  7. Come here. THANKS YOU GUYS AND GIRLS!
  8. Download and install "JabRef_macos_4_2-dev--snapshot--2018-03-30--master--b3b0b44ef.dmg".
    • Same error.
  9. Enter state user - mild panic. Swear under breath at JabRef...
  10. Continue reading this post.
    • Attempt to find Java 8 build 151 - no success (can you find a safe link please and add that?)
  11. Download "JabRef--master--latest.jar".
  12. Manual delete "JabRef_macos_4_2-dev--snapshot--2018-03-30--master--b3b0b44ef.dmg" (move to Trash selected).
  13. Install "JabRef--master--latest.jar."
  14. Run JabRef.
    • JabRef running without loss of data.
  15. Go drink celebratory vodka[s] pluralzzz wwodkaazzz. Sallutzzze JabRef developerzz.
  16. Writtte Bugff Fiickz Helppz Postzz to Jab Refszzz developerszzzz.
  17. Fall off chair with vodka bottle on chest...
  18. Back to my research! Thanks all.
    Warren (https://github.com/Dapscoptyltd)

@Dapscoptyltd
Copy link

Hi all. Question: Correct me if I am wrong, but; the jar version I have working "JabRef--master--latest.jar", isn't a full release? I ask this because quitting and opening doesn't give me the JabRef icon for the dock, and "Java" is displayed in the Main title bar at top no screen. Any thoughts on when the problem will be fixed? I don't mind - the software is working, that's what matters.

@halirutan
Copy link
Collaborator

halirutan commented Apr 1, 2018

@Dapscoptyltd Quick questions like this can additionally be asked in our Gitter chat. You are correct, the .jar is just the java package and not a complete application. We are currently taking steps to get the application signing working again so that installing the dmg get's easier. The real OS X application that is installed through the dmg will take care of icons in the dock and in the application bar.

@Dapscoptyltd
Copy link

Dapscoptyltd commented Apr 2, 2018 via email

@florianhartig
Copy link

florianhartig commented Apr 27, 2018

I just installed the new 4.2 release, and the problem persists on the latest Mac Sierra 10.13.4 (17E199), Java (build 1.8.0_171-b11).

I suspect that the problem must be in some settings that are kept from the previous version - the installer says that it removes the previous JabRef version, but apparently it is doing something else, because removing JabRef by hand and re-installing it fixes the problem (please disregard my comments if you have already discussed this here, I just skimmed the comments, it's a lot of text. Just wanted to let you know there's still a problem).

@DanieleTampieri
Copy link

I had the same problem of florianharting: and after uninstalling the older version of JabRef and installing the new one, it works perfectly.

@halirutan
Copy link
Collaborator

@koppor @tobiasdiez @Siedlerchr Question: Did anyone of you take care to update the Install4J script to remove the old JabRef application completely before it is installed over the same location?

@koppor
Copy link
Member

koppor commented Apr 30, 2018 via email

@elternativeht
Copy link

Ran into the same issue when updating from JabRef 4.1 to 4.2 in High Sierra 10.13.2. Problem persists when latest version of JRE was installed. Solved the issue mainly by deleting the whole JabRef.app in /Applications/ directory. The latest installation app claimed it was uninstalling the original app but it did not change the configuration file.

@chokung
Copy link

chokung commented May 15, 2018

Confirming the issue on 4.2 running on High Sierra 10.13.4;

For those who want to upgrade JabRef from the previous version, please delete the older one in /Applications and then reinstall the newer version.

@jreniel
Copy link

jreniel commented Jun 30, 2018

Confirming the same behavior on macOS High Sierra. Fix was to delete the original JabRef from /Applications and do a fresh install.

@Dapscoptyltd
Copy link

HI all. Just a note to developers. I installed the last version you deployed and on my Mac, with High Sierra 10.13 installed, JabRef is working okay at present. MANY MANY THANKS. Talk soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: macOS status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
None yet
Development

No branches or pull requests