question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build AMP file fails with SDK 4.0 and OpenJDK 11

See original GitHub issue
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request

When trying to build an APM in Alfresco SDK 4.0 AIO project using OpenJDK 11 build fails with an error: “An API incompatibility was encountered while executing org.apache.maven.plugins:maven-assembly-plugin:2.6:single: java.lang.ExceptionInInitializerError: null”.

In the same time if I switch to Java 8 build succeeds.

See details in attached log file. build.log

Expected Behavior

Build should succeed, AMP file generated.

Current Behavior

Build fails with an error: “An API incompatibility was encountered while executing org.apache.maven.plugins:maven-assembly-plugin:2.6:single: java.lang.ExceptionInInitializerError: null”.

Possible Solution

Steps to Reproduce (for bugs)

  1. Generate AIO project using Alfresco SDK 4.0;
  2. Uncomment section with maven-assembly-plugin section responsible for AMP generation in root POM of the project;
  3. execute “mvn clean package”
  4. See results.

Context

Writing extensions using third party libs, also have a need to override static resources (i.e. favicon.ico). Recommendations from SDK manual says that in that case I have to use APM packaging and not JAR.

Your Environment

  • Alfresco SDK version used: 4.0
  • Alfresco version used: 6.1 Community
  • Output of command ‘mvn -version’: Apache Maven 3.5.4
  • Output of command ‘java -version’: openjdk version “11” 2018-09-25 OpenJDK Runtime Environment 18.9 (build 11+28) OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

Additional information

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
crimsonman2commented, Dec 3, 2019

Eventually assembly succeeded, but only when I’ve removed <version> tag for maven-assembly-plugin in AIO parent POM.

0reactions
luca86rcommented, Jan 15, 2021

Upgrading jdk from

$ java -version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

to

$ java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)

solve the problem for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Alfresco SDK 4.0 build AMP fails on Java 11
Hi folks, I'm facing a problem when trying to build an AMP in SDK 4.0. I've created AIO project from archetype, followed instructions...
Read more >
Question - Error during "Build Gradle Project" - Unity Forum
An exception has occurred in the compiler (1.8.0-adoptopenjdk). Please file a bug against the Java compiler via the Java bug ...
Read more >
Consolidated JDK 11 Release Notes - Java - Oracle
This page contains all of the release notes for General Availability (GA) releases and Bundled Patch Release (BPR) builds of JDK 11.
Read more >
OpenJDK Build README
This README file contains build instructions for the OpenJDK. Building the source code for the OpenJDK requires a certain degree of technical expertise....
Read more >
Java SDK 11.0 or above is required when using .NET 6 or ...
Installing Microsoft's OpenJDK 11 did the job for me. You may notice that Visual Studio installs a version of Microsoft OpenJDK, however, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found