"bootRun" task in Gradle - FAILURE: Build failed with an exeption - java

I am follwoing this tutorial
https://auth0.com/blog/integrating-spring-data-jpa-postgresql-liquibase/
at the moment.
But I have some problems with Gradle... Everytime when I try to run the project with "./gradlew bootRun" it returns an error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command 'C:\Program Files\Java\jdk-10.0.2\bin\java.exe'' finished wit
h non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 44s
4 actionable tasks: 2 executed, 2 up-to-date
I'm running Java 10.0.2 and Gradle 4.10.1.
I appreciate any kind of help!

Related

React Native android release error A problem occurred evaluating project ':app'. > Could not find method splits() for arguments error

i have a problem when receiving application release
yarn android --variant release i'm running this command and gives me the following error;
yarn android --variant release
yarn run v1.22.19
$ react-native run-android --variant release
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
5 actionable tasks: 5 up-to-date
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\user_0\Desktop\AwesomeProject\android\app\build.gradle' line: 216
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find method splits() for arguments [build_9cj0nm0uy7u5p9mmnrxyr8ysi$_run_closure6#3c34a482] on project ':app' of type org.gradle.api.Project.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BU�LD FAILED in 3s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installRelease -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\user_0\Desktop\AwesomeProject\android\app\build.gradle' line: 216
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find method splits() for arguments [build_9cj0nm0uy7u5p9mmnrxyr8ysi$_run_closure6#3c34a482] on project ':app' of type org.gradle.api.Project.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BU�LD FAILED in 3s
at makeError (C:\Users\user_0\Desktop\AwesomeProject\node_modules\execa\index.js:174:9)
at C:\Users\user_0\Desktop\AwesomeProject\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\user_0\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\user_0\Desktop\AwesomeProject\node_modules\#react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
https://reactnative.dev/docs/signed-apk-android i followed these steps exactly. i tried again 3-4 times but nothing changes. how can i fix this ?

com.android.builder.testing.api.DeviceException: No online devices found

* Get more help at https://help.gradle.org
BUILD FAILED in 4m 55s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No online devices found.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4m 55s
at makeError (C:\Users\cjfra\Documents\GESTAOTECC\DevProjetos\videoapp\node_modules\execa\index.js:174:9)
at C:\Users\cjfra\Documents\GESTAOTECC\DevProjetos\videoapp\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\cjfra\Documents\GESTAOTECC\DevProjetos\videoapp\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\cjfra\Documents\GESTAOTECC\DevProjetos\videoapp\node_modules\#react-native-community\cli\build\index.js:142:9)
I make update in environment but only no running the emulator.
I need only excecute the emulator for project reeact native

IntelliJ running a program with Gradle, "failed at task :Run" error

Here is the error that I am getting whenever I try to run my program with Gradle. (I am on a linux ubuntu system, if that matters) I am using a JDK 11 version to run this.
Execution failed for task ':run'.
> Process 'command '/home/dex/Downloads/jdk-11.0.13/bin/java'' finished with non-zero exit value 1
Exception -
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':run'
Caused by: org.gradle.process.internal.ExecException: Process 'command '/home/dex/Downloads/jdk-11.0.13/bin/java'' finished with non-zero exit value 1
UPDATED (./gradlew run command)
> Configure project :
Project : => no module-info.java found
> Task :compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :run FAILED
Redirected Output: logs/master_log_3_9_2022_10_38_38.txt
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
5 actionable tasks: 3 executed, 2 up-to-date
From --debug(Only posted info that was in red)
2022-03-09T13:01:57.117-0500 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 4s
2022-03-09T13:01:57.116-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2022-03-09T13:01:56.807-0500 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :run FAILED
2022-03-09T13:01:57.116-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1
From log master file
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at Main.main(Main.java:210)
at KioskApp.main(KioskApp.java:5)

Flutter FireBase Storage setup .......... can't even build empty project

I have watched every YouTube video and I can't get right
I followed the firebase docs step by step
still it gives me this
error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':firebase_storage:javaPreCompileRelease'.
> Could not resolve all files for configuration ':firebase_storage:releaseCompileClasspath'.
> Could not find firebase-common.jar (com.google.firebase:firebase-common:17.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-common/17.0.0/firebase-common-17.0.0.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 45s
Running Gradle task 'assembleRelease'... 46.4s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1
Please help.
I lowered the version of Flutter storage package to 3.0.0 and it works fine.

Sonarqube src/test execution on version 7.6 with gradle

I am trying to analyze all of the java files located inside the src/test directory, but I can't get this working.
I have tried the options below
C:\Users\Test\SonarQube>gradle clean sonarqube -Dsonar.sources=src
Task :sonarqube FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':sonarqube'.
File src/test/java/LibraryTest.java can't be indexed twice. Please check that
nclusion/exclusion patterns produce disjoint sets for main and test files
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
ption to get more log output. Run with --scan to get full insights.
2)
I have also tried with -Dsonar.sources=src/test -Dsonar.inclusions= src/**/*.java
C:\Users\Test\SonarQube>gradle clean sonarqube -Dsonar.sources=src
/test -Dsonar.inclusions= src/**/*.java
Picked up JAVA_TOOL_OPTIONS: -Djdk.http.auth.tunneling.disabledSchemes=""
FAILURE: Build failed with an exception.
What went wrong:
Task 'src/**/*.java' not found in root project 'SonarQube'.
Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option
to get the stack trace. Run with --info or --debug option to get more log output
. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
3)
C:\Users\Test\SonarQube>gradle clean sonarqube -Dsonar.sources=src
/test -Dsonar.inclusions=src/test/*.java
Picked up JAVA_TOOL_OPTIONS: -Djdk.http.auth.tunneling.disabledSchemes=""
Task :test
Picked up JAVA_TOOL_OPTIONS: -Djdk.http.auth.tunneling.disabledSchemes=""
Task :sonarqube
Failed to set working directory hidden: C:\Users\Test\SonarQube\build\sonar
SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM
of your project, or disable the SCM Sensor in the project settings.
BUILD SUCCESSFUL in 10s
5 actionable tasks: 5 executed
But still, I can't see changes on sonarqube server

Categories

Resources