Module SDK is not defined in newly created project

Hi,
I'm trying to fix a regression we seem to have with the current 13.1 version of IDEA and our plugin. Initially this manifested itself in a null pointer I described here:
http://devnet.jetbrains.com/thread/456112

However, this seems to be triggered by an SDK not getting associated with the project we create with our plugin (the Codename One plugin). We do some things to add a JDK as described here: http://devnet.jetbrains.com/thread/452679 but I'm not sure why this would stop working in newer versions.

This is the message I'm getting from the IDE:
Screen Shot 2014-09-13 at 15.07.53.png

I see these lines in the log but I'm not sure if they are relevant:
2014-09-13 14:59:54,826 [  18150]   INFO - 1.plugin.intellij.ResourceFile - Attempting to read version.properties from file:/Users/user2/.codenameone/designer_1.jar
2014-09-13 14:59:54,838 [  18162]   INFO - 1.plugin.intellij.ResourceFile - Updating designer from 20140602 to 20140204
2014-09-13 14:59:55,437 [  18761]   INFO - 1.plugin.intellij.ResourceFile - Loading default VM arguments from IDE
2014-09-13 14:59:55,438 [  18762]   INFO - 1.plugin.intellij.ResourceFile - Executing: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=96m -XX:+UseCompressedOops -jar /Users/user2/.codenameone/designer_1.jar gen /Users/user2/IdeaProjects/untitled14/src/theme.res native HiWorld  
2014-09-13 14:59:57,395 [  20719]   INFO - dule.CodenameOneProjectBuilder - Adding project library: CLDC11.jar
2014-09-13 14:59:57,470 [  20794]   INFO - dule.CodenameOneProjectBuilder - Adding project library: CodenameOne.jar
2014-09-13 14:59:57,682 [  21006]   INFO - dule.CodenameOneProjectBuilder - Linking library source: CodenameOne_SRC.zip
2014-09-13 14:59:57,824 [  21148]   INFO - dule.CodenameOneProjectBuilder - Linking library documentation: http://codenameone.googlecode.com/svn/trunk/CodenameOne/javadoc/index.html OrderRootType:Root DOCUMENTATION
2014-09-13 15:00:03,561 [  26885]   INFO - dule.CodenameOneProjectBuilder - Adding ant support
2014-09-13 15:00:06,753 [  30077]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 664 ms
2014-09-13 15:00:06,754 [  30078]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 1404 files to update
2014-09-13 15:00:07,177 [  30501]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gant_config.xml file is null
2014-09-13 15:00:07,959 [  31283]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/remote-servers.xml file is null
2014-09-13 15:00:08,048 [  31372]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 16412 ms
2014-09-13 15:00:08,544 [  31868]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml file is null
2014-09-13 15:00:10,544 [  33868]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 3790 ms
2014-09-13 15:00:31,046 [  54370]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/postfixTemplates.xml file is null
2014-09-13 15:00:31,800 [  55124]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml file is null
2014-09-13 15:00:42,145 [  65469]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/web-browsers.xml file is null
2014-09-13 15:00:42,197 [  65521]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml file is null
2014-09-13 15:00:42,198 [  65522]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml file is null
2014-09-13 15:00:43,674 [  66998]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/intentionSettings.xml file is null
2014-09-13 15:00:45,440 [  68764]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/checker.xml file is null
2014-09-13 15:00:45,677 [  69001]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/cachedDictionary.xml file is null
2014-09-13 15:00:53,486 [  76810]   INFO - 1.plugin.intellij.ResourceFile - Loading default VM arguments from IDE
2014-09-13 15:01:51,444 [ 134768]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/applicationLibraries.xml file is null

3 comments
Comment actions Permalink

Any ideas?
Is there some additional information I can provide to help debug this?

0
Comment actions Permalink

This message is shown for modules which don't have associated SDK. You can call ModifiableRootModel#inheritSdk to reuse the project SDK in a module or
ModifiableRootModel#setSdk to set a custom SDK. For Java modules SDK is shown on 'Dependencies' tab of the module editor.

--
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Thanks! That did the trick!
Incorrectly marked your answer as helpful instead of as correct.

0

Please sign in to leave a comment.