Execution failed for task ':ofbiz --load-data' while running OfBiz - gradle

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':ofbiz --load-data'.
Process 'command 'C:\Program Files\Java\jdk-17.0.2\bin\java.exe'' finished with non-zero exit value 1
Try:
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':ofbiz --load-data'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:147)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
when i am trying build using gradle facing issue, any help appreciated.
`

Your issue is not clear. In windows devices try gradlew cleanAll loadAll ofbiz command to load data and run ofbiz. If your issue is due to java version, try Java 1.8 version.
Visit below link of OFBiz development guide for more help
https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide

Related

How can I configuration spring-boot-configuration-processor when I would like to change from KAPT to KSP? I get every time error

Basic problem, kapt is in maintenance mode. So I would like to change to ksp. In theory, it's the equivalent of faster like kapt. The changing option is not clear.
I did:
This was
plugin {
...
kotlin("kapt") version "1.7.20"
...
replaced by
plugin {
...
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
...
}
and there were
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
kapt("org.springframework.boot:spring-boot-configuration-processor")
replaced by
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
ksp("org.springframework.boot:spring-boot-configuration-processor")
So, when I build project I got below error:
> Task :kspKotlin FAILED
e: [ksp] No providers found in processor classpath.
e: Error occurred in KSP, check log for detail
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':kspKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* 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 829ms
1 actionable task: 1 executed
I've been mining the internet for almost two days, but I still haven't found a solution to this problem. If anyone knows, I will be very happy! :)
KSP is not a direct replacement to kapt. Changing one name to another won't do the trick.
spring-boot-configuration-processor wasn't built to work with KSP, so this line
ksp("org.springframework.boot:spring-boot-configuration-processor")
won't do anything.

"Could not find method platform()" after Firestore upgrade for Flutter project

I just upgraded to Firestore 0.14.4 from 0.13.* for my VSCode/Flutter project and am now getting the build errors below.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\projects\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.14.4\android\build.gradle' line: 54
* What went wrong:
A problem occurred evaluating project ':cloud_firestore'.
> Could not find method platform() for arguments [com.google.firebase:firebase-bom:25.12.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* 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 2s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
My build.gradle file has the line classpath 'com.android.tools.build:gradle:3.3.2 which makes me think my gradle needs upgrading? So, I did the usual Google search but it didn't seem straightforward to upgrade gradle (though I'm sure I missed something). Does it sound like I need to upgrade and, if so, how do I do that?

'.' is not recognized as an internal or external command when running ./gradlew

Whenever I run ./gradlew buildForProd, it gives me this error. I'm using windows.
'.' is not recognized as an internal or external command,
operable program or batch file.
EDIT:
Thanks Mofi for the resources.
After running .\gradlew, this is what I got.
Starting a Gradle Daemon, 19 busy Daemons could not be reused, use --status for details
:buildForProd FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':buildForProd'.
> A problem occurred starting process 'command './gradlew''
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 12s
1 actionable task: 1 executed

how can i fix this issue

when i run flutter run in my project, the compile failed. i got this code in verbose mode
ADMIN#ZIRCON-KH101 MINGW64 ~/Documents/android project/new/flutternewsapp-10/codecanyon-26536344-classic-flutter-news-app-best-for-news-blog-and-magazines/01. Flutter/classic_flutter_news
$ flutter run
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Target debug_android_application failed: FileSystemException: Creation failed, path = 'C:\Users\ADMIN\Documents\android project\new\flutternewsapp-10\codecanyon-26536344-classic-flutter-news-app-best-for-news-blog-and-magazines\01. Flutter\classic_flutter_news\build\app\intermediates\flutter\debug\flutter_assets\packages/cupertino_icons' (OS Error: The filename or extension is too long.
, errno = 206)
build failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 882
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' 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 21s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 23.9s
Exception: Gradle task assembleDebug failed with exit code 1
how can i fix this issues cause i already run flutter packages get, flutter clean inside my project and pass my release to stable channel
Your File path is too long.
C:\Users\ADMIN\Documents\android project\new\flutternewsapp-10\codecanyon-26536344-classic-flutter-news-app-best-for-news-blog-and-magazines\01. Flutter\classic_flutter_news\build\app\intermediates\flutter\debug\flutter_assets\packages/cupertino_icons
this exceeds some limitations in compilers and some programs.
so simply move your project folder to something simple like C:\Projest\
also change the name of this folder to something shorter
codecanyon-26536344-classic-flutter-news-app-best-for-news-blog-and-magazines

ERROR: Unable to find the resource: /META-INF/BenchmarkList when running JMH with gradle

I want to benchmark my application using JMH.
I am using JMH with gradle as build tool.
The github repository is here.
But whenever I run the application com.demo.aerospike.JMHAerospikeSpringData I get below error.
$ gradle run
> Configure project :
Task :jmh Last added: null
> Task :run
JMHAerospikeSpringData is running ...
Exception in thread "main" java.lang.RuntimeException: ERROR: Unable to find the resource: /META-INF/BenchmarkList
at org.openjdk.jmh.runner.AbstractResourceReader.getReaders(AbstractResourceReader.java:98)
at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:122)
at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:256)
at org.openjdk.jmh.runner.Runner.run(Runner.java:206)
at com.demo.aerospike.JMHAerospikeSpringData.main(JMHAerospikeSpringData.java:47)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> Process 'command
'/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/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.
I tried different solutions in other stackoverflow but couldn't help.
Any idea what I'm missing.
I have resolved this problem by adding this dependency to my project:
testAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$jmhVersion"
next to
testImplementation "org.openjdk.jmh:jmh-core:$jmhVersion"
implementation 'org.openjdk.jmh:jmh-core:1.33'
annotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.33'
just like lombok
Try running without gradle daemon:
gradle --stop
gradle --no-daemon jmh
Not sure how is your project setup like because I can't find com.demo.aerospike.JMHAerospikeSpringData in your repo. Maybe you want to check this project out to get some ideas to try.
https://github.com/eugenp/tutorials/blob/master/core-java-modules/core-java-collections-maps-3/src/main/java/com/baeldung/map/concurrenthashmap/MapPerformanceComparison.java

Resources