Bug #21823 Migration Tool Thinks Java Run Times Not Installed
Submitted: 25 Aug 2006 2:20 Modified: 31 Aug 2006 2:15
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S2 (Serious)
Version:1.1.2 beta OS:Windows (Windows XP)
Assigned to: Michael G. Zinner CPU Architecture:Any

[25 Aug 2006 2:20] [ name withheld ]
Description:
In the migration tool at the first screen, it says that the java loaded can't be initialized and there is a red X infront of the item. 

In GRT environment Shell, I get this error message:
MySQL Generic Runtime Environment 2.0.12

Type 'help' or '?' for help. Type 'quit' to exit the shell.
Lua Shell initialized.
Registered 15 struct definition files.
Initializing native loader...
Initializing Java loader...
  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 16 Lua modules.

Both of these directories exist and there are files in them. However, I don't know if any files are missing. 

I have verified from the control panel that the Java run times are installed. 

How to repeat:
I just installed the new beta version of the toolkit. I was using 1.0.25 and I did not get this error. Really, all I did was open the migration tool and the error happens immediately. 

Suggested fix:
Can you post a more direct link to the version of java needed? I suppose that there could be a small chance that I have the wrong version of Java but I doubt it since several others have the same problem. I downloaded this one:

"Java Runtime Environment (JRE) 5.0 Update 8" 

Its somewhat confusing to download from Sun's web site since they list several products in the same page. Could an install be made that automatically installs Java if its not there and copies all needed files, Dlls, etc.?
[25 Aug 2006 2:22] [ name withheld ]
My Registry Settings in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft

Attachment: JavasoftRegistryFolder.txt (application/octet-stream, text), 10.69 KiB.

[25 Aug 2006 12:05] Michael G. Zinner
Hi.

Please download a path for the MT from here. It includes a new MySQLMigrationTool.exe. Simply overwrite the existing one (It fixes a problem that messages got lost in the -verbose mode).

ftp://ftp.mysql.com/pub/mysql/download/gui-tools/mysql-migration-toolkit-1.1.2-patch-1.zip

Then start the tool with

  MySQLMigrationTool.exe -verbose

After the app has started, please press F4 to get to the shell and look at the output. It should contain something like

Launching Java VM
Classpath: -Djava.class.path=.;java;java\lib\mysql-grt-java-1.0.0-bin.jar;java\lib\sapdbc-7_6_00_12_4339.jar;java\lib\junit.jar;java\lib\mysql-connector-java-3.1.11a-bin.jar;java\lib\jtds-1.2.jar;java
Runtime Library filename: C:\Programme\Java\jre1.5.0_07\bin\client\jvm.dll

This will indicate which path the tool is using to find the JRE and should help to track down the problem.

Could you also try to start the tool with

  MySQLMigrationTool.exe -jvm "C:\Program Files\Java\jre1.5.0_08\bin\client\jvm.dll"

Thanks,
Mike
[25 Aug 2006 14:21] [ name withheld ]
Here is the output in verbose mode:

aunching Java VM
Classpath: -Djava.class.path=.;java;java\lib\mysql-grt-java-1.0.0-bin.jar;java\lib\mysql-connector-java-3.1.11a-bin.jar;java\lib\junit.jar;java\lib\jtds-1.2.jar;java\lib\sapdbc-7_6_00_12_4339.jar;java\lib\Old;java\lib\mysql-connector-java-5.0.3;java
Runtime Library filename: C:\Program Files\Java\jre1.5.0_08\bin\client\jvm.dll
ERROR: The Java VM cannot be created.
  Error initializing Java module loader (10009). Please check the .\java and .\java\lib directories.
Initializing Lua loader...
Initializing Python loader...
GRT registering module BaseGRT registering module ReverseEngineeringMysqlGRT registering module TransformationMysqlRegistered 5 builtin modules.
Scanning module directory ./lua.
Trying to load module ./lua\BaseLua.lua.

When using:

"C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLMigrationTool.exe" -jvm "C:\Program Files\Java\jre1.5.0_08\bin\client\jvm.dll"

The same error occurs - there is a red X infront of the java loader item in the first screen.

Should I have the J connector installed for this to work? I did not install it sicne I am not developing on Java. All I have installed is the MySQL server and GUI tools. 

