distGatling icon indicating copy to clipboard operation
distGatling copied to clipboard

Unable to build inside container

Open weidi opened this issue 4 years ago • 1 comments

Hi, i tried building your project inside a container to have a final slim master and worker container. mvn clean package fails when executing test

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [akka.actor.ActorSystem]: Factory method 'createActorSystemWithMaster' threw exception; nested exception is java.lang.ClassNotFoundException: javafx.util.Pair at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)

do you have any advise?

weidi avatar Dec 02 '20 21:12 weidi

This happens because javafx is not part of openjdk based docker image.

It also happens that javafx is not actually used in this project but merely referenced. By commenting out https://github.com/Abiy/distGatling/blob/master/gatling-rest/src/main/resources/application.conf#L77 the test will no longer fail and the application will start inside a docker container.

anirudhwarrier1 avatar Mar 05 '21 12:03 anirudhwarrier1