Standalone IDE failing to initialize IDE properly

I am attempting to create a Standalone IDE for our DSL using the Building standalone IDEs for your languages page.

I am using MPS 2017.2.2 and JDK 1.8 

.  I created the build scripts with the Build Solution Wizard and selected Standalone IDE.  I have the two scripts below.  They run successfully and distribute the linux, windows, and mac versions.  

However, when I copy the zip file to another directory and unzip it.  I then copy the bin/win contents to the bin directory.

The attempt to run mps.bat, the IDE starts, but gives me the following error:

 

IDE Fatal Errors

Exception in DCWDevEnv core. Moments ago.  Occurred once since the last clear.  Unread.

On Comments tab:  Error message: null

On the Details tab:

null
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:151)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getActionImpl(ActionManagerImpl.java:485)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:473)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.preloadActions(ActionManagerImpl.java:1240)
at com.intellij.openapi.actionSystem.impl.ActionPreloader.preload(ActionPreloader.java:34)
at com.intellij.openapi.application.Preloader.lambda$null$0(Preloader.java:74)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.intellij.openapi.application.Preloader.lambda$initComponent$1(Preloader.java:72)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.intellij.util.PlatformUtils.isJetBrainsProduct(PlatformUtils.java:52)
at com.intellij.openapi.fileChooser.actions.GotoProjectDirectory.<clinit>(GotoProjectDirectory.java:32)
... 18 more


java.lang.RuntimeException: com.intellij.diagnostic.PluginException: class with name 'com.intellij.openapi.fileChooser.actions.GotoProjectDirectory' cannot be loaded [Plugin: com.intellij]
at com.intellij.openapi.application.impl.LaterInvocator.invokeAndWait(LaterInvocator.java:186)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:688)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:693)
at com.intellij.util.WaitForProgressToShow.runOrInvokeAndWaitAboveProgress(WaitForProgressToShow.java:43)
at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.run(PluginLoaderRegistry.java:313)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:718)
at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$10(ApplicationImpl.java:602)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:342)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.intellij.diagnostic.PluginException: class with name 'com.intellij.openapi.fileChooser.actions.GotoProjectDirectory' cannot be loaded [Plugin: com.intellij]
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.error(ActionManagerImpl.java:193)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:158)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getActionImpl(ActionManagerImpl.java:485)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:473)
at jetbrains.mps.plugins.applicationplugins.GroupAdjuster.adjustTopLevelGroups(GroupAdjuster.java:83)
at jetbrains.mps.plugins.applicationplugins.ApplicationPluginManager.afterPluginsCreated(ApplicationPluginManager.java:75)
at jetbrains.mps.plugins.BasePluginManager.loadPlugins(BasePluginManager.java:88)
at jetbrains.mps.plugins.PluginLoaderRegistry.loadContributors(PluginLoaderRegistry.java:146)
at jetbrains.mps.plugins.PluginLoaderRegistry.access$700(PluginLoaderRegistry.java:70)
at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.addContributors(PluginLoaderRegistry.java:339)
at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.doUpdate(PluginLoaderRegistry.java:329)
at jetbrains.mps.plugins.PluginLoaderRegistry$UpdatingTask.lambda$run$0(PluginLoaderRegistry.java:313)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:314)
at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:163)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:416)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:821)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:923)
at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:216)
at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:202)
at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:616)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:414)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:117)
at com.intellij.openapi.progress.impl.CoreProgressManager.runSynchronously(CoreProgressManager.java:332)
at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:317)
at jetbrains.mps.plugins.PluginLoaderRegistry.runTask(PluginLoaderRegistry.java:180)
at jetbrains.mps.plugins.PluginLoaderRegistry.update(PluginLoaderRegistry.java:271)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:314)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:416)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:821)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.intellij.openapi.fileChooser.actions.GotoProjectDirectory
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:151)
... 55 more

 

 

DCWDevEnv:

build DCWDevEnv generates DCWDevEnvBuild.xml

base directory: ../../ [JComponent javax.swing.JButton[,483,46,20x20,alignmentX=0.0,alignmentY=0.5,border=com.intellij.ide.ui.laf.intellij.WinIntelliJButtonBorder@428f8351,flags=296,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=20,height=20],defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=com.intellij.util.ui.JBInsets$JBInsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=...,defaultCapable=true] ]

use plugins:
java
mps

macros:
var date = date yyyyMMdd
var build.number = DCWDevEnv-1.0.SNAPSHOT
folder mps_home = ./../../../../MPS 2017.2.2-gen

