2

I am facing an issue every time I am saving something in java file. I know the error message is coming from gwt plug-in.

java.lang.NoClassDefFoundError: com/google/gdt/eclipse/suite/preferences/GdtPreferences
at com.google.gdt.eclipse.suite.ext.update.FeatureUpdateManager.checkForUpdates(FeatureUpdateManager.java:105)
at com.google.gdt.eclipse.suite.ext.builders.UpdateTriggerCompilationParticipant.isActive(UpdateTriggerCompilationParticipant.java:40)
at org.eclipse.jdt.internal.core.JavaModelManager$CompilationParticipants.getCompilationParticipants(JavaModelManager.java:339)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:587)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:167)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
Ashish
  • 14,295
  • 21
  • 82
  • 127

2 Answers2

4

For me option -clean didn't help in every case though used several times. I found out that in my case the root cause of the NoClassDefError was a NullPointerException:

java.lang.NoClassDefFoundError: com/google/gdt/eclipse/suite/preferences/GdtPreferences
    at com.google.gdt.eclipse.suite.ext.update.FeatureUpdateManager.checkForUpdates(FeatureUpdateManager.java:105)
[...]
Caused by: java.lang.NullPointerException
    at com.google.gdt.eclipse.core.markers.GdtProblemSeverities.loadSeverities(GdtProblemSeverities.java:144)

And when it occured in one workspace it occured in every workspace so I took a look into the Eclipse "installation". There is a file named

configuration/.settings/com.google.gdt.eclipse.suite.prefs

and it a line like this:

problemSeverities=com.google.gwt.eclipse.core.validators.rpc.RemoteServiceProblemType\#305\=1

After removing that link my Eclipse started without problems ... but with modified settings in Window/Preferences/Google ... I haven't found out how to specify those severity settings in the file to be parsed without an Exception.

yasd
  • 916
  • 7
  • 21
  • This is the only solution that works. Added a comment to existing GWT issue https://github.com/gwtproject/gwt/issues/3841 referencing this post. – Fuzzo Jun 09 '16 at 08:33
  • Unfortunately there is no such entry in the prefs for my Eclipse: problemSeverities=com.google.gdt.eclipse.core.markers.ProjectStructureOrSdkProblemType\#706\=1|com.google.appengine.eclipse.core.markers.AppEngineProblemType\#207\=1|com.google.appengine.eclipse.core.markers.AppEngineProblemType\#207\=1 – jedison Nov 25 '16 at 13:39
0

Workaround solution that may work:

Close all projects, close eclipse.

Start eclipse using, "eclipse -clean" option.

You can try repeating the process 2-3 times, if it does not work first time.

Not sure of the exact reason why this appears.

AmanicA
  • 4,659
  • 1
  • 34
  • 49