Jackson Mismatched Input Exception

Suppose you are trying to do something like: But the output is something like: There are at least two reasons: Configuration file does not exist; Setters for MyConfiguration.class are named incorrectly or cannot be accessed.

READ MORE

Using gRPC with JKS

gRPC doesn’t support JKS out of the box, but there is a workaround. Below is an example of how to use gRPC and JKS. Server side Client side If you don’t need to use custom truststore, you need to do nothing. If you need to use custom truststore, use example below: You can use trustManagerFactory […]

READ MORE

OPENSSL internal: SSLV3 ALERT HANDSHAKE FAILURE

Full text of the error: If you encounter such an error, there are at least two reasons: Incompatible version of boring-ssl library. Private key problem. For example, we wrote our own KeyManager implementation and the getPrivateKey() method returns null, or there is no such private key at all.

READ MORE

Error while calling a method on a Groovy class

You may encounter an error when compiling your project that looks like this: It is not at all clear what class are meant. If you work with IntelliJ IDEA – this is the reason. Sometime it parses maven build/compile logs incorrectly, so the second part of the exception was lost. Compile manually through the terminal […]

READ MORE

ZooKeeper recursive watcher

If you need to set up a recursive watchers (watch on all nodes), the standard ZooKeeper’s Watcher class will not help much – it is installed on only 1 node (or one-level-forward when you calling getChildren()), and is also a one-time event. This means that after each watch trigger, you need to install a new […]

READ MORE

How ZooKeeper ACL works

In this post I will describe the basic principles of how ACL works in ZooKeeper. ACL is not set recursively and is not inherited by the child nodes. If we have a read-only ACL for /path1/path2 or /path1/path2/path3, then deleting /path1 will fail, regardless of AСL of /path1. Several ACL records can be set on […]

READ MORE

Perform some action when spec fails in Spock Framework

Let’s imagine that we need to perform a certain sequence of actions when a spec fails. If you just need to close some resources when spec fails – don’t reinvent the wheel and use an easy and correct method – @AutoCleanup annotation. I wrote about it in detail earlier: https://mchesnavsky.tech/closing-resources-in-spock-framework. Keep in mind that in […]

READ MORE