Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues while building the project #49

Open
odidev opened this issue Apr 25, 2023 · 8 comments
Open

Issues while building the project #49

odidev opened this issue Apr 25, 2023 · 8 comments

Comments

@odidev
Copy link

odidev commented Apr 25, 2023

Hi Team,

I am following the documents here: < https://github.com/idugalic/micro-company#running-instructions > to build the project on Ubuntu AWS instance.

After installing JDK 17, I executed mvn clean install, and the project failed to resolve the below maven plugin:

[INFO] microservices-company-parent 0.0.1-SNAPSHOT ........ SUCCESS [  0.748 s] 
[INFO] common 0.0.1-SNAPSHOT .............................. SUCCESS [  1.225 s] 
[INFO] common-blog 0.0.1-SNAPSHOT ......................... SUCCESS [  0.166 s] 
[INFO] command-side-blog 0.0.1-SNAPSHOT ................... SUCCESS [  0.559 s] 
[INFO] query-side-blog 0.0.1-SNAPSHOT ..................... SUCCESS [  0.255 s] 
[INFO] command-side-blog-service 0.0.1-SNAPSHOT ........... SUCCESS [  1.191 s] 
[INFO] query-side-blog-service 0.0.1-SNAPSHOT ............. SUCCESS [  0.807 s] 
[INFO] common-project 0.0.1-SNAPSHOT ...................... SUCCESS [  0.068 s] 
[INFO] command-side-project 0.0.1-SNAPSHOT ................ SUCCESS [  0.228 s] 
[INFO] query-side-project 0.0.1-SNAPSHOT .................. SUCCESS [  0.126 s] 
[INFO] command-side-project-service 0.0.1-SNAPSHOT ........ SUCCESS [  0.668 s] 
[INFO] query-side-project-service 0.0.1-SNAPSHOT .......... SUCCESS [  0.626 s] 
[INFO] Authorization server 0.0.1-SNAPSHOT ................ FAILURE [  1.412 s] 
[INFO] Registry 0.0.1-SNAPSHOT ............................ SKIPPED 
[INFO] Configuration Server 0.0.1-SNAPSHOT ................ SKIPPED 
[INFO] Circuit breaker 0.0.1-SNAPSHOT ..................... SKIPPED 
[INFO] Api Gateway 0.0.1-SNAPSHOT ......................... SKIPPED 
[INFO] Admin Server 1.3.3.RELEASE ......................... SKIPPED 
[INFO] Monolithic 0.0.1-SNAPSHOT .......................... SKIPPED 
[INFO] documentation 0.0.1-SNAPSHOT ....................... SKIPPED 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time:  8.451 s 
[INFO] Finished at: 2023-04-24T11:23:48Z 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal ro.isdc.wro4j:wro4j-maven-plugin:1.7.6:run (default) on project authserver: Execution default of goal ro.isdc.wro4j:wro4j-maven-plugin:1.7.6:run failed: An API incompatibility was encountered while executing ro.isdc.wro4j:wro4j-maven-plugin:1.7.6:run: java.lang.ExceptionInInitializerError: null 

Same results are found even with JDK 11 and 8.
I tried updating “ro.isdc.wro4j:wro4j-maven-plugin” from 1.7.6 to 1.10.1, but that didn’t help.

Can you please provide me with some pointers on this? Kindly let me know if you need any further information.

@odidev
Copy link
Author

odidev commented Apr 28, 2023

The issue with the Authorization server shared above has been resolved by adding “mockito-core” dependency to “Wro4j-maven-plugin” in the authserver/pom.xml, as below:

<dependency> 
    <groupId>org.mockito</groupId> 
    <artifactId>mockito-core</artifactId> 
    <version>2.18.0</version> 
</dependency> 

Build progressed and finally failed at Monolithic:

