xpam.pl

Category: Programming

  • Keycloak OAuth endpoints for Postman/HTTP Clients

    When testing REST services secured by Keycloak you need to retrieve access tokens via Postman or similar REST client. If you want to implement your own client that has to authenticate with a token you also need to know the Keycloak OpenID endpoints in order to retrieve the access token, refresh it or to end…

  • OJDBC7 in a Docker container? Prepare for trouble

    Scenario: A JDK8 Docker container using OJDBC7 to connect to the database. Sounds simple enough, what could go wrong? Simptoms: Connecting to the database randomly takes several minutes, fails with a weird SqlRecoverableException: no more data to read from socket or just works fine as if there is no problem. The same Docker image also…

  • JPQL: getting whole entities on a distinct column

    If you want distinct entities in JPQL you would normally write something like this: SELECT DISTINCT(l) FROM Letter l WHERE l.name=:name; But this will do a DISTINCT on the whole Entity. This will also fail on Oracle DB if your Entity contains a CLOB. What if you really want to do a DISTINCT on a…

  • Writing a Windows installer using Qt

    Most of the time you don’t want to write your own installer for distributing software. You use an off-the-shelf installation program that packages it all up for you instead. But if you feel adventurous or need your installer to perform some very specific tasks you probably want to write your own. This post will shows…