XPath, JAXP and the Default Namespace

So you’ve just finished parsing a document with your validating namespace aware document factory and you’ve gone to select some nodes using XPath and nothing has appeared (no nodes where selected). You’ve tried changing the XPath expression, making it simpler and simpler and still nothing. Chances are it’s not he XPath that’s at fault it’s your XML.Continue reading

PrimeFaces p:fileUpload not Appearing

I hit this issue with the PrimeFaces p:fileUpload component this morning and it had me going for about an hour until I figured out what was wrong. A good googling shows that more than a few people have hit this problem but no one had reported a solution, there was even a bug report closed as can’t reproduce.Continue reading

Hudson Hell Part 2

Just when I think that I’ve got everything working I hit another issue. This time it’s with Subversion. I’m trying to create a new job so I select Subversion under the SCM section and enter the appropriate URL. Hudson tells me that I need to enter credentials so I click the link which takes me to the credentials page where I enter my username and password.Continue reading

Netbeans 7.3 Maven Profiler Issue

Neatbeans 7.3 has just been released (yeah) and, like every release it has brought a host of new bugs with it. I try not to document bugs because they tend not to be around for very long and bug databases are normally a better place to look but this one falls into the difficult to find category so I’ll document it here.Continue reading

Tomcat Service Fails to Start

I’ve run more Tomcat services than I care to think about and I reckon I’ve probably seen just about every different way they can fail now. The failure mode I describe here seems to catch me out every time though so I thought I’d write it up so everyone can benefit from my pain.Continue reading

NetBeans License Magic

As a general rule I don’t include license information at the top of each source file (I’m sure a lawyer would be outraged)  because no one but me should ever see the source. I’ve recently started work on an open source project though so I thought I’d best investigate how to get NetBeans to automatically include some Apache 2.0 license blurb at the top of each source file.Continue reading

Validating SAX Parser


I’ve been working with the built in Java XML libraries quite a bit lately and one of the things I’ve noticed is that there are very few good snippets of what I call recipe code – little bits of code that show you how to complete a specific task. In this article I show you how to use JAXP 1.3/1.4 to load a schema from the classpath and create a validating SAX parser.Continue reading