VerifyError Expecting a stackmap frame

I’ve just added a couple of new projects to my Hudson CI system and I noticed that one of the projects, which was configured to build with Java 7, had every test fail with an exception. I decided to use Java 7 after I’d already started working on the project so Java 7 features were only used in the tests at this point so my guess was a problem with the JVM.Continue reading

Which Java XML Library Should You Use

In the past I have always used either JDOM or Dom4J to interact with XML but I’ve never really been overly happy with either library. JDOM is very simple to use and great for simple XML structures but as soon as you want to do something a little more complex it becomes hard work. Dom4J is more powerful but I find the API to be, shall we just say, strange. I’ve never really found any problems with either project I just thought it was time to question why I was using them.Continue reading

Pretty Printing XML with JAXP

Java has a wide selection of built in XML handling capabilities but they are little used by most developers because they are felt, unfairly I think, to be difficult to use. I freely admit that I fell into that camp until fairly recently when I became a convert. Over the next few days I hope to writing some short articles giving hints and tips on using JAXP and the build in Java XML tools. First up is pretty printing.Continue reading

Using a Java Web Service Hosted Behind Apache

I recently set up a new system running most of the software my business produces. Unlike our other sites right from the beginning all of Java servers (a mixture of Tomcat and GlassFish) will be access via Apache using Apache Tomcat Connector mod_jk. Typically we start of will one server and add Apache in later but this is a service move so it makes sense to start with Apache in place.Continue reading

Starting and Stopping Services from Java

Most of the applications I develop are web based and therefore, when deployed on Windows, are running as a service. This is great most of the time but when I want to programmatically control the application it can present some problems because starting and stopping services requires elevated permissions. This article discusses a solution that I’ve come up with that I’m happy to deploy.Continue reading

Providing EL Access for Beans

There are a lot of good ideas in JEE but there are also some sharp corners that the unwary developer could hurt themselves on. Over the next few articles I’m going to point out a few of these less than brilliant pieces of design so that hopefully you’ll be able to avoid them. This article is about providing Expression Language (EL) access to managed beans.Continue reading

JavaFX 2 Generic Editable Table Cells

A few days ago I wrote an article which gave a more complete example of editable table cells in JavaFX 2.0. In that article I promised another article discussing how to make generic editable tables cells since the first article just expected everything to be a string. I’m fairly happy with this solution to the problem of making formatted input cells but if anyone can suggest improvements I’d love to hear them.Continue reading

MySQL Triggers and UUID

One of the applications I maintain currently only runs against Microsoft SQL Server. For the most part this hasn’t proven to be that much of a problem as everyone who uses the application also runs MS SQL. The problem comes when I want to deploy and test it on one of the company servers because they all run Linux and there is no way to run MS SQL under Linux (see note 1).Continue reading