could not initialize JVM

Having trouble installing Oxygen? Got a bug to report? Post it all here.
RogerP
Posts: 17
Joined: Fri May 11, 2007 2:58 pm
Location: Brunel University, UK

could not initialize JVM

Post by RogerP »

Strange: I've been using <oXygen/> for years and then I get a launch error: "The JVM could not be started. The main method may have thrown an exception."

i4j_nlog_8:

Code: Select all

Started executable C:\Program Files\Oxygen XML Editor 11\oxygen.exe at Thu Jan 21 11:51:58 2010

number of sections: 5
size of optional headers: 224
resSectionTableStart: 536
rawDataSize: 151552, rawDataOffset: 133120
Setting PATH (native libs) C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Support Tools\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\DISKEE~1\DISKEE~2\;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jre1.5.0_12\bin;C:\Program Files\Apache Software Foundation\apache-ant-1.7.0\bin;C:\Program Files\Apache Software Foundation\axis-1_4\lib;C:\Program Files\Apache Software Foundation\maven-2.0.7\bin;C:\Program Files\grails-1.0.4\bin
semaphore name c:_program files_oxygen xml editor 11_oxygen.exe0, code 0, value 0000008C
extracting files
Included files: 0
LoadDLL (1, (null), 0)
Searching for a JVM
Has preferred location C:\Program Files\Oxygen XML Editor 11\jre
checkJavaExe (c:\program files\oxygen xml editor 11\jre\bin\java.exe, [out], 1.5, , 1)
file exists
Exit Code 0
Java version: 1.6.0_16
got version from execution 1.6.0_16
Using preferred location
Trying to load JVM-DLL from c:\program files\oxygen xml editor 11\jre\bin\javaw.exe
Setting PATH C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Support Tools\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\DISKEE~1\DISKEE~2\;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jre1.5.0_12\bin;C:\Program Files\Apache Software Foundation\apache-ant-1.7.0\bin;C:\Program Files\Apache Software Foundation\axis-1_4\lib;C:\Program Files\Apache Software Foundation\maven-2.0.7\bin;C:\Program Files\grails-1.0.4\bin;c:\program files\oxygen xml editor 11\jre\bin
Trying c:\program files\oxygen xml editor 11\jre\bin\client\jvm.dll (exists 1)
Loading of JVM-DLL successful
launching program
adding options

default vmoptions file: 77C5FCE0
vmoption count 14
vmoption 0: -Dexe4j.semaphoreName=c:_program files_oxygen xml editor 11_oxygen.exe0
vmoption 1: -Dexe4j.isInstall4j=true
vmoption 2: -Dexe4j.moduleName=C:\Program Files\Oxygen XML Editor 11\oxygen.exe
vmoption 3: -Dexe4j.tempDir=
vmoption 4: -Dexe4j.unextractedPosition=0
vmoption 5: -Dexe4j.consoleCodepage=cp0
vmoption 6: -Dcom.oxygenxml.tree.readonly=false
vmoption 7: -Xss550k
vmoption 8: -XX:SoftRefLRUPolicyMSPerMB=10
vmoption 9: -Dsun.java2d.noddraw=true
vmoption 10: -Xmx700m
vmoption 11: -Dcom.oxygenxml.language=English
vmoption 12: -XX:+UseParallelGC
vmoption 13: -Djava.class.path=C:\Program Files\Oxygen XML Editor 11\.install4j\i4jruntime.jar;C:\Program Files\Oxygen XML Editor 11\.\lib\oxygen.jar;
Creating JVM
ERROR: could not initialize JVM
I have ZoneAlarm firewall but I have checked all the restrictions on programs and given Oxygen 11.1 full trust level.

PC: AMD 3200+ , 2Gb RAM, running Windows XP (32 bit). Running <oXygen/> trouble-free for years.

I must have done something to screw it up, can't think what.

Any help would be greatly appreciated.

Roger.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: could not initialize JVM

Post by adrian »

Hi,

Could you please verify if the application works when run from the command line launcher?
The launcher is called oxygen.bat, you can find it the oxygen installation folder: C:\Program Files\Oxygen XML Editor 11.
You can also find a shortcut to the same launcher in the start menu: Oxygen XML Editor 11.1 -> Command line launchers -> Oxygen XML Editor.

