On 6/9/22 12:19 PM, Ian Turton wrote:
> That looks like an SQL error message - can you turn on
> GEOTOOLS-DEVELOPER logging and try again, then post the relevant part of
> the log file - it should include the actual SQL being sent to the database.
> And if you could mention the type of database and the version of
> GeoServer you are using that will help too,

I Attach the relevant log.

Build Information

    GeoServer Version
    2.19.0
    Git Revision
    24c5d0b5a1b170f09e383ba35aae63f2ae9a2925
    Build Date
    18-Mar-2021 14:59
    GeoTools Version
    25.0 (rev d187663948b47212514991a71c0fc3021908b034)
    GeoWebCache Version
    1.19.0 (rev 1.19.x/c3b897ec57838c49f4cbb325c1e9a7678f9edd98)

PostgreSQL 9.2.24

postgis_version()
2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1

I tested the query that you can find in the log and, of course, it
doesn't work because postgresql has not a strMatches function.
In my notes about filters for my tables I found the equivalent of
strMatches:

Select * from myTable where myField ~ '.*\y(131)\y.*'

But probably you already know that.

Let me know if you need other info.

Thank you
  maxx
2022-06-09 15:24:19,855 INFO [org.geoserver.wps] - 
Request: getServiceInfo
2022-06-09 15:24:19,857 WARN [org.geotools.xsd] - Sax parser property 
'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' not 
recognized.  Xerces version is incompatible.
2022-06-09 15:24:19,876 DEBUG [org.geotools.xsd.impl] - schemaLocation found: 
http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd
2022-06-09 15:24:19,877 DEBUG [org.geotools.xsd.impl] - Found override for 
http://www.opengis.net/wps/1.0.0: 
http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd ==> 
jar:file:/usr/local/tomcat8/webapps/geoserver/WEB-INF/lib/gt-xsd-wps-25.0.jar!/org/geotools/wps/wpsAll.xsd
2022-06-09 15:24:19,878 DEBUG [org.geotools.xsd.impl] - No schemaLocation 
found, using 'http://www.opengis.net/wfs 
jar:file:/usr/local/tomcat8/webapps/geoserver/WEB-INF/lib/gt-xsd-wfs-25.0.jar!/org/geotools/wfs/v1_1/wfs.xsd
2022-06-09 15:24:19,880 DEBUG [org.geotools.xsd.impl] - Found override for 
http://www.opengis.net/wfs: 
jar:file:/usr/local/tomcat8/webapps/geoserver/WEB-INF/lib/gt-xsd-wfs-25.0.jar!/org/geotools/wfs/v1_1/wfs.xsd
 ==> 
jar:file:/usr/local/tomcat8/webapps/geoserver/WEB-INF/lib/gt-xsd-wfs-25.0.jar!/org/geotools/wfs/v1_1/wfs.xsd
2022-06-09 15:24:19,882 DEBUG [org.geotools.data.util] - CRSConverterFactory 
can be applied from Strings to CRS  only.
2022-06-09 15:24:19,882 DEBUG [org.geotools.data.util] - 
InterpolationConverterFactory can be applied from Strings to Interpolation only.
2022-06-09 15:24:19,885 DEBUG [org.geotools.process.factory] - Failed to locate 
the field false in class class org.geotools.process.vector.AggregateProcess
2022-06-09 15:24:19,885 DEBUG [org.geotools.process.factory] - Failed to locate 
the field false in class class java.lang.Boolean
2022-06-09 15:24:19,889 DEBUG [org.geotools.data.util] - CRSConverterFactory 
can be applied from Strings to CRS  only.
2022-06-09 15:24:19,889 DEBUG [org.geotools.data.util] - 
InterpolationConverterFactory can be applied from Strings to Interpolation only.
2022-06-09 15:24:19,889 DEBUG [org.geotools.data.util] - CRSConverterFactory 
can be applied from Strings to CRS  only.
2022-06-09 15:24:19,889 DEBUG [org.geotools.data.util] - 
InterpolationConverterFactory can be applied from Strings to Interpolation only.
2022-06-09 15:24:19,889 DEBUG [org.geotools.data.util] - CRSConverterFactory 
can be applied from Strings to CRS  only.
2022-06-09 15:24:19,889 DEBUG [org.geotools.data.util] - 
InterpolationConverterFactory can be applied from Strings to Interpolation  
only.
2022-06-09 15:24:19,889 DEBUG [org.geotools.xsd] - [ class java.lang.String ] 
is not of type interface org.opengis.filter.expression.PropertyName
2022-06-09 15:24:19,890 DEBUG [org.geotools.process.factory] - Failed to locate 
the field false in class class org.geotools.process.vector.AggregateProcess
2022-06-09 15:24:19,890 DEBUG [org.geotools.process.factory] - Failed to locate 
the field false in class class java.lang.Boolean
2022-06-09 15:24:19,890 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting SQL 
ComparisonFilter
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting PropertyName
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting 
LiteralExpression
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting 
LiteralExpression
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting PropertyName
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting PropertyName
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting PropertyName
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting PropertyName
2022-06-09 15:24:19,891 DEBUG [org.geotools.data.jdbc] - exporting PropertyName
2022-06-09 15:24:19,891 DEBUG [org.geotools.jdbc] - SELECT 
"surface","width",sum("length") AS gt_result_ FROM (SELECT * FROM 
"public"."myTable" WHERE strMatches("myField",'.*\b(131)\b.*') = true LIMIT 
100000) gt_limited_ GROUP BY "surface", "width"
2022-06-09 15:24:19,892 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
2022-06-09 15:24:19,893 ERROR [org.geoserver.wps.executor] - Process execution 
failed
org.geotools.process.ProcessException: java.io.IOException
        at 
