Opencensus GCP class tried to access private field

If you getting these opencensus errors in GCP from time to time: It worth to recheck dependency version of each opencensus component, that actually presented in your final jar: You may have opencensus-api version 0.19.2, and opencensus-impl version 0.15.0. Thus solution is to equalize all these versions. You can review your dependency versions with following […]

READ MORE

Spring NoClassDefFoundError: JAXBException

If you facing this error: Then the reason is Java XML Binding, it is a tool for mapping between XML documents and Java objects. These classes has been removed from internal of JDK since 11 version and moved to Jakarta EE. This transition was happened with replacing javax to jakarta in package names. javax in your stacktrace tells us that […]

READ MORE

Testcontainers timed out waiting for URL to be accessible | Mockserver Mac M1 compatibility

Exception looks like this: Suppose you want to start mockserver docker image on Mac M1. Probably you doing something like this: Most likely this error happens because of poor docker x86-64 image compatibility with the ARM (M1) CPU architecture. If you see carefully, then you can find out that some versions of mockserver images (including […]

READ MORE

Invalid signature file digest

Full error text: This error can be encountered if there are signed libraries among the dependencies of your project. To solve the problem, you need to exclude files with the extensions .SF, .DSA, .RSA from the build. Of course, we will assume that you are building uber jar (fat jar). For Maven: For Gradle: Complete […]

READ MORE

No main manifest attribute Gradle Kotlin DSL

You can get this error if you try to run jar without specifying the name of the class that contains fun main() and which you want to run. To do this, you need to register the full class name in the Main-Class key of your manifest. Plain jar without dependencies You need to replace the […]

READ MORE

Uber JAR with Gradle Kotlin DSL

In this article, we will find a solution to the question – how to make an uber jar Gradle Kotlin DSL or how to make a fat jar Gradle Kotlin DSL. Let’s add this to build.gradle.kts file: After that, you can build the jar with dependencies: That’s all. Possible errors Error: no main manifest attribute, […]

READ MORE