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

Nicklas Avén nicklas.aven at jordogskog.no
Mon Jan 24 01:46:57 PST 2011


Hallo

There seems to be a geometry not included in the query. The second query
is represented by "?" That makes postgresql try to make a bounding box
compare between this.the_geom and ? which is not possible.

So the problem seems to be earlier. 

Iinvestigate why the second geometry is missing.

HTH
Nicklas
 




> 
> 
> 
> 
> 

On Mon, 2011-01-24 at 01:33 -0800, Smith Roman wrote:

> 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.
> 
> 
>       
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110124/85d3071e/attachment.html>


More information about the postgis-users mailing list