If it works when run from the command line launcher then you could try to decrease the amount of memory in the oxygen.vmoptions file found in the Oxygen installation directory. Open it with Notepad or Wordpad and change the first line (-Xmx700m or something similar) to -Xmx512m.
If Oxygen still doesn't start normally try to further decrease the amount of memory to -Xmx256m.

Please let us know if any of these solutions have worked for you.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
RogerP
Posts: 17
Joined: Fri May 11, 2007 2:58 pm
Location: Brunel University, UK

Re: could not initialize JVM

Post by RogerP »

Hi,

The standard batch file didn't work. It seems already to require a low memory allocation:

Code: Select all

@echo off
rem
rem %~dp0 is expanded pathname of the current script under NT
rem

SET CP="%~dp0;%~dp0/lib/oxygen.jar;%~dp0/classes;"

rem
rem The command line parameters can be:
rem
rem 1. file paths of local files opened automatically in editor panels at startup
rem
rem 2. the following sequence to open a file with default schema association
rem
rem -instance pathToXMLFile -schema pathToSchemaFile -schemaType XML_SCHEMA|DTD_SCHEMA|RNG_SCHEMA|RNC_SCHEMA -dtName documentTypeName
rem
rem where:
rem
rem - pathToXMLFile: is the name of a local XML file
rem - pathToSchemaFile: is the name of the schema which you want to associate to the XML file
rem - schemaType: the four constants (XML_SCHEMA, DTD_SCHEMA, RNG_SCHEMA, RNC_SCHEMA) are the possible
rem schema types (W3C XML Schema, DTD, Relax NG schema in full syntax, Relax NG schema
rem in compact syntax)
rem - dtName: The name of the document type automatically generated for association.

set OXYGEN_JAVA=java.exe
if exist "%JAVA_HOME%\bin\java.exe" set OXYGEN_JAVA="%JAVA_HOME%\bin\java.exe"
if exist "%~dp0\jre\bin\java.exe" set OXYGEN_JAVA="%~dp0\jre\bin\java.exe"
%OXYGEN_JAVA% -Xss512k -Xmx256m -XX:SoftRefLRUPolicyMSPerMB=10 -Dsun.java2d.noddraw=true -Dcom.oxygenxml.ApplicationDataFolder="%APPDATA%" -cp %CP% ro.sync.exml.Oxygen %1 %2 %3 %4 %5 %6 %7 %8
BTW: My %JAVA_HOME points to jdk1.6.0_10 however the log file says: "got version from registry 1.6.0_16"
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: could not initialize JVM

Post by adrian »

If you launched the oxygen.bat and it failed with the same error message then it is possible that the JVM bundled with Oxygen has been damaged in some way.
You can avoid the bundled JVM if you rename or delete the jre directory from the Oxygen installation directory.

If it still doesn't launch correctly with either launcher could you please try to uninstall and reinstall Oxygen.

If you have customizations for document types first backup the frameworks directory(copy it to a temporary folder) from the installation directory.
After uninstalling and before reinstalling check if anything was left behind in the installation directory. If it did then move or delete the directory so that nothing remains from the older installation. Don't worry about the Oxygen settings, they won't get lost, they are located elsewhere.
After reinstalling put back the frameworks directory if you have saved it.

Let me know if any of these worked.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
RogerP
Posts: 17
Joined: Fri May 11, 2007 2:58 pm
Location: Brunel University, UK

Re: could not initialize JVM

Post by RogerP »

I have just updated my jdk to 1.6.0_18 (latest from sun). Changed the environment variable %JAVA_HOME%. Log files confirm they found the right jdk/jre

Re-named the jre folder within the Oxygen directory -- same behavior as before on both methods of launching <oXygen/>

Next, uninstalled <oXygen/> then removed all Oxygen * directories.

Downloaded latest <oXygen/> installer and checked MD5sum -- OK

Installed.

Log file from use of conventional launcher with new install but new jre folder unchanged:

Code: Select all

Started executable C:\Program Files\Oxygen XML Editor 11\oxygen.exe at Thu Jan 21 16:20:25 2010