dependencies:
mpsStandalone (artifacts location $mps_home)
mpsMakePlugin (artifacts location $mps_home/plugins)
mps (artifacts location $mps_home)

project structure:
idea branding
version
codename DCWDevEnv
1.0.<no bugfixNr>, eap false
company <no company>
build number ${build.number}, date ${date}
logo splash screen ./icons/splash.png
textcolor 002387
progressColor 002387
progressX 10
progressY 300
progressHeight 5
about screen ./icons/about.png
foreground <no foreground>
copyrightForeground <no copyrightForeground>
linkColor <no linkColor>
logoX <no logoX>
logoY <no logoY>
logoW <no logoW>
logoH <no logoH>
icons
16x16 ./icons/MPS16.png
32x32 ./icons/MPS32.png
32x32 opaque ./icons/MPS32.png
128x128 <no icon128>
icon <no icon>
icon toolWindow <no iconToolWindow>
names
name DCWDevEnv
full name DCWDevEnv

welcome screen ./icons/logo.png
editor background-url default background

plugins <no plugins>
<no updateWebsite>

<no help>
documentation <no documentation>
support <no support>
feedback url <no feedbackUrl>
whats new <no whatsnew>
<no keymap>
third-party <no thirdparty>
custom elements
<< ... >>

<no stats>

idea plugin DCWDevEnv
name DCWDevEnv
short (folder) name DCWDevEnv
description <no description>
version 1.0
<< no vendor >>
content:
DCWDevEnv
dependencies:
jetbrains.mps.core
<< ... >>

mps group DCWDevEnv
language LGExpressions
load from ./languages/LGExpressions/LGExpressions.mpl

solution LGScript.runtime
load from ./languages/LGScript/runtime/LGScript.runtime.msd

language LGTypes
load from ./languages/LGTypes/LGTypes.mpl

language LGScript
load from ./languages/LGScript/LGScript.mpl

language LGStatement
load from ./languages/LGStatement/LGStatement.mpl

language LGBase
load from ./languages/LGBase/LGBase.mpl


default layout:
import mpsStandalone::languages
import mpsStandalone::license
folder bin
import files from mpsStandalone::bin
include log.xml
include log4j.dtd
file $mps_home/bin/idea.properties
replace regex "\.MPS(\w+)" /g -> \.${build.number}

folder lib
import files from mpsStandalone::lib
exclude MPS-src.zip
exclude branding.jar
jar branding.jar
files of idea branding DCWDevEnv 1.0

folder plugins
import mpsStandalone::plugins/cvsIntegration
import mps::plugins/svn4idea
import mps::plugins/git4idea
import mpsStandalone::plugins/mps-core
plugin DCWDevEnv
<empty>

# optional plugins
import mpsMakePlugin::mps-make

properties file build.number
build.number = ${build.number}
date = ${date}
version = 1.0


<<additional aspects>>
D:/SUMGlobal/development/L&G DCW/dcwdevenv

 

DCWDevEnvDistribution script:

build DCWDevEnvDistribution generates DCWDevEnvBuildDistribution.xml

base directory: ../../ [JComponent javax.swing.JButton[,483,46,20x20,alignmentX=0.0,alignmentY=0.5,border=com.intellij.ide.ui.laf.intellij.WinIntelliJButtonBorder@428f8351,flags=296,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=20,height=20],defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=com.intellij.util.ui.JBInsets$JBInsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=...,defaultCapable=true] ]

use plugins:
<< ... >>

macros:
folder mps_home = ./../../../../MPS 2017.2.2-gen
var version = 1.0

dependencies:
DCWDevEnv

project structure:
<< ... >>

default layout:
tar ${build.number}-linux.tar.gz (compression gzip)
folder DCWDevEnv ${version}
import files from DCWDevEnv::/
<any>
folder bin
file $mps_home/bin/linux/fsnotifier (755)
file $mps_home/bin/linux/fsnotifier64 (755)
file $mps_home/bin/mps.vmoptions (644)
fix eol: convert to a single LF, remove eof (Ctrl-Z): true
file $mps_home/bin/mps64.vmoptions (644)
fix eol: convert to a single LF, remove eof (Ctrl-Z): true
files from $mps_home/bin/linux
exclude **/fsnotifier
exclude **/fsnotifier64

file $mps_home/bin/mps.sh (755)
fix eol: convert to a single LF, remove eof (Ctrl-Z): true

