Failed to execute | dspace-api: Compilation failure (DSpace 8)

61 views
Skip to first unread message

Bhavesh Patel

unread,
Sep 6, 2024, 7:24:11 AM9/6/24
to dspac...@googlegroups.com
Dear All,

I am getting the following error while executing the "maven package" command 

Following is the version I have installed:
---------------------------------------------
Apache Maven: 3.8.7
Java (OpenJDK): 21.0.4
OS: Ubuntu 24.04.1 LTS


Error: (full are attached in txt file)
---------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project dspace-api: Compilation failure
[ERROR] /build/DSpace-dspace-8.0/dspace-api/src/main/java/org/dspace/app/bulkedit/MetadataImport.java:[988,43] error: An unhandled exception was thrown by the Error Prone static analysis plugin.
[ERROR]      Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]
[ERROR]      error-prone version: 2.10.0
[ERROR]      BugPattern: ReferenceEquality
[ERROR]      Stack Trace:
[ERROR]      com.google.common.util.concurrent.ExecutionError: java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree$JCExpression com.sun.tools.javac.tree.TreeMaker.Select(com.sun.tools.javac.tree.JCTree$JCExpression, com.sun.tools.javac.code.Symbol)'
[ERROR]         at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
[ERROR]         at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
[ERROR]         at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
[ERROR]         at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935)
--------------------------

Please do the needful.

Regards
Bhavesh Patel


DSPACE_Build_Error_Message.txt

DSpace Technical Support

unread,
Sep 9, 2024, 1:07:17 PM9/9/24
to DSpace Technical Support
Hi Bhavesh,

It appears you are using Java 21, but DSpace 8 says that it only supports Java 17 at this time.  See the Installation docs: https://wiki.lyrasis.org/display/DSDOC8x/Installing+DSpace#InstallingDSpace-JavaJDK17(OpenJDKorOracleJDK)

Tim

Michael Plate

unread,
Sep 10, 2024, 3:42:00 AM9/10/24
to DSpace Technical Support
Hi Tim,

Am 09.09.24 um 19:07 schrieb DSpace Technical Support:
> Hi Bhavesh,
>
> It appears you are using Java 21, but DSpace 8 says that it only
> supports Java 17 at this time.  See the Installation docs:
[…]

there is minor problem with that in the docs:

https://wiki.lyrasis.org/display/DSDOC8x/Release+Notes#ReleaseNotes-BreakingChanges

says

[…]
"Java 17 (or later)"

and

https://wiki.lyrasis.org/display/DSDOC8x/Installing+DSpace#InstallingDSpace-JavaJDK17(OpenJDKorOracleJDK)

says

[…]
"You MUST be running JDK v17+"

I tried Debian 12 with Java 21 and had problems with the config vars
(variables from dspace.cfg etc. in CamelCase).

CU

Michael

bhave...@gmail.com

unread,
Sep 11, 2024, 2:12:27 AM9/11/24
to DSpace Technical Support
Thank you Tim,

Currently, DSpace 8 was successfully installed with Java 21.

I noticed the following issue: 
"mvn package" command is not working from this location: /source/DSpace-dspace-8.0 but it's working from this location: /source/DSpace-dspace-8.0/dspace/

By running mvn package from /source/DSpace-dspace-8.0/dspace/   and magic happened, it's worked for me.

Regards
Bhavesh
DSPACE_8_Homepage.JPG
Reply all
Reply to author
Forward
0 new messages