Browsed by
Tag: java

DevTunnel – A Reverse Proxy Tunnel

DevTunnel – A Reverse Proxy Tunnel

I wanted to have the option to run a web-application on my local machine, and make it seem as if it is running as part of a collection of web-applications on a remote cluster. The collection of web-applications on the cluster make up the whole of a web-site, and during development you might want to “replace” one of the web-app’s by a version on your own machine, which is under development. Note: where this story mentions web-app or web-proxy, you…

Read More Read More

Oracle Forms Standalone Runner

Oracle Forms Standalone Runner

TL;DR; See https://github.com/atkaper/oracle-forms-standalone-runner on how to download and run the forms viewer… If you want the background as to how I got there, read on… At the office, we still use a couple of old/legacy oracle-forms-11 applications. The “normal” (designated) users will run these from Windows, in the Edge browser switched to old Internet-Explorer compatibility mode… You can not start Oracle Forms Applets in any other browser or operating system, as applets are no longer supported. As I do run…

Read More Read More

Java/Kotlin Unit Testing – Test Stdout/Stderr/Logs

Java/Kotlin Unit Testing – Test Stdout/Stderr/Logs

Note: see also my old blog post if you want a more complex solution πŸ˜‰ It targets at replacing the log appender. The below described method is simpler (nice!), it just listens in on ALL standard output+errors. When using spring-boot unit testing (library spring-boot-test-2.6.2.jar or newer), you can capture the output as send to the standard out and standard error channels. This allows for example testing output to log statements (by sending logs to stdout / console appender). From the…

Read More Read More

Maven Version Plugin Automatic Updates

Maven Version Plugin Automatic Updates

Whenever you edit a Java/Kotlin maven project, you should see if you need to update any used libraries. For this purpose, I have a bash alias command which runs the next three statements in a row: The full alias line looks like this (in ~/.bash_aliased) Note: it seems the plug-in is not perfect πŸ˜‰ Sometimes it does major updates, even if you ask it not to. So always carefully look at the changes which are made! The URL as used…

Read More Read More

Lombok SonarQube Config

Lombok SonarQube Config

To skip code which is generated by Lombok in the SonarQube code checks, create a file “lombok.config” in your Java/Kotlin maven project, with these two lines in it: The addLombokGeneratedAnnotation setting does the trick…

Netty Cache Thread Memory Issues

Netty Cache Thread Memory Issues

When running spring-boot using netty (we ran: 4.1.69), and async code, your server might run into a memory issue after running for a while. In our case we were using spring-cloud-gateway (we ran: 3.0.5), and after two weeks of running, we started hitting long garbage collection times. To get around this, we did multiple code fixes, amongst one was disabling the thread-local caches for non-netty threads. To do this, add JVM option: For an explanation, see: https://github.com/spring-projects/spring-framework/issues/21174 Quote: The PooledByteBufAllocator…

Read More Read More

Fast Character Replace Contest

Fast Character Replace Contest

At the office, we have quite a bunch of Java developers. However, because we are quickly growing (way, way, way too quick in my opinion), there was an intake exam created, as part of sourcing in new Java coders from external companies. One of the questions on the intake was an interesting one, so we took it upon ourselves (the existing oldies) to try creating not the most beautiful, but the FASTEST way to get the job done πŸ˜‰ See…

Read More Read More