Until today I worked with the Rest-API Testing Tool Postman from Google. But this tool was making me more and more suspicious in the last time. For example, you are recently asked to sign in with a Google account. So it was time to lookout for an alternative. And finally I found Insomnia. It is open source and hosted on Github.
To install the tool on Linux/Debian run:
# Add to sources
echo "deb https://dl.bintray.com/getinsomnia/Insomnia /" \
| sudo tee -a /etc/apt/sources.list.d/insomnia.list
# Add public key used to verify code signature
wget --quiet -O - https://insomnia.rest/keys/debian-public.key.asc \
| sudo apt-key add -
# Refresh repository sources and install Insomnia
sudo apt-get update
sudo apt-get install insomnia
Today I ran into a problem with Maven under Debian GNU/Linux 9 (stretch). My Debian has OpenJDK 8 as also OpenJDK 9 installed. OpenJDK 9 is my default java version. My Maven version is 3.3.9.
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 9-Debian, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-9-openjdk-amd64
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-6-amd64", arch: "amd64", family: "unix"
The problem is, that building one of my projects results in the following ClassFormat Error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project imixs-workflow-core: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
[ERROR] java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/xml/bind/JAXBException
[ERROR] at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[ERROR] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
[ERROR] at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
[ERROR] at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
[ERROR] at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
[ERROR] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
[ERROR] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
[ERROR] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
[ERROR] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
[ERROR] at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
[ERROR] at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3139)
[ERROR] at java.base/java.lang.Class.getMethodsRecursive(Class.java:3280)
[ERROR] at java.base/java.lang.Class.getMethod0(Class.java:3266)
[ERROR] at java.base/java.lang.Class.getMethod(Class.java:2063)
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.tryGetMethod(ReflectionUtils.java:57)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isSuiteOnly(JUnit3TestChecker.java:64)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isValidJUnit3Test(JUnit3TestChecker.java:59)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.accept(JUnit3TestChecker.java:54)
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4TestChecker.accept(JUnit4TestChecker.java:52)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:97)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:206)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:103)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] -> [Help 1]
The problem is a incompatibility of maven 3.3.9 with JDK 1.9. To solve this problem I switch to my OpenJDK 8 by setting the JAVA_HOME variable explicitly to JDK8 :
After this change maven install works fine again in my projects.
To make the JAVA_HOME setting permanent follow this stepts.
1. find your preferred java version
ls -la /usr/lib/jvm/
2. edit the file /etc/profile and add the following line with the path to the JDK 8 you find before:
export JAVA_HOME="path to jdk8 that you found"
3. verify you maven installation
You maven should now be set to JDK8.
I hope this post will become obsolete in near future.
In my previous blog I demonstrated how to setup a lightweight docker swarm environment with docker-machine. When you run this environment in the internet with real virtual machines, there can be some issues you need to take care. Anyway, these issues have cost me a lot of time. Therefore, I would like to give some hints on how to run Docker Swarm on public VMs. Continue reading “How to Run Docker-Swarm on VM Servers”
Today I tried to connect a “August MS425” speaker box with my Linux Notebook running on Debian Jessie. To get the bluetooth connection running I installed the following additional packages:
sudo apt-get install pulseaudio-module-bluetooth, ofono, pavucontrol
After I established the bluetooth connection the speaker box was not working or displayed in the list of audio devices. To solve this issue I found this discussion.
The missing part was the the auto-connect a2dp option for the new device. So I had to edit the file “/etc/pulse/default.pa” and added the following line :
After a reboot it works fine. You can use pavucontrol to setup audio settings.
When you build your own Docker Image with a Dockerfile, your process inside this container will typically run as the root user per default. This can be a security issue for productive environments in case your process becomes vulnerable. Continue reading “Run a Docker Container with Non-Privileged User”
Today I had a strange problem with virtualbox in Debian Jessie which was no longer running. When I start a virtual machine I got the following error message
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or
there is a permission problem with /dev/vboxdrv. Please reinstall the
kernel module by executing
But the problem was that the vboxdrv was not installed so I was unable to run that command. Alos reinstalling Virtualbox or the linux-headers did not solve the problem.
After all I found this discussion on stackoverflow. I was able to solve the problem by installing a new version of Virtualbox from the backports by using the following command:
apt-get -t jessie-backports install virtualbox
Since 2 years I have a Wortmann Ultrabook running on Debian. Since some weeks the the battery life has deteriorated sharply. I found this helpful article about the linux tool ‘powertop’. You can use this tool to recalibrate the battery of a loptop using the following command:
sudo powertop --calibrate
At a first look it seems like this helped much to improve the power management of my laptop.
Today I had a strange problem with my skype installation in Debian. The microphone seems not to work. Finally I found the solution here.
The trick is the following:
- Open the Sound settings when you start a skype test call.
- Click on the tab ‘Recourding’
- Choose the option : show ‘all streams’ at the bottom of the tab
- Now when the skype call runs you will see the skype application appearing
- There is a tiny button muting the microphone. This option was selected in my case. Deselecting the mute button solved the problem for me
Today I had strange problems with Eclipse Luna after an Ubuntu Update.
The solution was changing the eclipse.ini by adding
and changing the memory settings.
Thanks to Bård Aase Blog: http://blog.elzapp.com/2014/07/01/making-eclipse-kepler-and-luna-work-on-ubuntu.html
Yesterday I upgraded my debian testing release (jessie) and after that the Gnome Desktop and also gdm3 (the Desktop Manager to login) was broken. I installed lightdm and xfce to get back a working desktop. But I can’t figure out whats going wrong until my last upgrade.
Finally I found help in this forum thread.
So I removed all the nvidia packages (I had no nvidia graphic card but a Intel HD3000)
apt-get remove --purge nvidia-*
Next I reinsalled gdm3, gnome and reconfigured finally gdm3
apt-get --reinstall install gdm3
apt-get --reinstall install gnome
apt-get --reinstall install gnome-shell
After that procdure my system worked again!
I don’t understand why a dist-upgrade on a system with not nvidia graphic card leads into such a strange situation.
Corrupted /tmp folder
Additional I was affected from a corrupted /tmp folder which shows the wrong size. To solve this I found the following Blog Post.
- press ‘e’ during the grub boot loader
- add the following to the end of the line starting with /boot/vmlinuz…
–add rw init=/bin/bash
- press f10 to boot with that configuration – system will start in a bash
- remove and create the tmp folder
>rm -rf /tmp
>chmod 1777 /tmp
- reboot system
This helps me to create a new empty /tmp folder.