In the project I am working on right now we use apache XCF and Spring to provide a SOAP service to our customers. As part of the messages, there is a userid/password combo telling the application which user sent the request. I struggled with that today because I think that userid/password info should actually be in the SOAP Header, cleaning up my API, enable me to implement different authentication techniques in the future and generally be more “compliant” to the SOAP standard. Boy was I wrong.
Category: Software
Make your buildserver talk
Have you ever started a shell script which takes a while and you keep monitoring that window because you really need those results? If you are working on a Mac, you can use the Mac’s power of speech to tell you a command is finished. Here’s how:
./yourreallyslowbuild.sh; say "really long build is finished"
With a little curl and shell scripting magic, I told my Mac to constantly monitor our Jenkins buildserver, and bug everybody in the office when the hourly build is failing:
Why developers are never on time
If you have worked in IT as long as I do, you probably have noticed that developers have a tendency to not be on time. They are late for meetings, late for lunch, and on other days they are in at 6am or (and) they work until 3am the next morning. If you ever wondered why this is, I might have some answers for you.
You might also find this post interesting if you are trying to figure out why you can’t get your time zones working in MySQL.
Distributed jMeter through VPN and SSL
This week I created a jMeter test setup for distributed testing. I thought it would be straight forward but I ran into some interesting things you might want to know if you are considering distributed testing using jMeter.
In my case, I had to test an application which was inside our corporate network, while working from home through a VPN and a firewall. Normally that is no problem, but jMeter has this funny construction where the slave (jMeter server) wants to connect back to the master (jMeter gui). It took some fiddling with iptables, the jMeter configuration and ssh tunneling to get it to work. Here’s my setup:
Strange fix for SMB problems in Linux
Last week, the upgrade to Ubuntu 11 severely broke all carefully selected menu colors, graphics settings and icon sets. I gave up the fight after a few hours of effortless restoration work and switched to Linux Mint 11.
While setting up my machine and restoring the links to the company Windows file servers I could not connect. The password window would re-appear without any feedback. The fix was even stranger than the problem.
Having fun at J-Fall 2011
This year’s Dutch Java Nerd event called J-Fall was held in Nijkerk, in a beautiful location called “Hart van Holland” . With plenty of sessions by speakers from all over the world it promised to be a great day for Java enthusiasts, at a great location for meeting friends and colleagues. I took a day off from work and it was well worth it.
Gmail: Save an email to disk
Want to save a single email from gmail to disk, in a readable format for Outlook, Thunderbird or Apple Mail? Here’s how:
- Open your browser and log into your gmail account.
- Open the email you want to save.
- On the top-right, there is a little triangle next to the “Reply” button. Click that, and select “Show Original”.
- The original, raw email opens in a new window or tab.
- Right-click on this new window, and select “Save as…”.
- When saving the file, make sure the extension of the filename is “eml“. So for example “MyEmail.eml”.
All done. Now you dan open the file in Thunderbird, Outlook or whatever email viewer you have out there and see the original mail, in all it’s marked-up glory.
Add some magic to Eclipse
The top feature of the eclipse IDE is the very impressive refactoring possibilities. It makes code feel like play-doh, allowing you to knead it in any shape way or form you think fits the current situation. A close second to that is the impressive templates and code assist. Yes, Java is verbose, but I think 80% of the characters which make up a Java program was never actually typed. All the readability without the labour, brought to you by eclipse’s powerful templates.
What many people don’t realize is that you can easily add to this magic by creating your own templates. One of the first templates I always add to the environment is the one which adds a private static final log4j logger. I thought it would be great example to share with you.
Replacing Dropbox with Spideroak
After lies about Dropbox Employees not being able to see your files, then proving that they do not do regression testing on their security, the latest change in terms of service really was the last drop. So I dropped dropbox.
I had become dependent on Dropbox to transfer files between my private and work machines, having my notes, configuration files and (encrypted thank god) password databases handy at all times. Searching around, there is really no other service like it. Although lots of products claim to have the same functionality, the “share this folder between all my machines” feature which dropbox proviced is really unsurpassed.
I had to find an alternative solution which would meet the following criterea:
- has to be a single, native folder, instantly syncing with all other machines
- has to be free or *really* cheap, minimum 2GB
- has to use an encryption technology where no one else can ever read my files, not even the hosting party, not even at gunpoint
- has to have client software for Windows, Mac and Linux
- accessing data on my iPhone would be a nice bonus.
After some browsing around, there are two solutions that come close, one is Wuala, and the other is Spideroak.
For one additonal GB of storage for life, use my referal link to register at SpiderOak. Read the whole article to add another 5GB to that.
Why Jenkins does not detect Failures
Jenkins, the brilliant Continuous Integration build server, has a bit of a problem with the Maven surefire jUnit test plugin. Last sunday, I discovered that our Jenkins build server suddenly started ignoring test failures. While the logfile clearly states that the Unittests contain failures, Jenkins marks the builds as “stable”.
After some digging around, I found that even though Jenkins explicitly tells you in the logfile that it will fail the build, it will not do so if the Surefire XML reports are not generated. In our case, somebody in the team decided that the generation of the XML Surefire reports was taking too long and had disabled them in the Maven pom.xml.
In order to solve this, I re-enabled the XML reports and voila, Jenkins happily started reporting errors again. Here is the correct Surefire plugin configuration for you to use in your maven pom.xml file:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.8</version> <configuration> <!-- Please note that Jenkins needs Surefire XML reports in order for detection to work. Keep this property set to false. --> <disableXmlReport>false</disableXmlReport> </configuration> </plugin>