number of sections: 5
size of optional headers: 224
resSectionTableStart: 536
rawDataSize: 151552, rawDataOffset: 133120
Setting PATH (native libs) C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Support Tools\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\DISKEE~1\DISKEE~2\;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jre1.5.0_12\bin;C:\Program Files\Apache Software Foundation\apache-ant-1.7.0\bin;C:\Program Files\Apache Software Foundation\axis-1_4\lib;C:\Program Files\Apache Software Foundation\maven-2.0.7\bin;C:\Program Files\grails-1.0.4\bin
semaphore name c:_program files_oxygen xml editor 11_oxygen.exe0, code 0, value 0000008C
extracting files
Included files: 0
LoadDLL (1, (null), 0)
Searching for a JVM
Has preferred location C:\Program Files\Oxygen XML Editor 11\jre
checkJavaExe (c:\program files\oxygen xml editor 11\jre\bin\java.exe, [out], 1.5, , 1)
file exists
Exit Code 0
Java version: 1.6.0_16
got version from execution 1.6.0_16
Using preferred location
Trying to load JVM-DLL from c:\program files\oxygen xml editor 11\jre\bin\javaw.exe
Setting PATH C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Support Tools\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\DISKEE~1\DISKEE~2\;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jre1.5.0_12\bin;C:\Program Files\Apache Software Foundation\apache-ant-1.7.0\bin;C:\Program Files\Apache Software Foundation\axis-1_4\lib;C:\Program Files\Apache Software Foundation\maven-2.0.7\bin;C:\Program Files\grails-1.0.4\bin;c:\program files\oxygen xml editor 11\jre\bin
Trying c:\program files\oxygen xml editor 11\jre\bin\client\jvm.dll (exists 1)
Loading of JVM-DLL successful
launching program
adding options

default vmoptions file: 77C5FCE0
vmoption count 14
vmoption 0: -Dexe4j.semaphoreName=c:_program files_oxygen xml editor 11_oxygen.exe0
vmoption 1: -Dexe4j.isInstall4j=true
vmoption 2: -Dexe4j.moduleName=C:\Program Files\Oxygen XML Editor 11\oxygen.exe
vmoption 3: -Dexe4j.tempDir=
vmoption 4: -Dexe4j.unextractedPosition=0
vmoption 5: -Dexe4j.consoleCodepage=cp0
vmoption 6: -Dcom.oxygenxml.tree.readonly=false
vmoption 7: -Xss550k
vmoption 8: -XX:SoftRefLRUPolicyMSPerMB=10
vmoption 9: -Dsun.java2d.noddraw=true
vmoption 10: -Xmx700m
vmoption 11: -Dcom.oxygenxml.language=English
vmoption 12: -XX:+UseParallelGC
vmoption 13: -Djava.class.path=C:\Program Files\Oxygen XML Editor 11\.install4j\i4jruntime.jar;C:\Program Files\Oxygen XML Editor 11\.\lib\oxygen.jar;
Creating JVM
ERROR: could not initialize JVM
Log file from use of oxygen.bat launcher after renaming jre to force use of newly installed jre:

Code: Select all

Started executable C:\Program Files\Oxygen XML Editor 11\oxygen.exe at Thu Jan 21 16:28:49 2010

