1

One project among many started giving me the following error when running Gradle Tasks -> application -> bootRun:

Error: Could not find or load main class 1.1,

However, the following both work:

  • Running ./gradlew bootRun from the command-line
  • Starting the service with STS Boot Dashboard

It's odd that the Gradle Task window's execution is coming up with the class 1.1,.

Ideas?

Configuration

  • Windows 10 Pro
  • STS 3.9.4.RELEASE
  • Eclipse Buildship 2.2.1
  • Gradle Wrapper 4.5.1
  • Spring Boot 2.0.3.RELEASE

Attempts

  • Ran ./gradlew clean build
  • Refreshed Gradle Tasks in the window
  • Right-clicked project and ran Gradle -> Refresh Gradle Project
  • Restarted STS
  • Deleted ./metadata and restarted STS
  • Deleted ./bin and ./build directories
  • Unloaded the project and re-imported as Gradle project
  • Ran "STS -clean"

... always the same result

Eric Swanson
  • 820
  • 1
  • 9
  • 19
  • This is an old question by now. Not sure you still care, but I'll add my two cents. I don't really have much of an idea unfortunately, other than that it sounds like a bug in BuildShip more than anything. So if you want to follow up on this, it should probably be done by filing a bug-report with buildship. – Kris Jul 31 '18 at 15:35

1 Answers1

1

I have the same issue. Anyway in Eclipse Oxygen it just suddenly stops working but in terminal it is fine.

https://github.com/JetBrains/kotlin-native/issues/1747

Maybe this link would help. It is not working for me but I believe it points to the right direction.

Solution he purposes:

No, removing of node does not help. But the follow line in the Gradle script solve the problem:

System.getProperties().remove( 'org.osgi.framework.system.capabilities' )

The value of the property is:

osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0, 1.1, 1.2",osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0, 1.1",osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8",osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8",osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8",osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8"

It look like that you try to add all environment variable to the command line but does not quote correctly.

WesternGun
  • 11,303
  • 6
  • 88
  • 157
  • Can you please share the build.gradle { i am new to it :) } . I am also facing the similar issue from STS. I tried this but again STS is failing to run the project. – TechFool Aug 16 '21 at 11:26
  • No I cannot. Was long time ago and I don't have access to code now. Google Groovy syntax, maybe. – WesternGun Aug 17 '21 at 07:37