Error when building abs-webapp


#1

Hi

I’m getting a compilation error message when I tried to build the abs-webApp . I followed all the instructions reported in the readme file . It went correctelly after that I added all the modules in the settings file. I 'm getting the error message when I run gradlew build or gradlew war . Hereafter the error message. Thank you for your help.

C:\data\gitviews\abs-webapp>gradlew war
:generateCode
:licenseFormatGenerated
:modules:axelor-account:generateCode
:modules:axelor-account:licenseFormatGenerated
:modules:axelor-base:generateCode
:modules:axelor-base:licenseFormatGenerated
:modules:axelor-exception:generateCode
:modules:axelor-exception:licenseFormatGenerated UP-TO-DATE
:modules:axelor-exception:compileJava UP-TO-DATE
:modules:axelor-exception:processResources UP-TO-DATE
:modules:axelor-exception:classes UP-TO-DATE
:modules:axelor-exception:jar UP-TO-DATE
:modules:axelor-message:generateCode
:modules:axelor-message:licenseFormatGenerated UP-TO-DATE
:modules:axelor-tool:generateCode UP-TO-DATE
:modules:axelor-tool:licenseFormatGenerated UP-TO-DATE
:modules:axelor-tool:compileJava UP-TO-DATE
:modules:axelor-tool:processResources UP-TO-DATE
:modules:axelor-tool:classes UP-TO-DATE
:modules:axelor-tool:jar UP-TO-DATE
:modules:axelor-message:compileJava UP-TO-DATE
:modules:axelor-message:processResources UP-TO-DATE
:modules:axelor-message:classes UP-TO-DATE
:modules:axelor-message:jar UP-TO-DATE
:modules:axelor-base:compileJava UP-TO-DATE
:modules:axelor-base:processResources UP-TO-DATE
:modules:axelor-base:classes UP-TO-DATE
:modules:axelor-base:jar UP-TO-DATE
:modules:axelor-account:compileJava UP-TO-DATE
:modules:axelor-account:processResources UP-TO-DATE
:modules:axelor-account:classes UP-TO-DATE
:modules:axelor-account:jar UP-TO-DATE
:modules:axelor-admin:generateCode
:modules:axelor-admin:licenseFormatGenerated UP-TO-DATE
:modules:axelor-admin:compileJava
C:\data\gitviews\abs-webapp\modules\axelor-process-studio\axelor-admin\src\main
java\com\axelor\auth\service\PermissionAssistantService.java:32: error: cannot f
ind symbol
import java.util.Optional;
^
symbol: class Optional
location: package java.util
1 error
:modules:axelor-admin:compileJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:modules:axelor-admin:compileJava’.

Compilation failed; see the compiler error output for details.

  • 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: 48.739 secs

C:\data\gitviews\abs-webapp>


#2

Hi ,

It seems that the files needed to compile axelor-admin are out dated see below . I’m using Jdk 1.8 and I have already tested with JDK 1.7 I got the same error. Which files are out dated ?.How I can fix it?. Could you please advise.

Thank you.

:modules:axelor-admin:licenseFormatGenerated UP-TO-DATE
:modules:axelor-admin:licenseFormatGenerated (Thread[main,5,main]) completed. To
ok 0.259 secs.
:modules:axelor-admin:compileJava (Thread[main,5,main]) started.
:modules:axelor-admin:compileJava
Cached resource Wed Jul 30 18:34:03 CEST 2008 is up-to-date (lastModified: http:
//repository.axelor.com/nexus/content/groups/public/org/milyn/flute/1.3/flute-1.
3.pom).
Executing task ‘:modules:axelor-admin:compileJava’ (up-to-date check took 1.347
secs) due to:
No history is available.
All input files are considered out-of-date for incremental task ‘:modules:axelor
-admin:compileJava’.
Compiling with JDK Java compiler API.
C:\data\gitviews\abs-webapp\modules\axelor-process-studio\axelor-admin\src\main
java\com\axelor\auth\service\PermissionAssistantService.java:32: error: cannot f
ind symbol
import java.util.Optional;
^
symbol: class Optional
location: package java.util
1 error
:modules:axelor-admin:compileJava FAILED
:modules:axelor-admin:compileJava (Thread[main,5,main]) completed. Took 9.654 se
cs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:modules:axelor-admin:compileJava’.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to
    get more log output.

BUILD FAILED

Total time: 1 mins 59.89 secs
Stopped 0 compiler daemon(s).

C:\data\gitviews\abs-webapp>


#3

Hi
Optional is a jdk 8 class. You seem to be using a jdk 7


#4

Got it. Thank you