Bug #27887 Migration Toolkit Does not recognise Java
Submitted: 17 Apr 2007 15:33 Modified: 8 Aug 2007 20:42
Reporter: Louis Breda van Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S1 (Critical)
Version:1.1.11 OS:Windows (VISA 64)
Assigned to: CPU Architecture:Any
Tags: JAVA6

[17 Apr 2007 15:33] Louis Breda van
Description:
Hello, 

I tryed to migrade ms-access databases to MySQL, but could NOT use the migration tool. 

Already month now, the migration toolkit does NOT recognise the java runtime system (JRE6U1 also tryed JRE5 R10).

At start up screen shows that the initialized Java loader failed.

IMHO a S1 problem, since the tool does not run at all.

Sincerely,

Louis   

How to repeat:
Just start the tool and look at the screen.

Suggested fix:
Probably not to hard to fix :>
[17 Apr 2007 19:30] Valeriy Kravchuk
Thank you for a problem report. Please, send tyhe results of:

java -version

from cmd.exe.
[17 Apr 2007 19:38] Louis Breda van
Hello,

I tried java -version. The answer is "java is not recognised as an cmd, programm or batch"

So, I assume java is not in the path. I do not know if that should be !!??

Louis
[18 Apr 2007 7:05] Valeriy Kravchuk
Please, sxend the results of:

echo %PATH%

from cmd.exe.
[18 Apr 2007 7:10] Louis Breda van
Hello,

echo %path% =>
C:\Windows\system32;C:\Windows\System32\Wbem

Note that latest Java is in :
C:\Program Files\Java\jre1.6.0_01\bin
where other java versions are in version related directrorys

Sincerely,

Louis
[20 Apr 2007 10:21] Valeriy Kravchuk
So, please, add C:\Program Files\Java\jre1.6.0_01\bin to PATH and check if it will make any difference in your case.
[20 Apr 2007 11:44] Michael G. Zinner
Hi,

please note that it's not the PATH that counts, but the correct registration of Java in the Windows Registry.

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6

This key has to have an entry JavaHome and RuntimeLib.

The Java installer should have made those entries. Otherwise MT does not work.

Mike
[20 Apr 2007 11:55] Louis Breda van
Java registry keys found

Attachment: JavaRegKeys.reg (application/octet-stream, text), 1.98 KiB.

[20 Apr 2007 12:00] Louis Breda van
Hello Michael,

I just posted the registry file to you / the forum. All registry files you were refering to are there. In fact four times.
(java runtime 1.5 / 1.5.0_10 / 1.6 / 1.6.0)

Note that they are all refering to the 64-bit programm tree
C:\Program Files\Java\jrexxxx and jrecccc\bin

Louis
[20 Apr 2007 12:05] Michael G. Zinner
Hi,

now we are making progress. Do you still have 1.5 installed or are these orphaned entries?

To verify, please launch the toolkit from a shell with the command line parameter -verbose.

C:\Program Files\MySQL\MySQL GUI Tools 5.0>MySQLMigrationTool -verbose

When the tool has started, please press F4 and look at the GRT shell output. Especially this line is interesting.

Runtime Library filename: C:\Program Files\Java\jre1.5.0_11\bin\client\jvm.dll

It will tell you which JVM the Migration Toolkit is trying to use. In doubt, please attach the complete GRT shell output here.

Thanks,
Mike
[20 Apr 2007 12:23] Louis Breda van
Mike,

JRE is really still installed, and the verbose option does not return anything.
The programm starts with the same error "please make sure yoy have jre 50 update 8 installed.

Louis
[20 Apr 2007 12:38] Michael G. Zinner
No, you have to press F4 once you see the Migration Toolkit window. Or you can select Tools -> GRT Environment Shell from the Main Menu. Otherwise you will not see the GRT Shell.

Please try again,
Mike
[20 Apr 2007 12:46] Louis Breda van
for info

MySQL Generic Runtime Environment 2.0.12

Type 'help' or '?' for help. Type 'quit' to exit the shell.
Lua Shell initialized.
Registered 12 struct definition files.
Initializing native loader...
Initializing Java loader...
ERROR: Could not load java class com/mysql/grt/Grt.
  Error initializing Java module loader (10009). Please check the .\java and .\java\lib directories.
Initializing Lua loader...
Initializing Python loader...
Registered 5 builtin modules.
Registered 13 Lua modules.

