An internal error occurred during: “Updating Maven Project”. java.lang.NullPointerException

后端 未结 20 1013
小鲜肉
小鲜肉 2020-12-12 16:55

I\'m developing a Java EE web project. When I try to add a dependency, this error message appears. I use Eclipse Kepler.

An internal error occurred du

20条回答
  •  情歌与酒
    2020-12-12 17:23

    I had the same issue ... solution at the end !

    here the eclipse log:

    java.lang.NullPointerException
        at com.google.appengine.eclipse.wtp.maven.GaeRuntimeManager.getGaeRuntime(GaeRuntimeManager.java:85)
        at com.google.appengine.eclipse.wtp.maven.GaeRuntimeManager.ensureGaeRuntimeWithSdk(GaeRuntimeManager.java:55)
        at com.google.appengine.eclipse.wtp.maven.GaeFacetManager.addGaeFacet(GaeFacetManager.java:59)
        at com.google.appengine.eclipse.wtp.maven.GaeProjectConfigurator.configure(GaeProjectConfigurator.java:46)
    

    ... it comes from "appengine maven wtp plugin" that try to get the type of GAE runtime, but seems to be null here (... getRuntimeType() --> NPE):

    see class com.google.appengine.eclipse.wtp.maven/GaeRuntimeManager.java

      private static IRuntime getGaeRuntime(String sdkVersion) {
        IRuntime[] runtimes = ServerCore.getRuntimes();
        for (IRuntime runtime : runtimes) {
          if (runtime != null &&  **runtime.getRuntimeType()**.equals(GAE_RUNTIME_TYPE)) {
    

    So, if you check in eclipse, Google App Engine is visible , but when you select it you'll see that no SDK is associated ...

    SOLUTION: in red on the screenshot ;-)

提交回复
热议问题