Can't run Defold on my Server 2012 R2 machine (DEF-2105)

Extracted zip to C:\Defold, ran C:\Defold\Defold.exe

It says an error has occured and points me to a file with the wall of text. I have the 10/9/2015 stable release for windows, as I downloaded it this morning for the first time.

Wall of text here: http://pastebin.com/HGKA9fHu

ends with !ENTRY org.eclipse.osgi 4 0 2015-10-18 10:27:26.738
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application “com.dynamo.cr.editor.application” could not be found in the registry. The applications available are: org.eclipse.equinox.app.error, org.eclipse.equinox.p2.garbagecollector.application.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)

Tried running from several different locations on my machine. Tried running as administrator. I am just the only person who doesn’t have java already installed? I looked for something to say install java but I didn’t see that.

So I did manage to cobble together a really rather insane workaround for this.

Apparently the issue is that the version of a file, “C:\Defold\plugins\org.eclipse.osgi_3.8.2.v20130124-134944\org\eclipse\osgi\framework\internal\core\osname.aliases” on my system, is an old version which doesn’t list aliases for 2012 R2, and so my OS is not identified as a win32 platform.

I did the following procedure:
a. Changed org.eclipse.osgi_3.8.2.v20130124-134944.jar to a .zip file and extracted it
b. Opened the file above and added entries for Windows 2012 R2, similar to the existing 2008 R2 entry.
c. Used powershell insanity to calculate the SHA1 hash in base64:

$wtf = Get-FileHash "C:\Defold\plugins\org.eclipse.osgi_3.8.2.v20130124-134944\org\eclipse\osgi\framework\internal\core\osname.aliases" -Algorithm SHA1 | Select-Object -ExpandProperty Hash | Select-Object @{Name="Value";Expression={,@($_ -split '([a-f0-9]{2})')}} | select -ExpandProperty Value | ? {$_} | select @{Name="Value";Expression={[convert]::ToByte($_,16)}} | select -ExpandProperty Value
[convert]::ToBase64String($wtf)

d. Updated “C:\Defold\plugins\org.eclipse.osgi_3.8.2.v20130124-134944\META-INF\MANIFEST.MF” so the entry for the osname.aliases file matches the hash.
e. Removed the ECLIPSE.SF and ECLIPSE.RSA files from that directory, essentially removing the signature eclipse put in place to help ppl verify they have whatever eclipse says they have, since it doesn’t work anymore.
f. zipped it all back up and renamed it to jar and replaced the existing jar file.

This is what put me on this path: https://bugs.eclipse.org/bugs/show_bug.cgi?id=281075
This is eclipse folks adding Windows Server 2015 to that file - this project is including one that is several changes older, I guess. https://git.eclipse.org/r/#/c/46069/1/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/osname.aliases

Rather proud of myself, tbh :slight_smile: used Java once or twice back in the 90s but not since.

3 Likes

Wow!! Yes, that was pretty insane. :slight_smile: Glad you got it sorted out. Luckily, the plan is to eventually free ourselves from Eclipse.

This error is showing up for my on my MacOS device:

!SESSION 2016-08-26 13:01:38.886 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_65
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -keyring /Users/awooldridge/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/awooldridge/.eclipse_keyring -showlocation

!ENTRY org.eclipse.osgi 2 0 2016-08-26 13:01:39.646
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.646
!MESSAGE Bundle initial@reference:file:plugins/com.dynamo.cr.bob_1.0.0.201608051138/ was not resolved.
!SUBENTRY 2 com.dynamo.cr.bob 2 0 2016-08-26 13:01:39.646
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.7))".

