Testcontainers-java: Problem with shaded dependencies after upgrade from 1.6.0 to 1.7.1

Created on 23 Apr 2018  路  3Comments  路  Source: testcontainers/testcontainers-java

Hi! I've just upgraded my testcontainers for postgres from 1.6.0 to 1.7.1 and there is problem with resolving commons-io and commons-lang dependencies wich are required in testcontainers.
They are shaded in build.gradle of testcontainers, so I have:

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils at org.testcontainers.jdbc.ContainerDatabaseDriver.runInitScriptIfRequired(ContainerDatabaseDriver.java:234) at org.testcontainers.jdbc.ContainerDatabaseDriver.connect(ContainerDatabaseDriver.java:158) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:117) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:123)

If I add these deps in my pom, problem is solved.

Why are these deps shaded?

areshading typbug

Most helpful comment

Hi @eksd,
Thanks for reporting this one, nice catch!
We shade our internal dependencies (e.g. utils), but apparently the shading was only applied to the main module.
I've submitted a PR with a fix, will be released soon 馃憤

All 3 comments

Hi @eksd,
Thanks for reporting this one, nice catch!
We shade our internal dependencies (e.g. utils), but apparently the shading was only applied to the main module.
I've submitted a PR with a fix, will be released soon 馃憤

thx, run into the same issue

Released as 1.7.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chomhanks picture chomhanks  路  3Comments

michael-simons picture michael-simons  路  3Comments

McKratt picture McKratt  路  4Comments

denis-zhdanov picture denis-zhdanov  路  3Comments

naderghanbari picture naderghanbari  路  3Comments