Dbeaver: Failed to create java virtual machine .

Created on 26 Jul 2019  路  32Comments  路  Source: dbeaver/dbeaver

System information:

  • Operating system (distribution) and version
    OS Name Microsoft Windows 10 Enterprise
    Version 10.0.18362 Build 18362

  • DBeaver version
    6.1.3

  • Java version
    Recommended Version 8 Update 221 (filesize: 1.97 MB)

  • Additional extensions
    None

Upgrade dbeaver 6.1.0. to 6.1.3 and happens this problem

in cli mode show this error :

/lib/ext exists, extensions mechanism no longer supported; Use -classpath instead.

bug can't reproduce

Most helpful comment

Was able to get Dbeaver to start with an installation of Oracle JDK 8 update 202 on my Mac in /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home I just had to edit the /Applications/DBeaver.app/Contents/Info.plist file.

I added the following under the <key>Eclispe</key>

<key>Eclipse</key>
  <array>
    <string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java</string>
    <!-- Other properties left out-->
  </array>

Dbeaver would fail to start with AdoptOpenjdk version 11.0.6

Works for Oracle JDK 8 Update 202

java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

Fails for AdoptopenJDK version 11.0.6

openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

All 32 comments

Same for me Java 1.8.0_91

Rolled back to 6.1.1 and working ok.

Same for me Java 1.8.0_91

Rolled back to 6.1.1 and working ok.

Although this bug is there, it's the only fast fixing solution
Once you completely remove the software and install it again, the problem will be resolved

Doesn't the installer perform an uninstall first? What component needs uninstalling to workaround the error?

Doesn't the installer perform an uninstall first? What component needs uninstalling to workaround the error?

1- First Remove DBeaver
2- install again and with reset setting
image

Do not forget about this part
Environment variables > system variables > Path
C:\Program Files (x86)\Java\jre1.8.0_221\bin

image

Why don't you want to use JDK shipped along with DBeaver (OpenJDK11 in 6.1.+)?
There is no need to install any JRE/JDK anually and bundled JDK is the most tested and well-suitable JDK version for DBeaver.

In my case, to rollback, you don't need to manually uninstall current version and reset settings while installing older. Just install older version (I also changed install path), and it will save all your connections and settings.
(Saved scripts you can find there: C:\Users\user\.dbeaver4\General\Scripts)

I'm using Windows 10, haven't messed with the settings as far as using the bundled JDK, and I have Java 1.8.0 installed and in path anyways, but I also had this issue with the latest update and went back to 6.1.0

There seems to be a lot of confusion here. I uninstalled 6.1.1 using the uninstaller and then installed 6.1.3 with 'reset settings' and it worked fine. I didn't do anything to my Java path and I didn't lose any connections or scripts, they all carried over fine.

There seems to be a lot of confusion here. I uninstalled 6.1.1 using the uninstaller and then installed 6.1.3 with 'reset settings' and it worked fine. I didn't do anything to my Java path and I didn't lose any connections or scripts, they all carried over fine.

i say in older post for me solve with this way.

@serge-rider please change this labels to bug because many user when upgrade to 6.1.3 have this problem
this is not question this subject is problem with upgrade to new version

@RooyeKhat I still can't figure out what is actually wrong.

  1. What the point to install Java manually? It is already included in the DBeaver installer.
  2. We use Java 11 since 6.1.1.
  3. Please post some error message/screenshot/stacktrace. At the moment it is not clear what is this ticket about.

@RooyeKhat I still can't figure out what is actually wrong.

  1. Please post some error message/screenshot/stacktrace. At the moment it is not clear what is this ticket about.

I believe these steps should reproduce the issue (sorry, haven't tested as I only have one environment available and I'm using that to work in). OS is Windows 10.

  1. Install DBeaver 6.1.0
  2. (there may be a step here to create some clutter in the settings etc)
  3. Run DBeaver 6.1.3 installer without 'reset settings' checked
  4. Start DBeaver
  5. Observe that application fails to start with error "Failed to create Java Virtual Machine"

