How to fix this error while updating gradle docker plugin:
Error:
Caused by: groovy.lang.MissingPropertyException: No such property: parentFile for class: org.gradle.api.internal.file.DefaultFilePropertyFactory$DefaultRegularFileVar
Gradle: 7.5
Java: 1.8
application: spring-boot
Instead of
createDockerfile.destFile.parentFile
You should use
createDockerfile.getDestDir()
Related
Gradle build is throwing the following error
What went wrong:
Execution failed for task ':compileJava'.
Could not resolve all files for configuration ':compileClasspath'.
Could not find com.oracle:ons:19.3.
Required by:
project :
project : > com.xyz.abc.utils:openshift-utils:2.0.30
I have added the below dependency
implementation('com.oracle:ons:19.3')
Also the below repository
mavenCentral()
maven { url 'http://repository.xyz.com:8081/artifactory/gradle-plugins'; allowInsecureProtocol true
metadataSources {
mavenPom()
artifact()
}
}
I can see this dependency under Project and External Dependencies
The project that is needing this dependency has the below line in build.gradle
compile("com.oracle:ons:19.3")
I'm using gradle wrapper and gradle version is 7.4.2
Can you please help in resolving this error?
I was also facing similar issue. This resolved for me when I used a compatible spring boot version for particular JAVA version you are using in your project.I was getting similar issue-
For example - version 3.0.0 is not compatible with JAVA 11
But when I used version 3.0.0 with JAVA 17 and rebuild the project, it was resolved
Our project still worked well in gradle 4.10.2 (Spring boot 1.5.22), but when i have upgraded gradle to 6.6.1 it thrown exception
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':my-app'.
Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener
Caused by: java.lang.NoSuchMethodError: org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;
at org.springframework.boot.gradle.repackage.RepackagePluginFeatures$RegisterInputsOutputsAction.setupInputOutputs(RepackagePluginFeatures.java:150)
at org.springframework.boot.gradle.repackage.RepackagePluginFeatures$RegisterInputsOutputsAction.execute(RepackagePluginFeatures.java:136)
I have tried with gradle 5 it still happend.
This is my gradle.build bootRepackage section, when i removed classifier = "boot" it work without classifier feature
bootRepackage {
enabled = true
classifier = "boot"
doLast{
//some tasks
}
}
Why could this be?
Gradle 5 has removed a method that Spring Boot 1.5’s Gradle plugin requires. Spring Boot 1.5 supports Gradle 2.x or 3.x so it isn’t surprising that it does not work with Gradle 5.
If you want to use a more up-to-date version of Gradle, you’ll have to upgrade to a more up-to-date version of Spring Boot as well. At the time of writing 2.3.x is the oldest generation of Spring Boot that is still supported.
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
Exception in thread "main" java.lang.RuntimeException: No toolkit found
I am trying to make OpenJFX to work on Apple MacOS Silicon M1 chip.
I use Gradle and it includes:
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.9'
}
javafx {
sdk = '/Users/eosantigen/Documents/javafx-sdk-16'
modules = ['javafx.controls']
}
but I get the error above when I do gradle run. I also use JDK11. I also get the same error on the official tutorial.
Anyone made it work with Gradle? Or Maven?
Thanks.
UPDATE:
Finally, I have tried OpenJDK 17 (installed through SDKman, as usual), with the following in build.gradle:
plugins {
id 'application'
id "org.javamodularity.moduleplugin" version "1.8.10"
id 'org.openjfx.javafxplugin' version '0.0.12'
}
javafx {
version = '17'
modules = ['javafx.controls']
}
And it runs perfectly. (didn't try jdk-11 again with it.)
Hello i want to create a Spring boot app with kotlin and Gradle but i have this issue in the plugins line, it doens't recognize any plugin i add ,i couldn't undrestand what's missing, i'm using Gradle 6.3v , jdk 8
Error:
Error
And that's the build.gradle file
build.gradle.kts
Your first plugin declaration has a typo in the version:
kotlin("jvm") version "1.3.11" needs to be kotlin("jvm") version "1.3.71"
I would start by changing that so all usages of kotlin plugins are aligned on a recent version.
If that does not resolve the problem, try running the build from the CLI with the added flag --stacktrace which may tell you more about why is the plugin not found.
I have a fastlane setup in my project, which fails with java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at the gradle(task: 'assemble', build_type: 'internal') command.
I've tried ./gradlew assembleInternal and it works fine. Also I have included
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
As I unterstand databinding is not compatible from Java JDK 9, but since I'm using 1.8 it should work well. My guess is for some reason fastlane is not using my gradle wrapper from the project directory 🤔
Deleting the other jdk versions from Library/Java/JavaVirtualMachines solved the problem for me