Eric Swanson
Eric Swanson

Reputation: 930

Gradle (wrapper) + STS + Spring Boot: Error: Could not find or load main class 1.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:

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

Ideas?

Configuration

Attempts

... always the same result

Upvotes: 1

Views: 1236

Answers (1)

WesternGun
WesternGun

Reputation: 12728

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.

Upvotes: 1

Related Questions