EDIT
The OP also provided a CLI error which suggests that for some reason DBeaver is performing a compatibility check on the Java runtime but _it is not checking the correct runtime_. It is checking the run time at JAVA_HOME, not the supplied supplied java 11 runtime. This is a bit speculative but it seems to add up.

Info on the compatibility check and error message here introduced in Java 9:
https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-2C896CA8-927C-4381-A737-B1D81D964B7B

6.1.4 also has the same issue. Installed with reset settings unchecked and error message appears when starting the app. Reinstalled with reset settings checked and app started without errors.

@serge-rider any update ?

Same here with 6.1.5, you have to reset settings at reinstall, what a bugger [sigh].

@RooyeKhat it worked your solution for me, thank you!

HI! For the EE 6.2.0 install, I had the same issue. I found if I installed the Community 6.2.3 with JRE package, the 6.2.0 launched without failure. <> This is the second time I have run into this error. The first time with the EE 6.1 version, adding the Java Heap Size and Memory Size to the Java Options in the System Environment Variables fixed the issue. When I installed 6.2.0, it all broke. So, I dunno if the next version is going to break all this, but for now, it's all up and running and working great. Good luck with anyone still having this issue.

Same problem with 6.2.5. I just downloaded & installed 6.2.3 version and all works again
https://github.com/dbeaver/dbeaver/releases/tag/6.2.3

Same problem with 6.3.3 and openjdk 11.0.6 on macOS

Was able to get Dbeaver to start with an installation of Oracle JDK 8 update 202 on my Mac in /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home I just had to edit the /Applications/DBeaver.app/Contents/Info.plist file.

I added the following under the <key>Eclispe</key>

<key>Eclipse</key>
  <array>
    <string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java</string>
    <!-- Other properties left out-->
  </array>

Dbeaver would fail to start with AdoptOpenjdk version 11.0.6

Works for Oracle JDK 8 Update 202

java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

Fails for AdoptopenJDK version 11.0.6

openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

Thanks @dgcofer
There is small syntax error on your config.

```
Eclipse

-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java

@dgcofer Any thoughts on why it would fail with AdoptOpenJDK? I got it to work with the standard OpenJDK 11 installed with brew cask install java11 fwiw, so it doesn't appear to be the "open" vs Oracle part.

I'm having this issue with version 7.0.1.
macOS High Sierra 10.13.6

@neverfox

$ brew cask install java11
Error: Cask 'java11' is unavailable: No Cask with this name exists.

Tap brew tap homebrew/cask-versions

@steveoh You need to tap versions first: brew tap homebrew/cask-versions (as I see you picked up on).

I'm having this issue with version:
Dbeaver 7.0.1.
macOS Mojave 10.14.5 (18F132)
java -version
openjdk version "14" 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

I'm having this issue with version:
Dbeaver 7.0.1.
macOS Mojave 10.14.5 (18F132)
java -version
openjdk version "14" 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

Yeah, i got this message when launch dbeaver Failed to create the Java Virtual Machine.
Well, i solved this by using this java version

java -version

java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

I'm having this issue with version:
Dbeaver 7.0.1.
macOS Mojave 10.14.5 (18F132)
java -version
openjdk version "14" 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

Yeah, i got this message when launch dbeaver Failed to create the Java Virtual Machine.
Well, i solved this by using this java version

java -version

java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

Thank miun173, this means that I have to downgrade the java version from 14 to 12.
I will update asap.

Miun173, BINGO!
Thank you very much.

Issue with OpenJDK for MacOS is tracked in #8229

I had this problem but after latest adoptopenjdk 11.0.7 it started to work again on my mac.

1.3 works for me. Thank you all.

$ brew cask install adoptopenjdk13
$ java -version
openjdk version "13.0.2" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.2+8, mixed mode, sharing)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dpsspatial picture dpsspatial  路  34Comments

sonntagd picture sonntagd  路  54Comments

cldscchttn picture cldscchttn  路  53Comments

dmlogic picture dmlogic  路  36Comments

christophemacabiau picture christophemacabiau  路  32Comments