!ENTRY org.eclipse.osgi 2 0 2016-08-26 13:01:39.657
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.657
!MESSAGE Bundle com.dynamo.cr.bob_1.0.0.201608051138 [1] was not resolved.
!SUBENTRY 2 com.dynamo.cr.bob 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.7))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.657
!MESSAGE Bundle com.dynamo.cr.ddfeditor_1.0.0.201608051138 [7] was not resolved.
!SUBENTRY 2 com.dynamo.cr.ddfeditor 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.go_1.0.0.
!SUBENTRY 2 com.dynamo.cr.ddfeditor 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.sceneed_1.0.0.
!SUBENTRY 2 com.dynamo.cr.ddfeditor 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.bob_1.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.657
!MESSAGE Bundle com.dynamo.cr.editor_1.0.0.201608051138 [9] was not resolved.
!SUBENTRY 2 com.dynamo.cr.editor 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.bob_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.657
!MESSAGE Bundle com.dynamo.cr.go_1.0.0.201608051138 [14] was not resolved.
!SUBENTRY 2 com.dynamo.cr.go 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.sceneed_1.0.0.
!SUBENTRY 2 com.dynamo.cr.go 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.bob_1.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.657
!MESSAGE Bundle com.dynamo.cr.guied_1.0.0.201608051138 [15] was not resolved.
!SUBENTRY 2 com.dynamo.cr.guied 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.sceneed_1.0.0.
!SUBENTRY 2 com.dynamo.cr.guied 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.go_1.0.0.
!SUBENTRY 2 com.dynamo.cr.guied 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.bob_1.0.0.
!SUBENTRY 2 com.dynamo.cr.guied 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing imported package com.dynamo.cr.tileeditor.scene_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.657
!MESSAGE Bundle com.dynamo.cr.luaeditor_1.0.0.201608051138 [16] was not resolved.
!SUBENTRY 2 com.dynamo.cr.luaeditor 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.go_1.0.0.
!SUBENTRY 2 com.dynamo.cr.luaeditor 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.sceneed_1.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.657
!MESSAGE Bundle com.dynamo.cr.parted_1.0.0.201608051138 [17] was not resolved.
!SUBENTRY 2 com.dynamo.cr.parted 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.sceneed_1.0.0.
!SUBENTRY 2 com.dynamo.cr.parted 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.tileeditor_1.0.0.
!SUBENTRY 2 com.dynamo.cr.parted 2 0 2016-08-26 13:01:39.657
!MESSAGE Missing required bundle com.dynamo.cr.go_1.0.0.
!SUBENTRY 2 com.dynamo.cr.parted 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.bob_1.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.658
!MESSAGE Bundle com.dynamo.cr.projed_1.0.0.201608051138 [18] was not resolved.
!SUBENTRY 2 com.dynamo.cr.projed 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.bob_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.658
!MESSAGE Bundle com.dynamo.cr.sceneed_1.0.0.201608051138 [22] was not resolved.
!SUBENTRY 2 com.dynamo.cr.sceneed 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing imported package com.dynamo.bob.font_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.658
!MESSAGE Bundle com.dynamo.cr.spine_1.0.0.201608051138 [23] was not resolved.
!SUBENTRY 2 com.dynamo.cr.spine 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.sceneed_1.0.0.
!SUBENTRY 2 com.dynamo.cr.spine 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.bob_1.0.0.
!SUBENTRY 2 com.dynamo.cr.spine 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.go_1.0.0.
!SUBENTRY 2 com.dynamo.cr.spine 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.tileeditor_1.0.0.
!SUBENTRY 2 com.dynamo.cr.spine 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.ddfeditor_1.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-26 13:01:39.658
!MESSAGE Bundle com.dynamo.cr.tileeditor_1.0.0.201608051138 [25] was not resolved.
!SUBENTRY 2 com.dynamo.cr.tileeditor 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.go_1.0.0.
!SUBENTRY 2 com.dynamo.cr.tileeditor 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.sceneed_1.0.0.
!SUBENTRY 2 com.dynamo.cr.tileeditor 2 0 2016-08-26 13:01:39.658
!MESSAGE Missing required bundle com.dynamo.cr.bob_1.0.0.

!ENTRY org.eclipse.osgi 4 0 2016-08-26 13:01:39.661
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application “com.dynamo.cr.editor.application” could not be found in the registry. The applications available are: org.eclipse.equinox.app.error, org.eclipse.equinox.p2.garbagecollector.application.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Can you install a more recent version of Java?

We bundle a jre in the installation (which is one of the reasons it’s so large) and it seems like for some users, it still falls back to the locally installed jre/jdk. I have suspected this for a while, but never saw any patterns nor dug into it deeper. If you have a free night to waste sometime, it would be helpful if you would bother to fiddle around with your system to try to make it use the jre that comes with the installation. Completely understand if you’re not at all interested in doing that. :slight_smile: But it would be great to know what’s causing this, we are still on java in Editor2, though we dropped eclipse.

2 Likes

I’d be happy to help. I cannot update Java because I have a eclipse based tool at work that requires a certain version. Any tips on getting to to use the correct jre?

Great, thank you!

I have no clear idea how to go about this, but let’s try. :slight_smile:

The java version used is found in Help > About Defold, and should be “Java 1.8.0_05”, given that the app has started at all of course. :slight_smile:

We use Eclipse to package the application and use similar configs as eclipse. The JRE we attempt to use is specified in Defold.ini after the -vm switch (on OSX this would be Defold.app/Contents/MacOS/Defold.ini). Similar to this: https://wiki.eclipse.org/Eclipse.ini#-vm_value:_Mac_OS_X_Example

If I corrupt the -vm value in my installation (Defold.ini), the app starts with an error saying there’s no JRE found there. So it doesn’t seem to fallback to my local version, which is 1.8.0_45. Could you do the same just to test?

Do you happen to have another eclipse installation on that system and have you done any env var configurations for it? I have no idea if that’s even possible, but trying to look for anything that could override the Defold.ini settings when starting the app.

2 Likes

I’ve received reports from other sources that both the editor and the engine aren’t working as expected on Windows Server 2012 R2. I’ve created a ticket to track this: DEF-2105