Thanks.
[25 Aug 2006 18:47] Tom Cooper
I'm having a similar problem.  Same error but the verbose output gives a different message.

================================================================================
Launching Java VM
Classpath: -Djava.class.path=.;java;java\lib\jtds-1.2.jar;java\lib\junit.jar;java\lib\mysql-connector-java-3.1.11a-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.2_11\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 BaseGRT registering module ReverseEngineeringMysqlGRT registering module TransformationMysqlRegistered 5 builtin modules.
Scanning module directory ./lua.
Trying to load module ./lua\BaseLua.lua.
GRT registering module BaseLuaTrying to load module ./lua\DbUtils.lua.
GRT registering module DbUtilsTrying to load module ./lua\Migration.lua.
GRT registering module MigrationTrying to load module ./lua\Rdbms.lua.
GRT registering module RdbmsTrying to load module ./lua\RdbmsInfo.lua.
GRT registering module RdbmsInfoTrying to load module ./lua\RdbmsInfoAccess.lua.
GRT registering module RdbmsInfoAccessTrying to load module ./lua\RdbmsInfoGeneric.lua.
GRT registering module RdbmsInfoGenericTrying to load module ./lua\RdbmsInfoMaxdb.lua.
GRT registering module RdbmsInfoMaxdbTrying to load module ./lua\RdbmsInfoMssql.lua.
GRT registering module RdbmsInfoMssqlTrying to load module ./lua\RdbmsInfoMysql.lua.
GRT registering module RdbmsInfoMysqlTrying to load module ./lua\RdbmsInfoOracle.lua.
GRT registering module RdbmsInfoOracleTrying to load module ./lua\RdbmsInfoSybase.lua.
GRT registering module RdbmsInfoSybaseTrying to load module ./lua\RdbmsManagement.lua.
GRT registering module RdbmsManagementTrying to load module ./lua\Workbench.lua.
GRT registering module WorkbenchTrying to load module ./lua\WorkbenchCorePlugins.lua.
GRT registering module WorkbenchCorePluginsTrying to load module ./lua\WorkbenchImport.lua.
GRT registering module WorkbenchImportRegistered 16 Lua modules.
===============================================================================

mysql-grt-java-1.0.0-bin.jar is in the .java/lib directory, and I tried unjaring it directly into the .java directory in the MySQL-Tools heirachy, but no luck.
[26 Aug 2006 3:25] Ob 001
It works for me in my WinXPSP2 but not in WinXPSP1, not sure its related to that.
[29 Aug 2006 8:45] Michael G. Zinner
Could you try to start the Migration Toolkit from the command line testing the following paramter:

MySQLMigrationTool.exe -Xmx 256m
MySQLMigrationTool.exe -Xmx 384m
MySQLMigrationTool.exe -Xmx 512m

also

MySQLMigrationTool.exe -debug

The problem is not that the Java installation is not found. But that initializing the JVM returns an error.

Also please make sure you have Java 5.0 update 8 installed.
[30 Aug 2006 0:52] [ name withheld ]
I tested all of the command line paramters and these worked:

"C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLMigrationTool.exe" -xmx 256m
"C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLMigrationTool.exe" -debug

These didn't work:

"C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLMigrationTool.exe" -xmx 384m
"C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLMigrationTool.exe" -xmx 512m

This gets around the java runtime problem, but there still seems to be an issue with Access autonumber fields being converted in 1.1.2 beta.

Thanks for the help.
[30 Aug 2006 19:45] MySQL Verification Team
Thank you for the bug report. I had the same issue on Windows 2003 however
installing Java 5.0 update 8 fixed the issue like Michael said before so
isn't MySQL Migration Toolkit bug.
[15 Oct 2008 18:04] learning 2
I had the same problem on Windows XP. I went into my Control Panel and uninstalled the old Java version and then everything loaded fine!
[11 Nov 2009 17:03] Brad Gronek
How do you people explain yourselves?  

My god....this issue has existed since before release in 2006 and has yet to be resolved, has has multiple bugs logged and all of them removed.  All because you made the stupid decision to directly map to java using the registry instead of expecting java to be in the path. 

This is probably the most important tool for you all to gain market share and you're treating it, and your customers like this.