Comments (5)
@ov7a I see. Thank you very much for your reply. It turned out to be a problem with Springboot, but I always thought it was a problem with Gradle. I adopted this method and successfully resolved the issue of bootJar running an errorγ
This can be worked around by configuring the application's main class name:
springBoot {
mainClass = 'com.example.ExampleApplication'
}
Because I am using gradle kotlin, the code above is written in this way
tasks.bootJar {
mainClass="com.example.ExampleApplication"
// other config code
}
from gradle.
I have the same error, and it finishes up with this message:
Unsupported Gradle JVM.
Your build is currently configured to use Java 22.0.1 and Gradle 8.8-rc-1.
Possible solutions:
- Use Java 21 as Gradle JVM: Open Gradle settings
- Upgrade to Gradle 8.5 and re-sync
Interestingly enough, when I run the test suite it works fine -- once:
> Task :compileJava
Note: C:\xxx.java uses preview features of Java SE 22.
Note: Recompile with -Xlint:preview for details.
> Task :processResources UP-TO-DATE
> Task :classes
> Task :compileTestJava
Note: C:\yyy.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\zzz.java uses preview features of Java SE 22.
Note: Recompile with -Xlint:preview for details.
When I try to re-run the test suite a second time, I get a "Test events were not received" message, and this persists until I switch back to Java 21.
from gradle.
We appreciate the effort, but we must ask for more information so that we can triage it.
We do not see an immediate root cause, and we need a minimal reproducible example for the triage. If we have a reproducer, we may be able also to suggest workarounds or ways to avoid the problem.
The ideal way to provide a reproducer is to leverage our reproducer template. You can also use Gradle Project Replicator to reproduce the structure of your project.
This issue will be closed after 7 days unless you provide more information.
There are multiple moving parts here.
- Spring boot gradle plugin. Does the version you are using support running on Java 22?
- Intellij support. Does the version you are using support integration with Gradle 8.8-rc-1?
In any case, please provide a reproducer for your issue.
from gradle.
@ov7a I have attached a demo of Springboot for you, which uses the gradle-8.8-rc-1 version. The version of Springboot is the latest preview version, version 3.3.0 RC1 (of course, using the latest official version 3.2.5, the result is the same). Both versions of Springboot support JDK22, and the Intellij idea version I am currently using is 2024.1, which is also the latest version.
sprinboot-3.3.0 (RC1).zip
from gradle.
The stacktrace
...
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 66
at org.springframework.asm.ClassReader.<init>(ClassReader.java:199)
at org.springframework.asm.ClassReader.<init>(ClassReader.java:180)
at org.springframework.asm.ClassReader.<init>(ClassReader.java:166)
at org.springframework.asm.ClassReader.<init>(ClassReader.java:287)
at org.springframework.boot.loader.tools.MainClassFinder.createClassDescriptor(MainClassFinder.java:254)
at org.springframework.boot.loader.tools.MainClassFinder.doWithMainClasses(MainClassFinder.java:136)
at org.springframework.boot.loader.tools.MainClassFinder.findSingleMainClass(MainClassFinder.java:109)
...
indicates that it's a Spring issue.
See these issues for more details:
from gradle.
Related Issues (20)
- Document behavior of `Property` objects in relation to parallel task execution
- FileCollection.elements fail under load.
- Make `-x` Isolated Projects compatible
- Make `evaluationDependsOn` Isolated Projects compatible
- Using a software type with an empty configuration block has no effect in DCL
- Android Studio 2.4 Preview 5 April 7, 2017 Not working with radl HOT 1
- ConventionMapping doesn't work correctly for DirectoryProperty and RegularFileProperty after upgrade
- Introduce `@ToBeReplacedByLazyProperty` annotation
- Simplify testing the distribution (bust up DistributionIntegrationSpec)
- Introduce a replacement for `gradle.allprojects {...}` suitable for incremental adoption HOT 1
- Get rid of custom serialization when reporting task validation problems via the Problems API HOT 1
- Auto detection of installed toolchains For vfox HOT 1
- Re-model tasks that implement interfaces like `PatternFilterable`, `JavaForkOptions`, `ExecSpec`, `CopySpec` etc HOT 1
- Emit Build Scans for interrupted builds HOT 1
- `gradle init` fails to generate Kotlin application with JUnit Jupiter test framework HOT 3
- DefaultFileSystemAccess.snapshot sometimes ignoring filter HOT 1
- Unexpected internal resolution failure with capability conflict handling HOT 2
- 8.8 compatibility issue with JavaVersion, daemon registry and older TAPI clients HOT 1
- Issue with running on Linux (see description) HOT 2
- Environment variable for gradle CLI arguments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle.