adorsys / xs2a

Open Source NextGenPSD2 XS2A Implementation from adorsys.
https://adorsys.com/en/products/
GNU Affero General Public License v3.0
132 stars 62 forks source link

docker-compose up and maven package problems #21

Closed etnann closed 5 years ago

etnann commented 5 years ago

Hi, I want to use docker-compose to set up the whole system. I read from #19 that I have to run mvn package first. I'm having some problem executing this command.

I'm using Java JDK 11 and Ubuntu 18.04. First, I got this error:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project xs2a-server-api: Fatal error compiling

Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project xs2a-server-api: Fatal error compiling

I read of this problem here and the solution was specifying the lombok version <version>1.16.22</version> in xs2a-core.

Now I'm facing this error:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project aspsp-profile-lib: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?

and I'm not finding any solution. Do you have any suggestions? Is the command mvn package really necessary to run docker-compose?

Thank you for your help.

DG0lden commented 5 years ago

Hi etnann,

thank you for pointing out the problem. The issue with lombok version mismatch was fixed. Now core module uses that same version of lombok 1.16.20. We're thinking about moving for next major lombok release version 1.18.x in the next sprints.

To your question: first of all, you can use our release images from docker hub instead of building them. To do so, just call

docker-compose pull

before

docker-compose up

Your issue with crashing JVM is not reproducible on my machine (JVMs 8 and 11) unfortunately. Could you please start maven with recording the debug output by invoking

mvn clean
mvn -U -X -e -fae package > output.log

and provide log file to us?

Also since the build crashes by execution of tests, you may skip the tests by

mvn -DskipTests=true package

to get your artefacts ready.

I hope this helps.

etnann commented 5 years ago

Hi DG0lden,

Thank you for your reply. I will try the docker images as soon as possible.

In the meantime, here is the log file generated with the command mvn -U -X -e -fae package > output.log output.log

I've also run the command mvn -U -X -e -fae -DskipTests=true package and I got the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project consent-core-api: Compilation failure
[ERROR] /home/emavgl/FBK/xs2a/consent-management/consent-core-api/src/main/java/de/adorsys/psd2/consent/api/ais/CmsAccountReference.java:[28,1] constructor CmsAccountReference() is already defined in class de.adorsys.psd2.consent.api.ais.CmsAccountReference
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :consent-core-api

Also in this case, here is the log file output_skip_tests.log

Thank you.

DG0lden commented 5 years ago

Hi etnann,

in both cases, an error occurs due to lombok problems with java 11. I've prepared a fix in branch dgo_add_java11_compile_support. We're going to merge it to develop as soon as we done our internal tests on it. You could check the compilation there if you want. Any feedback is much appreciated!

DG0lden commented 5 years ago

Ok, now changes were merged to develop branch. Will be part of next release 1.13. Please let us know if problem with build solved

etnann commented 5 years ago

I did git pull and I repeated again the command: mvn -U -X -e -fae -DskipTests=true package. Everything works fine now. However, I still got an error if I run mvn package including the tests. Here are the logs output-with-tests.log. Again, thank you.

DG0lden commented 5 years ago

Could you please try to apply following patch and run it again?

Index: pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pom.xml (date 1542961475000)
+++ pom.xml (date 1542984409000)
@@ -169,6 +169,13 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <useSystemClassLoader>false</useSystemClassLoader>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-pmd-plugin</artifactId>
                 <version>${pmd.plugin.version}</version>
etnann commented 5 years ago

Yes, with the following patch it works!

DG0lden commented 5 years ago

Ok, it is merged into develop now. Should work.