Archive for the 'Java' Category

The What and Why of fixing java.lang.OutOfMemoryError: PermGen space

The permanent generation is the area of heap that holds all the reflective data of the virtual machine itself, such as class and method objects (also called “method area” in The Java Virtual Machine Specification).

Translation: PermGen holds the information that makes the JVM work.

Why do you care?

If an application loads “too many” [...]

Shard your data or you have failed at life.

Protip: if you are starting a business whose success hinges on scalability of a data store, you had best figure out how to shard across N machines before you launch. Using a single instance of MySQL for the whole thing is a strong indicator that you have failed at life. [...]

2008: The year of JRuby?

2008 will probably be the year of JRuby. JRuby solves the two biggest pain points I hear from developers about Ruby.

People think Ruby is slow, so I can’t try it out. I don’t know how we would deploy it, what is all this Apache/Mongrel/Rewrite stuff? Can’t I just deploy on our app server?

Headius by [...]

Java Thread safety again… this time Regexes?

Over at there was a Java brain teaser…

Suppose that you have a Java web application where regular expressions are used deep down in the implementation to do some work, but you observe that the an array index exception is occurring sporadically where the regular expressions are being used. What’s [...]

Maven2, Cargo and deploying to Jetty 6 with Commons Logging

Java and it’s classloaders, always a fun time!

Every been using Maven2, Cargo and deploying to Jetty 6 with Commons Logging? Probably not, but if you were you’d run into this I bet.

org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.

This is a Type-2 Classloader error. I know, what does that mean?

Type-II: Assignment incompatibility of [...]