/ > 

Louis
[20 Apr 2007 13:03] Louis Breda van
Now with verbose on

MySQL Generic Runtime Environment 2.0.12

Type 'help' or '?' for help. Type 'quit' to exit the shell.
Lua Shell initialized.
Registered 12 struct definition files.
Initializing native loader...
Initializing Java loader...

Launching Java VM
Classpath: -Djava.class.path=.;java;java\lib\jtds-1.2.jar;java\lib\junit.jar;java\lib\mysql-connector-java-5.0.4-bin.jar;java\lib\mysql-grt-java-1.0.0-bin.jar;java\lib\sapdbc-7_6_00_12_4339.jar;java
Runtime Library filename: C:\Program Files (x86)\Java\j2re\bin\client\jvm.dll
ERROR: Could not load java class com/mysql/grt/Grt.
  Error initializing Java module loader (10009). Please check the .\java and .\java\lib directories.
Initializing Lua loader...
Initializing Python loader...
GRT registering module Base
GRT registering module ReverseEngineeringMysql
GRT registering module TransformationMysql
Registered 5 builtin modules.
Scanning module directory ./lua.
Trying to load module ./lua\BaseLua.lua.
GRT registering module BaseLua
Trying to load module ./lua\DbUtils.lua.
GRT registering module DbUtils
Trying to load module ./lua\Migration.lua.
GRT registering module Migration
Trying to load module ./lua\Rdbms.lua.
GRT registering module Rdbms
Trying to load module ./lua\RdbmsInfo.lua.
GRT registering module RdbmsInfo
Trying to load module ./lua\RdbmsInfoAccess.lua.
GRT registering module RdbmsInfoAccess
Trying to load module ./lua\RdbmsInfoGeneric.lua.
GRT registering module RdbmsInfoGeneric
Trying to load module ./lua\RdbmsInfoMaxdb.lua.
GRT registering module RdbmsInfoMaxdb
Trying to load module ./lua\RdbmsInfoMssql.lua.
GRT registering module RdbmsInfoMssql
Trying to load module ./lua\RdbmsInfoMysql.lua.
GRT registering module RdbmsInfoMysql
Trying to load module ./lua\RdbmsInfoOracle.lua.
GRT registering module RdbmsInfoOracle
Trying to load module ./lua\RdbmsInfoSybase.lua.
GRT registering module RdbmsInfoSybase
Trying to load module ./lua\RdbmsManagement.lua.
GRT registering module RdbmsManagement
Registered 13 Lua modules.

Louis
[30 Apr 2007 7:20] Michael G. Zinner
Could you please verify that the following location is correct and contains a valid JRE installation?

Runtime Library filename: C:\Program Files (x86)\Java\j2re\bin\client\jvm.dll

The path should contain the version number of the JRE in a normal setup, like this.

C:\Program Files\Java\jre1.5.0_11\bin\client\jvm.dll

Thanks,
Mike
[30 Apr 2007 9:38] Louis Breda van
Michael,

I checked the path info, and it is a little bit different. 
Let me start to state that the installed JAVA is 64 bit and installed in 
Program Files\Java\JRE<VERSION>\bin\

Then you expect java to be in bin\client. It is not it is in bin\server

However in the 32 bit directory tree Program Files (x86)\Java\j2re\bin\client I also find the jvm.dll

I hope this helps.

Louis
[4 May 2007 14:32] Gordon Rennie
Identical Problem - OS Windows XP Prof SP2
[11 May 2007 18:09] Vinicius Carvalho
I'm having the same problem as everyone here. I have Java JDK 1.6u1 installed, it is on my path, and I have a java_home env var set to the installation path.
I don't have the registry that the MT complains about, instead I have a JavaSoft\Java Development Kit

Why the application would not start with a VM installed, registred and on the path? Does it depends on windows registry ?
[12 May 2007 7:08] Rob Lewis
Just tried to run the Migration Toolkit for the first time and got the same message about an error initializing the runtime. Installed JRE 6U1 but no better. 
Also, just updated FireFox and got message that the current Java Console (6.01??) was not compatible. 
Win XP Home, SP2 and all updates installed.
[14 May 2007 20:59] Jim Broadus
I'm on a Windows XP Pro OS.  I just had to reload all my software on another computer since my processor died on the old one.