org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:638)
        at 
org.geoserver.wps.executor.ProcessStartupFilter$ProcessStartupWrapper.execute(ProcessStartupFilter.java:50)
        at 
org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:223)
        at 
org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:191)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException
        at 
org.geotools.jdbc.JDBCDataStore.getAggregateValue(JDBCDataStore.java:1479)
        at 
org.geotools.jdbc.JDBCFeatureSource.handleVisitor(JDBCFeatureSource.java:694)
        at 
org.geotools.jdbc.JDBCFeatureStore.handleVisitor(JDBCFeatureStore.java:222)
        at 
org.geotools.data.store.ContentFeatureSource.accepts(ContentFeatureSource.java:776)
        at 
org.geotools.data.store.ContentFeatureCollection.accepts(ContentFeatureCollection.java:124)
        at 
org.geoserver.security.decorators.SecuredSimpleFeatureCollection.accepts(SecuredSimpleFeatureCollection.java:81)
        at 
org.geotools.feature.collection.DecoratingSimpleFeatureCollection.accepts(DecoratingSimpleFeatureCollection.java:59)
        at 
org.geotools.process.vector.AggregateProcess.handleGroupByVisitor(AggregateProcess.java:274)
        at 
org.geotools.process.vector.AggregateProcess.execute(AggregateProcess.java:154)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:622)
        ... 7 more
Caused by: org.postgresql.util.PSQLException: ERROR: function 
strmatches(character varying, unknown) does not exist
  Hint: No function matches the given name and argument types. You might need 
to add explicit type casts.
  Position: 108
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:322)
        at 
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:308)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:284)
        at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:236)
        at 
org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
        at 
org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
        at 
org.geotools.jdbc.JDBCDataStore.getAggregateValue(JDBCDataStore.java:1446)
        ... 20 more
2022-06-09 15:24:19,897 INFO [org.geoserver.wps] - 
Request: execute
    service = WPS
    version = 1.0.0
    baseUrl = http://bi.org/geoserver/
    identifier:
        value = gs:Aggregate
    dataInputs:
        input[0]:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@64343c6a (value: 
features, codeSpace: null)
            reference = net.opengis.wps10.impl.InputReferenceTypeImpl@4e630bf2 
(body: net.opengis.wfs.impl.GetFeatureTypeImpl@38681b99 (handle: null, service: 
WFS, version: 1.0.0, baseUrl: null, providedVersion: null, extendedProperties: 
{}) (maxFeatures: null, outputFormat: GML2, resultType: <unset>, 
traverseXlinkDepth: null, traverseXlinkExpiry: null, formatOptions: null, 
metadata: null, startIndex: null, viewParams: null), encoding: null, href: 
http://geoserver/wfs, method: POST, mimeType: text/xml, schema: null)input[0]:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@131dd853 (value: 
aggregationAttribute, codeSpace: null)
            data = net.opengis.wps10.impl.DataTypeImpl@560f7136input[0]:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@e5dc9e (value: 
function, codeSpace: null)
            data = net.opengis.wps10.impl.DataTypeImpl@7829abc8input[0]:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@58b2bde (value: 
singlePass, codeSpace: null)
            data = net.opengis.wps10.impl.DataTypeImpl@28207c98input[0]:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@68f442e (value: 
groupByAttributes, codeSpace: null)
            data = net.opengis.wps10.impl.DataTypeImpl@334dd8dcinput[0]:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@6f44c0b0 (value: 
groupByAttributes, codeSpace: null)
            data = net.opengis.wps10.impl.DataTypeImpl@442bb57c
    responseForm:
        rawDataOutput:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@38f937e3 (value: 
result, codeSpace: null)
            mimeType = application/json
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to