number of sections: 5
size of optional headers: 224
resSectionTableStart: 536
rawDataSize: 151552, rawDataOffset: 133120
Setting PATH (native libs) C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Support Tools\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\DISKEE~1\DISKEE~2\;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jre1.5.0_12\bin;C:\Program Files\Apache Software Foundation\apache-ant-1.7.0\bin;C:\Program Files\Apache Software Foundation\axis-1_4\lib;C:\Program Files\Apache Software Foundation\maven-2.0.7\bin;C:\Program Files\grails-1.0.4\bin
semaphore name c:_program files_oxygen xml editor 11_oxygen.exe0, code 0, value 00000778
extracting files
Included files: 0
LoadDLL (1, (null), 0)
Searching for a JVM
Has preferred location C:\Program Files\Oxygen XML Editor 11\jre
checkJavaExe (c:\program files\oxygen xml editor 11\jre\bin\java.exe, [out], 1.5, , 1)
file doesn't exist
checkJavaExe returning 0
Testing location .\jre (type B)
checkJavaExe (c:\program files\oxygen xml editor 11\jre\bin\java.exe, [out], 1.5, , 1)
file doesn't exist
checkJavaExe returning 0
Testing location JAVA_HOME (type E)
checkJavaExe (C:\Program Files\Java\jdk1.6.0_18\jre\bin\java.exe, [out], 1.5, , 0)
file exists
got version from registry 1.6.0_18
Trying to load JVM-DLL from c:\program files\java\jdk1.6.0_18\jre\bin\javaw.exe
Setting PATH C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Support Tools\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\DISKEE~1\DISKEE~2\;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jre1.5.0_12\bin;C:\Program Files\Apache Software Foundation\apache-ant-1.7.0\bin;C:\Program Files\Apache Software Foundation\axis-1_4\lib;C:\Program Files\Apache Software Foundation\maven-2.0.7\bin;C:\Program Files\grails-1.0.4\bin;c:\program files\java\jdk1.6.0_18\jre\bin
Trying c:\program files\java\jdk1.6.0_18\jre\bin\client\jvm.dll (exists 1)
Loading of JVM-DLL successful
launching program
adding options

default vmoptions file: 77C5FCE0
vmoption count 14
vmoption 0: -Dexe4j.semaphoreName=c:_program files_oxygen xml editor 11_oxygen.exe0
vmoption 1: -Dexe4j.isInstall4j=true
vmoption 2: -Dexe4j.moduleName=C:\Program Files\Oxygen XML Editor 11\oxygen.exe
vmoption 3: -Dexe4j.tempDir=
vmoption 4: -Dexe4j.unextractedPosition=0
vmoption 5: -Dexe4j.consoleCodepage=cp0
vmoption 6: -Dcom.oxygenxml.tree.readonly=false
vmoption 7: -Xss550k
vmoption 8: -XX:SoftRefLRUPolicyMSPerMB=10
vmoption 9: -Dsun.java2d.noddraw=true
vmoption 10: -Xmx700m
vmoption 11: -Dcom.oxygenxml.language=English
vmoption 12: -XX:+UseParallelGC
vmoption 13: -Djava.class.path=C:\Program Files\Oxygen XML Editor 11\.install4j\i4jruntime.jar;C:\Program Files\Oxygen XML Editor 11\.\lib\oxygen.jar;
Creating JVM
ERROR: could not initialize JVM
So it's not the jre and surely, with 2Gb RAM it's not the memory (I have nothing else running except (say) Firefox. I allow very few start-up programs to run (kill Messenger and all other similar nonsense).

Regards,

Roger
RogerP
Posts: 17
Joined: Fri May 11, 2007 2:58 pm
Location: Brunel University, UK

Re: could not initialize JVM

Post by RogerP »

Apologies: it seems to be more generic. Netbeans is reporting the same problem. I'll fix it, sorry for the bother. :oops:
RogerP
Posts: 17
Joined: Fri May 11, 2007 2:58 pm
Location: Brunel University, UK

Re: could not initialize JVM

Post by RogerP »

OK I can start <oXygen/> but ONLY via the command line launcher.

Any advice?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: could not initialize JVM

Post by adrian »

Hi,

Try the memory workaround(oxygen.vmoptions). I know it doesn't seem to make any sense but it's not as simple as just having enough memory installed. The JVM has to be able to allocate that memory and for some reason I think it believes it can't.

The only other argument there that could cause trouble is -XX:+UseParallelGC. You could also try to remove that from oxygen.vmoptions.

Other than that make sure Oxygen is not run in compatibility mode(properties on the Oxygen shortcut, Compatibility tab) but that's unlikely.

Let me know if you have any luck with these.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
RogerP
Posts: 17
Joined: Fri May 11, 2007 2:58 pm
Location: Brunel University, UK

Re: could not initialize JVM

Post by RogerP »

Many thanks! <oXygen/> and Author now both start with -Xmx512m
The JVM has to be able to allocate that memory and for some reason I think it believes it can't.
I don't why it's behaviour has suddenly changed. It was fine before and the only thing that's happened to my computer is one or two MS security patches. I hardly ever use MS these days as I do most of my XML work on the Linux partition.

Anyway, thanks for your help. :D
Post Reply