I loaded the Migration Toolkit before thinking about the Java Runtime.  I loaded the JRE 1.4.2_14 afterwards.  It would not see it.

I uninstalled the Migration Toolkit, rebooted, and reinstalled the Migration Toolkit and it still does not see the JRE.

I checked the Registry - it shows both JavaHome and RuntimeLib.  It still gets the "An error occured during the initialization of the runtime system. Please make sure you have Java Runtime Environment 1.4.2 or 5.0 installed."

What do I do next?

Sincerely,
Jim B.
[25 May 2007 18:12] Rob Lewis
What is the status of a solution for this bug? I am seriously blocked here!
[29 May 2007 7:46] Katrin Ojaste
I got the same problem with Windows XP SP2 

My Java information:
H:\>java -version
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
[29 May 2007 17:30] Michael G. Zinner
Could everybody please check the contents of the following registry keys?

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.5
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6

Then please start the tool from a command line shell with the -verbose parameter.

C:\Program Files\MySQL\MySQL GUI Tools 5.0>MySQLMigrationTool -verbose

In the tool select the GRT Shell from the Tools menu or press F4 and check the path the tool is printing for Runtime Library filename:

This would help to understand why the tool cannot find the JRE.

Then, please try to specify the JVM directly on the command line like this.

C:\Program Files\MySQL\MySQL GUI Tools 5.0>MySQLMigrationTool -verbose -jvm "C:\Program Files\Java\jre1.5.0_10\bin\client\jvm.dll"

That should allow the tool to be started even if the automatic JVM detection does not work.
[30 May 2007 0:33] Rob Lewis
Could everybody please check the contents of the following registry
keys?

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4 
(Default)        REG_SZ            (value not set)
JavaHome         REG_SZ            C:\Program Files\Java\j2re1.4.0_03
MicroVersion     REG_SZ            0
RuntimeLib       REG_SZ            C:\Program Files\Java\j2re1.4.0_03\bin\client\jvm.dll

NOTE THERE IS A SEPARATE REGISTRY ENTRY SIMILAR TO THE ABOVE BUT ENDING IN \1.4.0_03. CONTENTS ARE THE SAME AS ABOVE

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.5 
(not present in my registry)
 
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6 
(Default)        REG_SZ            (value not set)
JavaHome         REG_SZ            C:\Program Files\Java\jre1.6.0_01
MicroVersion     REG_SZ            0
RuntimeLib       REG_SZ            C:\Program Files\Java\jre1.6.0_01\bin\client\jvm.dll

NOTE THERE IS A SEPARATE REGISTRY ENTRY SIMILAR TO THE ABOVE BUT ENDING IN \1.6.0_01. CONTENTS ARE THE SAME AS ABOVE. This folder also has another folder inside it called "MSI" and containing a number of other parameters. 

Then please start the tool from a command line shell with the -verbose
parameter.

C:\Program Files\MySQL\MySQL GUI Tools 5.0>MySQLMigrationTool -verbose 

This is an incorrect path for my installation. The correct path is: 
C:\Program Files\MySQL\MySQL Tools for 5.0>MySQLMigrationTool

In the tool select the GRT Shell from the Tools menu or press F4 and
check the path the tool is printing for Runtime Library filename: 

Launching Java VM
Classpath: -Djava.class.path=.;java;java\lib\jtds-1.2.jar;java\lib\junit.jar;java\lib\mysql-connector-java-5.0.4-bin.jar;java\lib\mysql-grt-java-1.0.0-bin.jar;java\lib\sapdbc-7_6_00_12_4339.jar;java
Runtime Library filename: C:\Program Files\Java\j2re1.4.0_03\bin\client\jvm.dll
ERROR: Could not load java class com/mysql/grt/Grt.
  Error initializing Java module loader (10009). Please check the .\java and .\java\lib directories.
Initializing Lua loader...
Initializing Python loader... 

This would help to understand why the tool cannot find the JRE. 
The path is a valid one in my system, but does not point to the latest (1.6) version of jre, which is named "jre", not "j2re". 

Then, please try to specify the JVM directly on the command line like
this.

C:\Program Files\MySQL\MySQL GUI Tools 5.0>MySQLMigrationTool -verbose
-jvm "C:\Program Files\Java\jre1.5.0_10\bin\client\jvm.dll" 

