Starting Zookeeper Cluster. Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain

I got the Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain, because I had downloaded the apache-zookeeper-X.X.X.tar.gz file and not the apache-zookeeper-X.X.X.bin.tar.gz file. Downloading, untarring and using the bin.tar file fixed it for me. You can also build the binaries from the apache-zookeeper-X.X.X.tar.gz file; see the answer of @vincent.

How to decode JWT (Header and Body) in java using Apache Commons Codec?

Here you go: import org.apache.commons.codec.binary.Base64; @Test public void testDecodeJWT(){ String jwtToken = “eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0Iiwicm9sZXMiOiJST0xFX0FETUlOIiwiaXNzIjoibXlzZWxmIiwiZXhwIjoxNDcxMDg2MzgxfQ.1EI2haSz9aMsHjFUXNVz2Z4mtC0nMdZo6bo3-x-aRpw”; System.out.println(“———— Decode JWT ————“); String[] split_string = jwtToken.split(“\\.”); String base64EncodedHeader = split_string[0]; String base64EncodedBody = split_string[1]; String base64EncodedSignature = split_string[2]; System.out.println(“~~~~~~~~~ JWT Header ~~~~~~~”); Base64 base64Url = new Base64(true); String header = new String(base64Url.decode(base64EncodedHeader)); System.out.println(“JWT Header : ” + header); System.out.println(“~~~~~~~~~ JWT … Read more

Compile OpenSSL with the ‘shared’ option?

Same problem here, BUT usually Makefiles will consider environment variables for compiler or linker options. So, if you place the -fPIC option before calling the configure script, it should take care of it. You can do it with: CFLAGS=-fPIC ./config shared –prefix=/your/path or export CFLAGS=-fPIC ./config shared –prefix=/your/path It worked for me.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)