Closed patflynn closed 7 years ago
I wasn't able to reproduce this
since the bug appears to be related to the java home dir config, I'm guessing this happens in conjunction with a specific configuration of the project SDK.
Actually, I think you're seeing another bug which is a bit dissimulated. (At least, I'm seeing the same thing in Windows)
When you press the Start button for the first time, the run config editor is not supposed to pop up. It should only do so when in error state.
With me, there was no JDK set in the project and the run config was in an error state. However, when I press run and the run config editor pops up, there is no error messaging anywhere, so I press run, but I still get warned that the config is in error state. If I try to run it anyway, I'm finally warned that no JDK is set in the module.
After setting the JDK, though, I'm still seeing the run config in error state, but I can run it without an issue.
This didn't happen for you project, but one of mine. I couldn't reproduce your issue. I was having issues with a cached older version of the common library, did you try cleaning and refreshing the Gradle plugin project?
In this specific case, devAppServerJdk isn't being set and an NPE is bring thrown because of that.
I discovered that the module JDK was configured but the Project SDK is not set. But I should be getting an error for that when I try to start the server.
Actually I think I understand. IntelliJ is OK with having no Project SDK if the module is using a different one. Our code assumes a valid Project SDK exists.
My suggestion here is to add to the dev_appserver validation an extra check for Project SDK. If it isn't set, then dev_appserver can't be run.
Can we just use the module jdk?
On Tue, Feb 7, 2017 at 5:28 PM, João Martins notifications@github.com wrote:
My suggestion here is to add to the dev_appserver validation an extra check for Project SDK. If it isn't set, then dev_appserver can't be run.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/google-cloud-intellij/issues/1214#issuecomment-278163378, or mute the thread https://github.com/notifications/unsubscribe-auth/AHf5He5jXLSeDFFUxd-TlTzmELfYZWS4ks5raPAEgaJpZM4L58kn .
Because there isn't a module - run config relation, and it wouldn't be trivial to implement, I suggest we just error our in this particular scenario. I don't think many users will be hitting this case.
If #926 ever comes to fruition, we would discard the module - run config work too.
There is a deployment source module association.
I'm fine with a solution that tells the user to set a project sdk if it's null.
Steps to reproduce:
On Windows 10:
1) File -> New project from Version Control -> Git 2) URL = https://github.com/patflynn/hello-world-appengine-std.git 3) Import and enable maven sync and add framework support for appengine and web from the notification 4) run the dev server run config 5) see the run config editor pop up 6) select the module artifact 7) click run 8) observe
9) from logs