Hi all, I use a filter for retrieving WMS data from Geoserver 2.2.1:
lyr_city = new OpenLayers.Layer.WMS("City", "http://localhost:80/geoserver/us_admin/wms", { 'VERSION' : '1.1.0', layers: "us_admin:cities", format: "image/png", transparent: true, cql_filter: "INTERSECT(geom,POINT(-10647592.37403328 3453944.1579672312))" }, {isBaseLayer: false, visibility: true, sphericalMercator: true, } ); This returns well. But i need to pass the POINT from google autocompleter, so I use this: latlong = String(ads.d); longlat = latlong.split(","); long = String(longlat[1]); slong = long.replace(")", ""); lat = String(longlat[0]); slat = lat.replace("(", ""); position = new OpenLayers.LonLat(slong, slat); position.transform(wgs84, googleMercator); var mlat = String(position); mlatt = mlat.replace("lon=","") mlattt = mlatt.replace("lat=",""); mlatttt = mlattt.replace(","," "); query = new Array(); query[0] = "INTERSECT(geom, POINT("; query[1] = mlatttt; query[2] = "))"; lyr_city = new OpenLayers.Layer.WMS("City", "http://localhost:80/geoserver/us_admin/wms", { 'VERSION' : '1.1.0', layers: "us_admin:cities", format: "image/png", transparent: true, cql_filter: query.join("") }, {isBaseLayer: false, visibility: true, sphericalMercator: true, } ); where mlatttt returns the correct location, but I am getting in Geoserver log: 2013-01-21 23:51:30,022 ERROR [geoserver.ows] - org.geoserver.platform.ServiceException: Could not parse CQL filter list. at org.geoserver.ows.kvp.CQLFilterKvpParser.parse(CQLFilterKvpParser.java:29) at org.geoserver.ows.util.KvpUtils.parse(KvpUtils.java:453) at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:1386) at org.geoserver.ows.Dispatcher.init(Dispatcher.java:319) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:243) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173) at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:97) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.geotools.filter.text.cql2.CQLException: Function not found. Parsing : INTERSECT(geom, POINT(-10584102.44905893 3441786.6193579845)). at org.geotools.filter.text.commons.AbstractFilterBuilder.buildFunction(AbstractFilterBuilder.java:1284) at org.geotools.filter.text.ecql.ECQLCompiler.build(ECQLCompiler.java:264) at org.geotools.filter.text.ecql.ECQLCompiler.jjtreeCloseNodeScope(ECQLCompiler.java:190) at org.geotools.filter.text.generated.parsers.ECQLParser.Function(ECQLParser.java:2961) at org.geotools.filter.text.generated.parsers.ECQLParser.RoutineInvocationGeneric(ECQLParser.java:1350) at org.geotools.filter.text.generated.parsers.ECQLParser.RoutineInvocation(ECQLParser.java:637) at org.geotools.filter.text.generated.parsers.ECQLParser.BooleanPrimary(ECQLParser.java:277) at org.geotools.filter.text.generated.parsers.ECQLParser.BooleanFactor(ECQLParser.java:247) at org.geotools.filter.text.generated.parsers.ECQLParser.BooleanTerm(ECQLParser.java:172) at org.geotools.filter.text.generated.parsers.ECQLParser.BooleanValueExpression(ECQLParser.java:125) at org.geotools.filter.text.generated.parsers.ECQLParser.SearchCondition(ECQLParser.java:116) at org.geotools.filter.text.generated.parsers.ECQLParser.SequenceOfSearchConditions(ECQLParser.java:99) at org.geotools.filter.text.generated.parsers.ECQLParser.FilterListCompilationUnit(ECQLParser.java:87) at org.geotools.filter.text.ecql.ECQLCompiler.compileFilterList(ECQLCompiler.java:126) at org.geotools.filter.text.commons.CompilerUtil.parseFilterList(CompilerUtil.java:217) at org.geotools.filter.text.ecql.ECQL.toFilterList(ECQL.java:193) at org.geotools.filter.text.ecql.ECQL.toFilterList(ECQL.java:175) at org.geoserver.util.XCQL.toFilterList(XCQL.java:32) at org.geoserver.ows.kvp.CQLFilterKvpParser.parse(CQLFilterKvpParser.java:27) ... 81 more Any clue? Thanks! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/org-geotools-filter-text-cql2-CQLException-Function-not-found-Parsing-INTERSECT-geom-POINT-10647592--tp5028854.html Sent from the GeoServer - User mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users