[postgis-users] org.postgresql.util.PSQLException: ERROR: operator does not exist: geometry && character varying

Smith Roman autisi at yahoo.com
Mon Jan 24 01:33:36 PST 2011


Hello Everyone,

I got the following error when running a web gis application built using geomajas. The application uses hibernate spatial with postgis. 


Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: geometry && character varying
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryE
ecutorImpl.java:1525) ~[postgresql-8.1-407.jdbc3.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecuto
Impl.java:1309) ~[postgresql-8.1-407.jdbc3.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.j
va:188) ~[postgresql-8.1-407.jdbc3.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Sta
ement.java:452) ~[postgresql-8.1-407.jdbc3.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstrac
Jdbc2Statement.java:354) ~[postgresql-8.1-407.jdbc3.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdb
2Statement.java:258) ~[postgresql-8.1-407.jdbc3.jar:na]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Del
gatingPreparedStatement.java:96) ~[commons-dbcp-1.3.jar:1.3]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Del
gatingPreparedStatement.java:96) ~[commons-dbcp-1.3.jar:1.3]
        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java
208) ~[hibernate-core-3.5.2-Final.jar:3.5.2-Final]
        at org.hibernate.loader.Loader.getResultSet(Loader.java:1849) ~[hiberna
e-core-3.5.2-Final.jar:3.5.2-Final]
        at org.hibernate.loader.Loader.doQuery(Loader.java:718) ~[hibernate-cor
-3.5.2-Final.jar:3.5.2-Final]
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(L
ader.java:270) ~[hibernate-core-3.5.2-Final.jar:3.5.2-Final]
        at org.hibernate.loader.Loader.doList(Loader.java:2294) ~[hibernate-cor
-3.5.2-Final.jar:3.5.2-Final]



What does the above error mean " org.postgresql.util.PSQLException: ERROR: operator does not exist: geometry && character varying ".

The hibernate sql query used was

DEBUG org.hibernate.SQL - select this_.gid as gid0_0_, this_.area as area0_0_, this_.area__sqkm as area3_0_0_, this_.the_geom as the4_0_0_, this_.id as id0_0_, this_.lgas as lgas0_0_, this_.perimeter as perimeter0_0_, this_.popn_densi as popn8_0_0_, this_.population as population0_0_, this_.states as states0_0_ from enugu_adm this_ where ((this_.the_geom && ? )  and (this_.the_geom && ? AND intersects(this_.the_geom, ?)));


This error is very strange because sometimes when I run the web application (on tomcat) it works some other times it does not work.

I am using posgresql 9 with postgis 1.5.2. I also tested it on postgresql 8.3 and a lower version of postgis and still got the same error. The jdbc drivers used were version 1.1.6 and postgresql-8.1-407.jdbc3.

  
Cheers,

Roman.


      



More information about the postgis-users mailing list