zip ${build.number}.zip
folder DCWDevEnv ${version}
import files from DCWDevEnv::/
<any>
folder bin
file $mps_home/bin/mps.vmoptions (644)
file $mps_home/bin/mps.exe.vmoptions (644)
file $mps_home/bin/mps64.vmoptions (644)
file $mps_home/bin/mps64.exe.vmoptions (644)
folder win
files from $mps_home/bin/win
exclude **/*.exe
filemode folders: <default (755)>, files: 755
files from $mps_home/bin/win
include **/*.exe

folder linux
files from $mps_home/bin/linux
exclude **/fsnotifier
exclude **/fsnotifier64
file $mps_home/bin/linux/fsnotifier (755)
file $mps_home/bin/linux/fsnotifier64 (755)

folder mac
file $mps_home/bin/mac/libbreakgen.jnilib (644)
file $mps_home/bin/mac/libbreakgen64.jnilib (644)
file $mps_home/bin/mac/restarter (755)
file $mps_home/bin/mac/fsnotifier (755)
file $mps_home/bin/mac/printenv.py (755)
folder Contents
folder Resources
file $mps_home/bin/mac/Contents/Resources/mps.icns (644)

folder MacOS
file $mps_home/bin/mac/Contents/MacOS/mps (755)
file $mps_home/bin/mac/Contents/MacOS/idea_appLauncher (644)

file $mps_home/bin/mac/Contents/Info.plist (644)

zip ${build.number}-macos.zip
folder DCWDevEnv ${version}.app
folder Contents
import files from DCWDevEnv::/
<any>
folder Resources
file $mps_home/bin/mac/Contents/Resources/mps.icns (644)

folder MacOS
file $mps_home/bin/mac/Contents/MacOS/mps (755)
file $mps_home/bin/mac/Contents/MacOS/idea_appLauncher (644)

file $mps_home/bin/mac/Contents/Info.plist (644)
folder bin
file $mps_home/bin/mac/libbreakgen.jnilib (644)
file $mps_home/bin/mac/libbreakgen64.jnilib (644)
file $mps_home/bin/mac/restarter (755)
file $mps_home/bin/mac/fsnotifier (755)
file $mps_home/bin/mps.vmoptions (644)
fix eol: convert to a single LF, remove eof (Ctrl-Z): true
file $mps_home/bin/mps64.vmoptions (644)
fix eol: convert to a single LF, remove eof (Ctrl-Z): true
file $mps_home/bin/mac/printenv.py (755)
fix eol: convert to a single LF, remove eof (Ctrl-Z): true

file $mps_home/bin/mps.sh (755)
fix eol: convert to a single LF, remove eof (Ctrl-Z): true

<<additional aspects>>
D:/SUMGlobal/development/L&G DCW/dcwdevenv

 

2
3 comments
Avatar
Permanently deleted user

I traced the stack trace in the code 

Caused by: java.lang.NullPointerException
at com.intellij.util.PlatformUtils.isJetBrainsProduct(PlatformUtils.java:52)
at com.intellij.openapi.fileChooser.actions.GotoProjectDirectory.<clinit>(GotoProjectDirectory.java:32)

It looks like there may be an issue in PlatformUtil.isJetBrainsProduct when a company is not provided in idea branding section of the build script that generates build.xml.  

I had it defaulted to 

company <no company>

This causes the NullPointerException above because the appInfo is not null but the method used to retrieve the short company name.  Since the getShortCompanyName() method return null the .equals causes the NullPointerException.

The work around is to provide a company name and url.

public static boolean isJetBrainsProduct() {
  final ApplicationInfo appInfo = ApplicationInfo.getInstance();
  return appInfo != null && appInfo.getShortCompanyName().equals("JetBrains");
  }
0

Well spotted, thank you. I've created https://youtrack.jetbrains.com/issue/MPS-26654 to have it fixed soon.

Vaclav

 

0
Avatar
Permanently deleted user

Hi, I also have a similar problem while building a standalone IDE, but instead of having null in <no Company>, mine was null for <no updateWebsite>.

I would like to know how to fix the problem, and where did you find the file that was showed in the stack trace? 

I am new to programming and is having trouble finding the java file mentioned on the stack trace.

(Here's my problem post: https://mps-support.jetbrains.com/hc/en-us/community/posts/360000149344-Building-Standalone-IDE-update-website-can-t-be-null-)

 

0

Please sign in to leave a comment.