Failed when build spring3 framework with gradle - java

I tried to build spring 3 framework using gradle, in ubuntu 12.04. but there was an error when build aspects progress.
the error is as follow:
spring-aspects:compileJava
Download http://repo.springsource.org/libs-release/org/aspectj/aspectjtools/1.6.12/aspectjtools-1.6.12.jar
[ant:iajc] <Unknown> [warning] Found #DeclareAnnotation while current release does not support it (see 'org.aspectj.weaver.bcel.AtAjAttributes')
[ant:iajc]
:spring-aspects:classes
:spring-aspects:jar
:spring-expression:javadoc
/home/hendri/spring-framework/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java:28: error: unmappable character for encoding UTF8
* <p>If any of the operands is of a reference type, unboxing conversion (�5.1.8) is performed. Then:<br>
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-expression:javadoc'.
> Javadoc generation failed.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 24 mins 10.5 secs
can somebody help me to pass this error and build the spring 3 framework??
thanks..

Try update the Spring code. If that not works take a look at what encoding are you compiling against.

Related

FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\dell\AndroidStudioProjects\attendance_manager\android\build.gradle' line: 26

FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\dell\AndroidStudioProjects\attendance_manager\android\build.gradle' line: 26 * What went wrong: A problem occurred evaluating root project 'android'. > A problem occurred configuring project ':app'. > Could not open proj generic class cache for build file 'C:\Users\dell\AndroidStudioProjects\attendance_manager\android\app\build.gradle' (C:\Users\dell.gradle\caches\7.4\scripts\6kf7hlj2razsy2gytva6h994n). > BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63 * 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.
I tried to remove invalidate caches , after that i restart my computer , after that i unistall my flutter app in my device but, nothig happen.
Check your java version , if your Java version is 18,19 or 20 delete your latest version and try to use Java-8 or Java-11.
-> I tried Java version 11 , My error was solve

GitHub Actions Could not download xml-apis.jar (xml-apis:xml-apis:1.4.01) during build

Could you please help me with my problem.
I have a GitHub Actions workflow and at the end of the build I get an error:
Task :api:compileJava
Task :api:compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Could not resolve all files for configuration ':api:compileClasspath'.
Could not download xml-apis.jar (xml-apis:xml-apis:1.4.01)
Could not get resource 'https://repo.maven.apache.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar'.
Could not GET 'https://repo.maven.apache.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar'.
Read timed out
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.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 20m 11s
28 actionable tasks: 25 executed, 3 up-to-date
Error: Process completed with exit code 1.
In other CI like Appveyor and VMs with different Ubuntu versions, I don’t get this error. I have no idea why this is happening.
./gradlew distTar -PbuildNumber=${APPVEYOR_BUILD_NUMBER}.${APPVEYOR_REPO_COMMIT}
-Pprofile=release
-x test
-Pfast
--no-daemon
Please help.
This is my repo https://github.com/madmongoose/cloud-pipeline-fork

Can not create gradle project with IntelliJ on Windows

When I attempt to make a Gradle java project with IntelliJ I get this error:
FAILURE: Build failed with an exception.
* Where:
Initialization script 'C:\Users\ARCHIE~1\AppData\Local\Temp\wrapper_init2.gradle' line: 6
* What went wrong:
Could not compile initialization script 'C:\Users\ARCHIE~1\AppData\Local\Temp\wrapper_init2.gradle'.
> startup failed:
initialization script 'C:\Users\ARCHIE~1\AppData\Local\Temp\wrapper_init2.gradle': 6: unexpected char: '\' # line 6, column 61.
le('C:\\Users\\Archie O'Connor\\AppData\
^
1 error
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.groovy.scripts.ScriptCompilationException: Could not compile initialization script 'C:\Users\ARCHIE~1\AppData\Local\Temp\wrapper_init2.gradle'.
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
initialization script 'C:\Users\ARCHIE~1\AppData\Local\Temp\wrapper_init2.gradle': 6: unexpected char: '\' # line 6, column 61.
le('C:\\Users\\Archie O'Connor\\AppData\
^
1 error
This still happens when I change the project directory, even outside my user folder. Gradle projects only work if I generate it with IntelliJ in macos and reimport it in windows.

adding spring-cloud-starter-dataflow-server-local leads to the error: Command line is too long. Shorten command line for ... or also for Spring Boot

I am writing simple application to be familiar with spring batch. I wanted to learn spring batch admin I found that it is deprecated so I have to use spring cloud data flow instead.
I've tutorial about spring cloud data and did first steps:
Added dependency:
compile("org.springframework.cloud:spring-cloud-starter-dataflow-server-local:1.7.4.RELEASE")
And marked my spring boot application class with additioanl annotaion:
#EnableDataFlowServer
Now I am trying to run it using idea but it prints:
19:14 Error running 'MyApplication': Command line is too long. Shorten command line for MyApplication or also for Spring Boot default configuration.
For that moment I thought that it is IDEA bug and tried to use gradle (via idea plugin) to run application using boot run but it is started too:
19:15:21: Executing task 'bootRun'...
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:compileJava
:processResources UP-TO-DATE
:classes
:bootRun FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.8.0_111\bin\java.exe''
* 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 4s
3 actionable tasks: 2 executed, 1 up-to-date
CreateProcess error=206, The filename or extension is too long
19:15:26: Task execution finished 'bootRun'.
How can I fix that ?
P.S.
My repo is https://github.com/gredwhite/spring-batch-hello-world
Use one of the options to shorten the command line:

Learning Gradle but getting the following error on workstation

I am learning gradle and I am having issues..
I am using https://github.com/spring-guides/gs-gradle.git as my learning project and I goto
cd in gs-gradle/complete
then I run gradle run and I am getting the following error:
$ gradle build
:compileJava
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve joda-time:joda-time:2.2.
Required by:
:complete:unspecified
> Could not GET 'https://repo1.maven.org/maven2/joda-time/joda-time/2.2/joda-
time-2.2.pom'.
> peer not authenticated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 6.452 secs
Use the latest version of joda-time. The current version is 2.10.5.
In build.gradle change the dependency to point to compile "joda-time:joda-time:2.10.5"

Categories

Resources