Comments (17)
@dimafeng the same problem with 0.13.0
org.testcontainers:testcontainers
does not contain dependency on jsr-305
where CheckForNull
comes from.
So adding jsr-305
(see below) to the project should fix the issue.
diff --git a/core/pom.xml b/core/pom.xml
index 00cc48d..f3eadf8 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -27,6 +27,12 @@
<version>1.7.25</version>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
+ </dependency>
+
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
@@ -222,7 +228,7 @@
<include>org.apache.httpcomponents:*</include>
<include>org.glassfish.*:*</include>
<include>org.aopalliance.*:*</include>
- <include>javax.annotation:*</include>
+ <include>com.google.code.findbugs:*</include>
<include>javax.inject:*</include>
<include>javax.ws.rs:*</include>
<include>com.fasterxml.*:*</include>
from testcontainers-scala.
Hi @zaharidichev
I'll take a look tonight or tomorrow.
from testcontainers-scala.
Thanks a lot. It really is causing me quite a lot of headache :(
from testcontainers-scala.
@zaharidichev could you please show the list of your dependencies and their versions?
from testcontainers-scala.
@dimafeng Thanks for looking into that. Following is a list of the dependencies.
ch.qos.logback.logback.classic.1.1.1
ch.qos.logback.logback.core.1.1.1
com.beust.jcommander.1.12
com.dimafeng.testcontainers.scala.0.11.0
com.fasterxml.jackson.core.jackson.annotations.2.3.2
com.fasterxml.jackson.core.jackson.annotations.2.7.8
com.fasterxml.jackson.core.jackson.core.2.3.2
com.fasterxml.jackson.core.jackson.core.2.7.8
com.fasterxml.jackson.core.jackson.databind.2.3.2
com.fasterxml.jackson.core.jackson.databind.2.7.8
com.fasterxml.jackson.datatype.jackson.datatype.jdk8.2.7.8
com.fasterxml.jackson.datatype.jackson.datatype.jsr310.2.7.8
com.github.fakemongo.fongo.2.0.11
com.github.jnr.jffi.1.2.15
com.github.jnr.jffi.1.2.15.native
com.github.jnr.jnr.constants.0.9.8
com.github.jnr.jnr.ffi.2.1.4
com.github.jnr.jnr.posix.3.0.41
com.github.jnr.jnr.x86asm.1.0.2
com.github.nscala.time.nscala.time.1.0.0
com.google.guava.guava.18.0
com.googlecode.disruptor.disruptor.2.10.4
com.kohlschutter.junixsocket.junixsocket.common.2.0.4
com.kohlschutter.junixsocket.junixsocket.native.common.2.0.4
com.twitter.scrooge.core.3.17.0
com.typesafe.akka.akka.actor.2.3.4
com.typesafe.akka.akka.testkit.2.3.4
com.typesafe.config.1.2.1
com.typesafe.config.1.3.0
com.typesafe.play.play.datacommons.2.3.10
com.typesafe.play.play.datacommons.2.5.10
com.typesafe.play.play.functional.2.3.10
com.typesafe.play.play.functional.2.5.10
com.typesafe.play.play.iteratees.2.3.10
com.typesafe.play.play.iteratees.2.5.10
com.typesafe.play.play.json.2.3.10
com.typesafe.play.play.json.2.5.10
com.vividsolutions.jts.1.13
commons.cli.commons.cli.1.1
commons.codec.commons.codec.1.10
commons.io.commons.io.2.5
commons.lang.commons.lang.2.5
commons.lang.commons.lang.2.6
de.grundid.opendatalab.geojson.jackson.1.2
joda.time.joda.time.2.3
joda.time.joda.time.2.9.6
junit.junit.4.12
org.apache.commons.commons.compress.1.12
org.apache.commons.commons.lang3.3.3.2
org.apache.thrift.libthrift.0.8.0
org.aspectj.aspectjrt.1.8.6
org.beanshell.bsh.2.0b4
org.bouncycastle.bcprov.jdk15on.1.54
org.hamcrest.hamcrest.core.1.3
org.jetbrains.annotations.13.0
org.joda.joda.convert.1.6
org.joda.joda.convert.1.8.1
org.mockito.mockito.all.1.9.5
org.mongodb.casbah.commons.3.1.1
org.mongodb.casbah.core.3.1.1
org.mongodb.casbah.query.3.1.1
org.mongodb.mongo.java.driver.3.2.2
org.mozilla.rhino.1.7.7.1
org.ow2.asm.asm.5.0.3
org.ow2.asm.asm.analysis.5.0.3
org.ow2.asm.asm.commons.5.0.3
org.ow2.asm.asm.tree.5.0.3
org.ow2.asm.asm.util.5.0.3
org.rnorth.duct.tape.duct.tape.1.0.6
org.rnorth.tcp.unix.socket.proxy.1.0.1
org.rnorth.visible.assertions.visible.assertions.2.0.0
org.scala.lang.modules.scala.parser.combinators.1.0.4
org.scala.lang.modules.scala.xml.1.0.5
org.scala.lang.scala.library.8
org.scala.lang.scala.reflect.1
org.scala.lang.scala.reflect.7
org.scala.lang.scala.reflect.8
org.scala.sbt.test.interface.1.0
org.scala.stm.scala.stm.0.7
org.scalacheck.scalacheck.1.11.3
org.scalactic.scalactic.3.0.1
org.scalatest.scalatest.3.0.1
org.scijava.native.lib.loader.2.0.2
org.scoverage.scalac.scoverage.plugin.1.1.0
org.scoverage.scalac.scoverage.runtime.1.1.0
org.slf4j.jcl.over.slf4j.1.7.21
org.slf4j.slf4j.api.1.7.13
org.slf4j.slf4j.api.1.7.25
org.slf4j.slf4j.ext.1.7.25
org.testcontainers.testcontainers.1.4.3
org.testng.testng.6.1.1
org.yaml.snakeyaml.1.6
org.zeroturnaround.zt.exec.1.8
from testcontainers-scala.
@zaharidichev
I checked codebase of org.testcontainers.testcontainers.1.4.3
and didn't find any usages of the org.testcontainers.shaded.javax.annotation.CheckForNull
as well as there are no usages in testcontainers-scala.
Could you please try to switch to a DEBUG level of compilation logging? The answer may be there, we need to find out where that class is accessed from.
from testcontainers-scala.
I did try setting:
scalacOptions ++= Seq("-unchecked", "-feature", "-explaintypes", "-print-types")
However that did not display any additional information. Quite strange. Just the same old error. Something is getting severely mixed up on the compiler level. This type does not even exist. I do not understand what and why is trying to access it.
from testcontainers-scala.
I'll try to create an SBT project to reproduce the issue.
from testcontainers-scala.
@dimafeng
Interestingly enough, we are using your library in another project and it does not show such problems. I am not sure what is so special with this one and this set of dependencies that causes so much headache. Same version of scala, same version of sbt
from testcontainers-scala.
Right...
So @dimafeng running the compiler in verbose mode yields the following:
[info] [loaded package loader jackson in 0ms]
[info] [loaded package loader annotation in 0ms]
[info] [loaded package loader javax in 0ms]
[error] Class org.testcontainers.shaded.javax.annotation.CheckForNull not found - continuing with a stub.
[error] Class org.testcontainers.shaded.javax.annotation.CheckForNull not found - continuing with a stub.
[error] Class org.testcontainers.shaded.javax.annotation.CheckForNull not found - continuing with a stub.
[info] [loaded class file /Users/zahari/.ivy2/cache/org.testcontainers/testcontainers/jars/testcontainers-1.4.3.jar(com/github/dockerjava/api/command/InspectContainerResponse.class) in 2ms]
[info] [loaded package loader traits in 0ms]
This is happening right before the loader picks up InspectContainerResponse
. Looking a bit further into that class, it looks like (an excerpt):
import org.testcontainers.shaded.com.fasterxml.jackson.annotation.JsonIgnore;
import org.testcontainers.shaded.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.testcontainers.shaded.com.fasterxml.jackson.annotation.JsonProperty;
import org.testcontainers.shaded.javax.annotation.CheckForNull; <----- this guy here !
@JsonIgnoreProperties(
ignoreUnknown = true
)
public class InspectContainerResponse {
@JsonProperty("Args")
private String[] args;
@JsonProperty("Config")
There is no such class org.testcontainers.shaded.javax.annotation.CheckForNull
in the test containers jar on my classpath. For reference, I am currently running that with:
- testcontainers-scala_2.110.12.0.jar
- testcontainers-1.4.3.jar
Seems like they missed something while shading the javax or I am getting confused somehow
from testcontainers-scala.
@zaharidichev sorry for the late response. This is interesting.
@rnorth @bsideup do you guys know where org.testcontainers.shaded.javax.annotation.CheckForNull
should come from?
from testcontainers-scala.
@dimafeng I think I know where it comes from... Not related to testcontainers-scala, we need to fix that in testcontainers-core.
@zaharidichev thanks for reporting!
from testcontainers-scala.
@bsideup Is there any estimation of when would that get fixed so I can pull in a snapshot at least. Alternatively I can give yo a hand and prepare a PR for it.
from testcontainers-scala.
I have the same problem.
@zaharidichev, did you fixed or worked-around the issue on your side?
from testcontainers-scala.
@ljkr sorry to hear that. It seems that issue was fixed in the latest version of testcontainers-java
. I'll release a new version of testcontainers-scala with that fix later today.
from testcontainers-scala.
@ljkr @zaharidichev please try version 0.13.0
from testcontainers-scala.
@ljkr @zaharidichev should be fixed in testcontainers-scala 0.14.0, please try - testcontainers/testcontainers-java#563 was released in testcontainers-java 1.6.0
from testcontainers-scala.
Related Issues (20)
- MySQLContainer Random Port HOT 3
- Reuse container between test suits HOT 1
- localstack-v2 require aws sdk 1.x and 2.x HOT 2
- ContainerFetchException when running in Gitub CI
- Containers fails to start running on GHA HOT 4
- Consider removing old API syntax from documentation HOT 2
- Container failed to start on GHA HOT 1
- "Keep getting: open `': Change reported by S3 during open at position 0. ETag was unavailable" when reading from S3
- Make TestContainersSuite public
- Multiple Suites with Single Container HOT 2
- Run DockerComposeContainer on GitLab CI
- sqlserver got Mapped port can only be obtained after the container is started error HOT 2
- NoClassDefFoundError: munit/Test since 0.40.15 HOT 2
- Errors in container startup are silently ignored and test skipped
- NoClassDefFoundError: munit/Test - With `testcontainers-scala-munit` versions above 0.40.14 HOT 2
- 0.41.0: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image alpine/socat:1.7.4.3-r0 HOT 8
- Issue while trying to use PostGis in testcontainer initialization.
- Docker Compose V2 Standalone
- when to use `ForAllTestContainer` over `TestContainersForAll`
- Local Docker Compose with V2 Not Found in Path Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testcontainers-scala.