The command that worked for me is 
C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLMigrationTool -verbose -jvm "C:\Program Files\Java\jre1.6.0_01\bin\client\jvm.dll"

That should allow the tool to be started even if the automatic JVM
detection does not work. 

Tool started up OK with the above command.  
System is Win XP Home, all updates.
[29 Jun 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 Jun 2007 18:10] Louis Breda van
Hello,

I have a very clear option on this one. I did tyr to provide a lot of info to help MySQL. And that given the fact that that was completely unneccesary IMHO.

This bug can be reproduced that easy, that is is ashame that the MySQL did is shoot have been notished by even a minimal windows related regresion testset.

So, playing this bug to the MySQL users, is IMHO quit unaccepatable.

Start building windows related release testsets yourself MySQL!

Sincerely.

Louis
[2 Jul 2007 6:37] Sveta Smirnova
Thank you for the feedback.

Which Java package did you download?

MySQL Migration Toolkit is working on Vista with JDK 1.6, although I had problems with other Sun packages.
[26 Jul 2007 23:54] Gael Martinez
Same issue here, windows XP professional 32 bits...

C:\Documents and Settings\gael>java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)

Migration tool kit is 1.1.12
[27 Jul 2007 9:04] Sveta Smirnova
Gael,

thank you for the feedback. Please indicate which Java package do you downloaded from Sun site. File name or direct link.

I ask because have no problem with "just JDK" package, but had with Application Server + JDK + NetBeans
[2 Aug 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[3 Aug 2007 9:26] Louis Breda van
Hello,

IMHO, it is bull shit that mysql is waiting for user feedback to fix this.

Regulairly I get the impression that it is up to the user to defind testcases, not that we are not willing to help, but in principle that is not true.

A problem like this, which can be reproduced by many, should not have left the lab / should not havebeen released at all.

Sincerely,

Louis
[8 Aug 2007 16:14] MySQL Verification Team
Running on Vista 64-bits

Attachment: Vista-64-java.png (image/png, text), 90.73 KiB.

[8 Aug 2007 16:16] MySQL Verification Team
I am not able to repeat with version 1.1.12 (attached picture).
[8 Aug 2007 20:42] Louis Breda van
Hello,

Good news. Triggerd by the email I recieved due to the bug update by Miguel Solorzano, I did install mysql 5120 and gui tools 50r12 n a fresh vista 64 ultimate system (restored a backup).

That version did contain sun java 6 update 1 and the migration toolkit does not recognise that java version.
However, when I looked at the sun website, I founf a brend new java 6 update 2. Installing that update solved the problem! So apparently Sun fixed something :>

So, glad it is working here again. Sorry that the fault was probably on the other (sun) side.

Sincerely

Louis
[18 Dec 2008 15:26] lybor kyl
I was a tough fight to read it throughout all this stuff here. 

I HAD this problem, I could not run MySQL Migration toolkit, though I installed latest JRE (11/2008)

Then I recognized, that I had already installed 4 versions of JRE. I uninstalled them all, then installed latest version and it worked. :-)

Be careful, if you install JRE, uninstall previous ones first... 

Good luck...
[13 May 2010 0:57] Douglas Reith
Just a note that I found in the GRT shell that my MySQL Migration Toolkit v.1.0.25 was looking for a registry key of 1.4 whereas I had 1.6. So I exported the 1.6 key, edited it in notepad and changed it to 1.4 and then imported and the Java loaded successfully. Hopefully it'll continue to function with this workaround.
[27 Oct 2010 10:00] Cristiano Dias
I had the same problem and the solution was that JRE muss be 32 Bit too. The same as Migration Tool Kit.
I installed JRE 1.6.0_22 32Bit and it worked perfect.
Thank you for help guys.

Regards
Cristiano
[4 Jul 2011 11:21] kolly ajax
Hi guys, I followed the steps giving by [29 May 2007 19:30] Michael G. Zinner and [30 May 2007] Rob to solve my problem. I believe it should work for others too. Thanks
[31 Jan 2013 1:37] Aaron May
Aparentemente el problema es en version 64 bits de windows. 
Se resuelve instalando el JRE de 32 bits y 64 bits en el mismo equipo. Posteriormente aƱadir al PATH la direccion del JRE de 32 bits. (C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll)

Saludos
[21 Jul 2014 10:23] Jonathan Beverley
On 64bit you need to check the registry here in Wow6432Node as below - 

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\1.4