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

Class org.testcontainers.shaded.javax.annotation.CheckForNull not found #801

Closed
alesavin opened this issue Jul 26, 2018 · 4 comments
Closed
Labels

Comments

@alesavin
Copy link
Contributor

alesavin commented Jul 26, 2018

Hello,

Class com.github.dockerjava.api.command.InspectContainerResponse from testcontainers-1.8.1 have

import org.testcontainers.shaded.javax.annotation.CheckForNull;

and shading for com.google.code.findbugs:jsr305 (#563), but have no class at bundle. Java have no problem with it due of ignorance of annotation missing imports, but while I compile code below with Scala 2.11

import org.testcontainers.containers.MySQLContainer

object ScalaContainerInit {

  def main(args: Array[String]) {
    // there construct of anonymous class is required for reproduce  
    new MySQLContainer(s"mysql:5.7.18") { }
  }
}

catch the compile warning

[WARNING] warning: Class org.testcontainers.shaded.javax.annotation.CheckForNull not found - continuing with a stub.

The Scala compiler requires that all classes referenced in signatures of classes that in use available on the compile time classpath. With -Xfatal-warnings it was a problem.

It possible to add missed lib to shaded?

alesavin pushed a commit to alesavin/testcontainers-java that referenced this issue Jul 26, 2018
@rnorth rnorth closed this as completed in ba8a89f Jul 30, 2018
rnorth added a commit that referenced this issue Jul 30, 2018
rnorth added a commit that referenced this issue Jul 30, 2018
…CheckForNull not found" (#809)

Reverts #802

Sorry @alesavin - post-merge, we realised we want to do a bit more digging on this issue. We'll still try and, very soon, either (a) fix the problem another way, or (b) re-add this.
@rnorth
Copy link
Member

rnorth commented Jul 31, 2018

Reopening, as we decided to temporarily revert #802 to double-check our shading strategy.

@rnorth rnorth reopened this Jul 31, 2018
@stale
Copy link

stale bot commented Oct 29, 2018

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.

@stale stale bot added the stale label Oct 29, 2018
@stale
Copy link

stale bot commented Nov 12, 2018

This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the issue if this is the case.

@stale stale bot closed this as completed Nov 12, 2018
@navidsol9
Copy link

navidsol9 commented Jul 8, 2024

I am facing the same issue: package org.testcontainers.shaded.javax.ws.rs.core.Response does not exist.

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <version>1.16.1</version>
            <scope>test</scope>
        </dependency>

Apache Maven 3.6.1
Java version: 11.0.17

It is the same with Java 22.

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

No branches or pull requests

3 participants