You didn't completly explain the context you're getting the exception, but I'llm make a few assumptions.
The error happens when you're using a postgres 8 driver, against a postgres 9 DB. A common case is that it is pulled in as a transitive dependency via whatever build system you're using. To make even more assumptions, the very common case is that an older driver is included when adding postgis dep e.g. via maven. The solution is to exclude the dep, e.g. like
<dependency>
<groupId>org.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
<version>1.3.3</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.postgis</groupId>
<artifactId>postgis-stubs</artifactId>
</exclusion>
</exclusions>
</dependency>
anyways, it could be a different dependency, or a different build system, but the gist of the answer should apply, find out what brings the erroneus dep to your classpath, and exclude it
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…