[INFO] ------------------------------------------------------------------------ 
[INFO] Reactor Summary: 
[INFO] 
[INFO] microservices-company-parent 0.0.1-SNAPSHOT ........ SUCCESS [  0.955 s] 
[INFO] common 0.0.1-SNAPSHOT .............................. SUCCESS [  1.697 s] 
[INFO] common-blog 0.0.1-SNAPSHOT ......................... SUCCESS [  0.312 s] 
[INFO] command-side-blog 0.0.1-SNAPSHOT ................... SUCCESS [  0.839 s] 
[INFO] query-side-blog 0.0.1-SNAPSHOT ..................... SUCCESS [  0.496 s] 
[INFO] command-side-blog-service 0.0.1-SNAPSHOT ........... SUCCESS [  1.889 s] 
[INFO] query-side-blog-service 0.0.1-SNAPSHOT ............. SUCCESS [  1.173 s] 
[INFO] common-project 0.0.1-SNAPSHOT ...................... SUCCESS [  0.133 s] 
[INFO] command-side-project 0.0.1-SNAPSHOT ................ SUCCESS [  0.442 s] 
[INFO] query-side-project 0.0.1-SNAPSHOT .................. SUCCESS [  0.308 s] 
[INFO] command-side-project-service 0.0.1-SNAPSHOT ........ SUCCESS [  0.893 s] 
[INFO] query-side-project-service 0.0.1-SNAPSHOT .......... SUCCESS [  0.765 s] 
[INFO] Authorization server 0.0.1-SNAPSHOT ................ SUCCESS [  7.038 s] 
[INFO] Registry 0.0.1-SNAPSHOT ............................ SUCCESS [  0.573 s] 
[INFO] Configuration Server 0.0.1-SNAPSHOT ................ SUCCESS [  0.408 s] 
[INFO] Circuit breaker 0.0.1-SNAPSHOT ..................... SUCCESS [  0.407 s] 
[INFO] Api Gateway 0.0.1-SNAPSHOT ......................... SUCCESS [  0.880 s] 
[INFO] Admin Server 1.3.3.RELEASE ......................... SUCCESS [  1.060 s] 
[INFO] Monolithic 0.0.1-SNAPSHOT .......................... FAILURE [  5.675 s] 
[INFO] documentation 0.0.1-SNAPSHOT ....................... SKIPPED 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time:  26.663 s 
[INFO] Finished at: 2023-04-27T04:40:55Z 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project monolithic: There are test failures. 
[ERROR] 
[ERROR] Please refer to /home/ubuntu/odidev/micro-company/monolithic/target/surefire-reports for the individual test results. 

I tried setting JAVA_HOME with JDK 8, 11, but nothing helped.
I also updated the java-maven-plugin from 1.8 to 3.11.0 but that doesn’t help as well.

Can you please provide some pointers on this?

@odidev
Copy link
Author

odidev commented May 3, 2023

@idugalic
Can you please provide pointers on the above issues?

@idugalic
Copy link
Owner

idugalic commented May 3, 2023

Hi @odidev thanks for opening the issue. TBH, I have not run or updated this demo project for a long time.
I will try to reproduce the issue locally and hopefully provide a fix (linking it to this issue) soon.

idugalic added a commit that referenced this issue May 3, 2023
- only the minimum of library upgrades are done
- the projects deserves overall upgrade on all dependencies
@idugalic
Copy link
Owner

idugalic commented May 3, 2023

@odidev the latest commit seems to fix the issue with the build.
The Github action is using Java 11, for your information.

Please notice that fix involved only necessary changes for the build to be successful. So, the majority of libraries/dependencies are outdated, and a major upgrade of all dependencies is preferred.

If you are using this project in production, consider updating your dependencies to eliminate potential CVE/vulnerabilities.

Let me know if you are fine with this, so we can close the issue?

@odidev
Copy link
Author

odidev commented May 4, 2023

@idugalic Thank you for the PR.

I am now able to build the project on both Linux AMD64 and ARM64 platforms.

Next, I ran the application using mvn spring-boot:run. Application ran successfully on the Linux/AMD64 AWS instance, but failing on the Linux/ARM64 instance with the below logs:

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time:  1.294 s 
[INFO] Finished at: 2023-05-04T05:45:51Z 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal on project monolithic: Could not resolve dependencies for project com.idugalic:monolithic:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.idugalic:command-side-project:jar:0.0.1-SNAPSHOT, com.idugalic:query-side-project:jar:0.0.1-SNAPSHOT: Failure to find com.idugalic:command-side-project:jar:0.0.1-SNAPSHOT in https://repo.spring.io/libs-snapshot was cached in the local repository, resolution will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forced -> [Help 1] 

It seems like maven tries to download “com.idugalic” artifacts for Linux/ARM64 and failing at it.

May I know, do you have any plans to support Linux/ARM64? Kindly let me know your thoughts.

@odidev
Copy link
Author

odidev commented May 8, 2023

Hi Team, may I please know your thoughts on the Linux/ARM64 support in micro-company?

@odidev
Copy link
Author

odidev commented Jun 22, 2023

Hi @idugalic , a gentle reminder!!

While running the maven application on the Linux/ARM64 platform, it seems like maven tries to download “com.idugalic” artifacts for Linux/ARM64 and failing at it, as can be seen in the logs above.

Can you please provide some pointers on the same?

@odidev
Copy link
Author

odidev commented Aug 9, 2023

Hi Team, a gentle reminder!!
Can you please look into this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants