Working around a javax.net.ssl.SSLHandshakeException

Steve Neal Development 1 Comment

When trying to download data from an HTTPS connection, you might see the following exception reported: javax.net.ssl.SSLHandshakeException: renegotiation is not allowed This rather unhelpful error message can be raised on either the server or the client and indicates that the SSL libraries in Java cannot determine whether the CA that signed the server’s certificate is to be trusted or not. …

Getting a “Netscape security model is no longer supported” error when using IntelliJ

Steve Neal Java Programming 1 Comment

I’ve been working on a JMS application that uses encryption with JNDI authentication and have encountered the following error message when running it: Netscape security model is no longer supported. Please migrate to the Java 2 security model instead. It turns out that this is a problem with the JDK’s plugin.jar file and can be fixed quite easily by removing …

Java 1.4 Debugger Not Working?

Steve Neal Development 1 Comment

There’s a bug that I’d encountered running the debugger in JDK 1.4.2 ages ago that reared it’s head again today. I’ve been working on a system that uses this old JDK and thought I’d note the solution here in case I ever came across it again. The problem is encountered when the JVM is launched in debug mode and is …

Using Mockito to Unit Test Java Applications

Steve Neal Development, Java Programming, Tool support 23 Comments

If you’ve spent any time writing unit tests then you’ll know that it’s not always straight-forward. Certain things are inherently hard to test. In this post I’ll show you the basic principles of creating mock objects with a little help from the Mockito mocking tool. One common problem faced when unit testing is how to test one object when it …

Configuring MySQL on Mac OS X

Steve Neal Development, Tool support 1 Comment

I found the documentation for MySQL a little rough around the edges recently when I needed to change a configuration setting for it – everything seemed spread around their comprehensive PDF documentation and it took me a little while to fathom my way through it. It’s not often that changes to MySQL configuration need to be made. This post is, …