I've worked out the answer. The problem is due to the configuration of the dialet for Hibernate. The dialect that should be used is this:
config = config.setProperty(Environment.DIALECT, "org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect")
Rather than this one:
config = config.setProperty(Environment.DIALECT, "org.hibernate.dialect.Oracle10gDialect")
The error message isn't entirely clear on that one but this will hopefully solve anyone else having this problem.