Testcontainers-java: Upgrade from 1.10.7 to 1.11.x broke compilation when on module path on Java 11

Created on 25 Apr 2019  Â·  15Comments  Â·  Source: testcontainers/testcontainers-java

When upgrading the org.testcontainers:postgresql package from version 1.10.7 to 1.11.0 my project ( https://github.com/pgjdbc/pgadba ) stopped compiling.

A new warning that was added is a good hint on what's wrong:

[WARNING] Can't extract module name from testcontainers-1.11.2.jar: Provider class org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl not in module

And this is an example of the errors that are generated:

[ERROR] /home/capitol/project/pgsql2/src/test/java/org/postgresql/adba/testutil/ConnectUtil.java:[22,27] cannot access org.testcontainers.containers.traits.LinkableContainer
  class file for org.testcontainers.containers.traits.LinkableContainer not found

How to reproduce:

  1. git clone [email protected]:pgjdbc/pgadba.git
  2. update pom.xml and upgrade the dependency version to 1.11.0
  3. mvn clean test
areshading resolutioacknowledged typbug

Most helpful comment

@tgolden-andplus Version 1.10.7 works, 1.11.0 and onwards doesn't work

All 15 comments

Hi! Have you tried the latest version (1.11.2)?

Yes, sorry for not spelling that out. All three of 1.11.0, 1.11.1 and
1.11.2 behaves the same.

Den tors 25 apr. 2019 22:54 skrev Sergei Egorov notifications@github.com:

Hi! Have you tried the latest version (1.11.2)?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/testcontainers/testcontainers-java/issues/1424#issuecomment-486834359,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAE6EHTII4CSH6EFQCL2KPTPSILBTANCNFSM4HIQLHNA
.

@alexanderkjall ok, thanks.
We did a few changes to the shading config in 1.11.x, it seems that something sneaked into the final JAR.
Thank you for reporting!

Also tested with 1.11.3, same problem.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

Not stale, problem still exists in version 1.12.0

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

Not stale, problem still exists in version 1.12.4

Can confirm the issue still exists in 1.12.5.

Does downgrading to the last patch release in the 1.10.x line work?

@tgolden-andplus Version 1.10.7 works, 1.11.0 and onwards doesn't work

Issue still exists in 1.13.0 as well.

Is this on the roadmap for Testcontainers developers at all? Modules are not going away anytime soon....

Still the same in 1.14.0

This will not be fixed until Testcontainers 2.0 due to JPMS limitation (unique packages).

This issue not found in 1.15.0. Please update your testcontainers

I can't seem to reproduce this with 1.15.0 and java 15, thanks for fixing it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michael-simons picture michael-simons  Â·  3Comments

oneiros-de picture oneiros-de  Â·  3Comments

rnorth picture rnorth  Â·  3Comments

ayedo picture ayedo  Â·  3Comments

richard77 picture richard77  Â·  3Comments