|
From: Sexton M. <Mic...@ga...> - 2018-12-20 10:24:50
|
Thanks Nuno, is it best practice to use my description of the problem from the mailing list in the Jira? Michael Get Outlook for iOS<https://aka.ms/o0ukef> ________________________________ From: Nuno Oliveira <nun...@ge...> Sent: Thursday, December 20, 2018 9:18 pm To: Sexton Michael; geo...@li... Subject: Re: [Geoserver-users] App-schema: mapping simple attribute as a feature link [SEC=UNCLASSIFIED] This is a bug, as far I can tell there is no much (nothing) you can do on the mappings to avoid it. I would say go ahead and open a Jira ticket for it. On Tue, 2018-12-18 at 00:04 +0000, Sexton Michael wrote: Hi Nuno, The following is the full stack trace from the call (http://localhost:28080/er/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=er:MineralOccurrence&featureId=er.mineraloccurrence.2004416) from start to finish. 18 Dec 11:01:27 INFO [org.geoserver.wfs] - Request: getServiceInfo 18 Dec 11:01:27 INFO [org.geoserver.wfs] - Request: getFeature service = WFS version = 1.1.0 baseUrl = http://localhost:28080/ query[0]: filter = [ er.mineraloccurrence.2004416 ] typeName[0] = {http://xmlns.earthresourceml.org/EarthResource/2.0}MineralOccurrence outputFormat = text/xml; subtype=gml/3.1.1 resultType = results 18 Dec 11:01:27 DEBUG [org.geotools.xml] - building schema for schema: http://xmlns.earthresourceml.org/EarthResource/2.0 18 Dec 11:01:27 DEBUG [org.geotools.xml] - building schema for schema: http://www.opengis.net/wfs 18 Dec 11:01:28 DEBUG [org.geotools.xml] - building schema for schema: http://www.opengis.net/ows 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsGetCapabilities.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsServiceIdentification.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsDataIdentification.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsCommon.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: ows19115subset.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsServiceProvider.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: ows19115subset.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsOperationsMetadata.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsCommon.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: ows19115subset.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsExceptionReport.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - building schema for schema: http://www.opengis.net/ogc 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: filterAll.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: filter.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: filterAll.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: expr.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: sort.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: filterAll.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: sort.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: expr.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: filterCapabilities.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: expr.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: sort.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: filterCapabilities.xsd. 18 Dec 11:01:28 TRACE [org.geotools.data.complex.filter] - fid mapping expression is GML_ID 18 Dec 11:01:28 TRACE [org.geotools.data.complex.filter] - Adding unmapped fid filter [ GML_ID = er.mineraloccurrence.2004416 ] 18 Dec 11:01:28 DEBUG [org.geotools.data.complex.filter] - unrolled fid filter is [[ GML_ID = er.mineraloccurrence.2004416 ]] 18 Dec 11:01:28 TRACE [org.geotools.factory] - ENTRY (FeatureTypeFactory, FEATURE_TYPE_FACTORY) 18 Dec 11:01:28 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation Optional. 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - CREATE CONNECTION 18 Dec 11:01:28 DEBUG [org.geotools.filter] - exporting SQL ComparisonFilter 18 Dec 11:01:28 DEBUG [org.geotools.filter] - exporting PropertyName 18 Dec 11:01:28 DEBUG [org.geotools.jdbc.JoiningJDBCFeatureSource] - SELECT * FROM (SELECT MSEXTON1.MV_ER_MINERALOCCURRENCE.ENO,MSEXTON1.MV_ER_MINERALOCCURRENCE.GML_ID,MSEXTON1.MV_ER_MINERALOCCURRENCE.IDENTIFIER,MSEXTON1.MV_ER_MINERALOCCURRENCE.IDENTIFIER_CODESPACE,MSEXTON1.MV_ER_MINERALOCCURRENCE.NAME,MSEXTON1.MV_ER_MINERALOCCURRENCE.OBSERVATIONMETHOD_DEF,MSEXTON1.MV_ER_MINERALOCCURRENCE.OBSERVATIONMETHOD,MSEXTON1.MV_ER_MINERALOCCURRENCE.OBSERVATIONMETHOD_ID,MSEXTON1.MV_ER_MINERALOCCURRENCE.PURPOSE,MSEXTON1.MV_ER_MINERALOCCURRENCE.PARENT FROM MSEXTON1.MV_ER_MINERALOCCURRENCE INNER JOIN ( SELECT DISTINCT MV_ER_MINERALOCCURRENCE.GML_ID FROM MSEXTON1.MV_ER_MINERALOCCURRENCE LEFT JOIN MSEXTON1.MV_ER_SOURCEREFERENCE MV_1 ON MV_ER_MINERALOCCURRENCE.ENO = MV_1.ENO WHERE GML_ID = ? ) TEMP_ALIAS_USED_FOR_FILTER ON ( MV_ER_MINERALOCCURRENCE.GML_ID = TEMP_ALIAS_USED_FOR_FILTER.GML_ID ) ORDER BY MSEXTON1.MV_ER_MINERALOCCURRENCE.GML_ID ASC) WHERE ROWNUM <= 1000000 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - 1 = er.mineraloccurrence.2004416 18 Dec 11:01:28 TRACE [org.geotools.data.complex.filter] - ENTRY FeatureImpl:MineralOccurrence<MineralOccurrenceType id=er.mineraloccurrence.2004416>=[] gml:identifier http://pid.geoscience.gov.au/id/feature/ga/er/mineraloccurrence/2004416 null null 18 Dec 11:01:28 TRACE [org.geotools.data.complex.filter] - ENTRY FeatureImpl:MineralOccurrence<MineralOccurrenceType id=er.mineraloccurrence.2004416>=[ComplexAttributeImpl:identifier<CodeWithAuthorityType>=[AttributeImpl:simpleContent<string>=http://pid.geoscience.gov.au/id/feature/ga/er/mineraloccurrence/2004416]] gml:name Mt Gunson null null 18 Dec 11:01:28 TRACE [org.geotools.factory] - ENTRY (FeatureTypeFactory, FEATURE_TYPE_FACTORY) 18 Dec 11:01:28 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation Optional. 18 Dec 11:01:28 DEBUG [org.geotools.filter] - exporting SQL ComparisonFilter 18 Dec 11:01:28 DEBUG [org.geotools.filter] - exporting PropertyName 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - SELECT * FROM (SELECT MSEXTON1.MV_ER_MINERALOCCURRENCE.ENO,MSEXTON1.MV_ER_MINERALOCCURRENCE.GML_ID,MSEXTON1.MV_ER_MINERALOCCURRENCE.IDENTIFIER,MSEXTON1.MV_ER_MINERALOCCURRENCE.IDENTIFIER_CODESPACE,MSEXTON1.MV_ER_MINERALOCCURRENCE.NAME,MSEXTON1.MV_ER_MINERALOCCURRENCE.OBSERVATIONMETHOD_DEF,MSEXTON1.MV_ER_MINERALOCCURRENCE.OBSERVATIONMETHOD,MSEXTON1.MV_ER_MINERALOCCURRENCE.OBSERVATIONMETHOD_ID,MSEXTON1.MV_ER_MINERALOCCURRENCE.PURPOSE,MSEXTON1.MV_ER_MINERALOCCURRENCE.PARENT FROM MSEXTON1.MV_ER_MINERALOCCURRENCE INNER JOIN ( SELECT DISTINCT MV_ER_MINERALOCCURRENCE.GML_ID FROM MSEXTON1.MV_ER_MINERALOCCURRENCE LEFT JOIN MSEXTON1.MV_ER_SOURCEREFERENCE MV_1 ON MV_ER_MINERALOCCURRENCE.ENO = MV_1.ENO WHERE GML_ID = ? ) TEMP_ALIAS_USED_FOR_FILTER ON ( MV_ER_MINERALOCCURRENCE.GML_ID = TEMP_ALIAS_USED_FOR_FILTER.GML_ID ) ORDER BY MSEXTON1.MV_ER_MINERALOCCURRENCE.GML_ID ASC) WHERE ROWNUM <= 1000000 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - CREATE CONNECTION 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - Getting information about primary keys of MV_ER_SOURCEREFERENCE 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - Getting information about unique indexes of MV_ER_SOURCEREFERENCE 18 Dec 11:01:28 INFO [org.geotools.jdbc] - No primary key or unique index found for MV_ER_SOURCEREFERENCE. 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION 18 Dec 11:01:28 TRACE [org.geotools.factory] - ENTRY (FeatureTypeFactory, FEATURE_TYPE_FACTORY) 18 Dec 11:01:28 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation Optional. 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - CREATE CONNECTION 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION 18 Dec 11:01:28 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION 18 Dec 11:01:28 INFO [org.vfny.geoserver.servlets] - OutputStream was successfully aborted. 18 Dec 11:01:28 ERROR [org.geoserver.ows] - java.lang.RuntimeException: java.lang.RuntimeException: Error applying mapping with targetAttribute er:sourceReference at org.geotools.data.complex.AbstractMappingFeatureIterator.next(AbstractMappingFeatureIterator.java:408) at org.geoserver.security.decorators.SecuredFeatureIterator.next(SecuredFeatureIterator.java:35) at org.geotools.feature.collection.BridgeIterator.next(BridgeIterator.java:31) at org.geotools.feature.collection.BridgeIterator.next(BridgeIterator.java:17) at org.geotools.xml.Encoder.encode(Encoder.java:730) at org.geotools.xml.Encoder.encode(Encoder.java:561) at org.geoserver.wfs.xml.GML3OutputFormat.encode(GML3OutputFormat.java:379) at org.geoserver.wfs.xml.GML3OutputFormat.complexFeatureStreamIntercept(GML3OutputFormat.java:405) at org.geoserver.wfs.xml.GML3OutputFormat.write(GML3OutputFormat.java:309) at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:185) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:1032) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:268) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:174) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:26) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:69) at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:73) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:66) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:51) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:81) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:141) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: Error applying mapping with targetAttribute er:sourceReference at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:1396) at org.geotools.data.complex.AbstractMappingFeatureIterator.next(AbstractMappingFeatureIterator.java:405) ... 100 more Caused by: java.io.IOException at org.geotools.jdbc.JoiningJDBCFeatureSource.getJoiningReaderInternal(JoiningJDBCFeatureSource.java:1232) at org.geotools.data.complex.DataAccessMappingFeatureIterator.extractMultipleValues(DataAccessMappingFeatureIterator.java:895) at org.geotools.data.complex.DataAccessMappingFeatureIterator.setAttributeValue(DataAccessMappingFeatureIterator.java:653) at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:1345) ... 101 more Caused by: java.lang.ClassCastException: org.geotools.data.oracle.OracleDialect cannot be cast to org.geotools.jdbc.BasicSQLDialect at org.geotools.jdbc.JDBCFeatureReader.<init>(JDBCFeatureReader.java:141) at org.geotools.jdbc.JoiningJDBCFeatureSource.getJoiningReaderInternal(JoiningJDBCFeatureSource.java:1227) ... 104 more 18 Dec 11:01:28 DEBUG [org.geotools.xml] - building schema for schema: http://www.opengis.net/ows 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsGetCapabilities.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsServiceIdentification.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsDataIdentification.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsCommon.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: ows19115subset.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsServiceProvider.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: ows19115subset.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsOperationsMetadata.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsCommon.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: ows19115subset.xsd. 18 Dec 11:01:28 DEBUG [org.geotools.xml] - Could not locate schema for: owsExceptionReport.xsd. Thanks for your help MichaelUNCLASSIFIED Classified by nun...@ge... From: Nuno Oliveira <nun...@ge...> Sent: Friday, 14 December 2018 9:05 PM To: Sexton Michael <Mic...@ga...>; geo...@li... Subject: Re: [Geoserver-users] App-schema: mapping simple attribute as a feature link [SEC=UNCLASSIFIED] Hi, Ouch, your dependencies and configuration looks fine, this looks like some cast error when generating the SQL query. This looks like a bug \ error specific to Oracle, you should have a stack trace in the log files, can you share it with us ? Best regards, Nuno Oliveira On Thu, 2018-12-13 at 23:14 +0000, Sexton Michael wrote: Nuno, That looks like exactly what I am after, thank you. However, in implementing it I encounter another problem: <ServiceException> java.lang.RuntimeException: java.lang.RuntimeException: Error applying mapping with targetAttribute er:sourceReferencejava.lang.RuntimeException: Error applying mapping with targetAttribute er:sourceReferenceError applying mapping with targetAttribute er:sourceReferenceorg.geotools.data.oracle.OracleDialect cannot be cast to org.geotools.jdbc.BasicSQLDialect </ServiceException> For reference, my Mapping file data store is this <DataStore> <id>datastore</id> <parameters> <Parameter> <name>dbtype</name> <value>Oracle</value> </Parameter> <Parameter> <name>jndiReferenceName</name> <value>jdbc/earthresource-ora</value> </Parameter> <Parameter> <name>schema</name> <value>EARTHRESOURCE</value> </Parameter> <Parameter> <name>Expose primary keys</name> <value>true</value> </Parameter> </parameters> </DataStore> JNDI config is (with identifying parameters removed) <Resource name="jdbc/earthresource-ora" auth="Container" type="javax.sql.DataSource" username="#####" password="#####" factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@#####:1234/#####" maxActive="15" maxIdle="5" maxWait="10000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" testOnBorrow="true" defaultAutoCommit="false" validationQuery="SELECT 1 FROM DUAL" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000" minEvictableIdleTimeMillis="60000" numTestsPerEvictionRun="5" accessToUnderlyingConnectionAllowed="true"/> And dependencies in pom.xml are <dependencies> <dependency> <groupId>org.geoserver</groupId> <artifactId>gs-main</artifactId> </dependency> <dependency> <groupId>org.geoserver.web</groupId> <artifactId>gs-web-app</artifactId> <version>${gs.version}</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-app-schema</artifactId> <version>${gt.version}</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-process</artifactId> </dependency> <dependency> <groupId>org.geoserver</groupId> <artifactId>gs-xslt</artifactId> <version>${gs.version}</version> </dependency> <dependency> <groupId>org.geotools.jdbc</groupId> <artifactId>gt-jdbc-oracle</artifactId> </dependency> <dependency> <groupId>org.geoserver.extension</groupId> <artifactId>gs-oracle</artifactId> <version>${gs.version}</version> </dependency> <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-jdbc</artifactId> <version>7.0.28</version> </dependency> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc7</artifactId> </dependency> </dependencies> Is there some other configuration necessary to get this to work? Kind regards, Michael From: Nuno Oliveira [mailto:nun...@ge...] Sent: Thursday, 13 December 2018 8:12 PM To: Sexton Michael; geo...@li...<mailto:geo...@li...> Subject: Re: [Geoserver-users] App-schema: mapping simple attribute as a feature link [SEC=UNCLASSIFIED] Hi, Interesting use case indeed, er:MineralOccurrence is not a simple property so it seems that App-Schema does handle it correctly. Quick suggestion: give it a quick try with the recently introduced syntax for SQL mappings with cardinality 0\2..N: https://docs.geoserver.org/stable/en/user/data/app-schema/mapping-file.html#attributes-with-cardinality-1-n Best regards, Nuno Oliveira On Thu, 2018-12-13 at 02:25 +0000, Sexton Michael wrote: Hi I'm following the example mapping file here to map a simple attribute field from another table multiple times: https://github.com/geoserver/geoserver/blob/master/src/extension/app-schema/app-schema-test/src/test/resources/test-data/SimpleAttributeFeatureChainTest.xml This is the mapping file: <typeMappings> <FeatureTypeMapping> <sourceDataStore>datastore</sourceDataStore> <sourceType>MV_ER_MINERALOCCURRENCE</sourceType> <targetElement>er:MineralOccurrence</targetElement> <attributeMappings> <AttributeMapping> <targetAttribute>er:MineralOccurrence</targetAttribute> <idExpression> <OCQL>GML_ID</OCQL> </idExpression> </AttributeMapping> <AttributeMapping> <targetAttribute>gml:identifier</targetAttribute> <sourceExpression> <OCQL>IDENTIFIER</OCQL> </sourceExpression> <ClientProperty> <name>codeSpace</name> <value>IDENTIFIER_CODESPACE</value> </ClientProperty> </AttributeMapping> <AttributeMapping> <targetAttribute>gml:name</targetAttribute> <sourceExpression> <OCQL>NAME</OCQL> </sourceExpression> </AttributeMapping> <AttributeMapping> <targetAttribute>er:sourceReference</targetAttribute> <sourceExpression> <OCQL>ENO</OCQL> <linkElement>SOURCEREFERENCE</linkElement> <linkField>FEATURE_LINK[2]</linkField> </sourceExpression> </AttributeMapping> </attributeMappings> </FeatureTypeMapping> <FeatureTypeMapping> <mappingName>SOURCEREFERENCE</mappingName> <sourceDataStore>datastore</sourceDataStore> <sourceType>MV_ER_SOURCEREFERENCE</sourceType> <targetElement>er:sourceReference</targetElement> <attributeMappings> <AttributeMapping> <targetAttribute>er:sourceReference</targetAttribute> <ClientProperty> <name>xlink:href</name> <value>URI</value> </ClientProperty> <ClientProperty> <name>xlink:title</name> <value>TITLE</value> </ClientProperty> </AttributeMapping> <AttributeMapping> <targetAttribute>FEATURE_LINK[2]</targetAttribute> <sourceExpression> <OCQL>ENO</OCQL> </sourceExpression> </AttributeMapping> </attributeMappings> </FeatureTypeMapping> The sourceReference attribute is defined in http://schemas.earthresourceml.org/2.0/mineralOccurrence.xsd as: <element maxOccurs="unbounded" name="sourceReference" nillable="true"> <annotation> <appinfo> <targetElement xmlns="http://www.opengis.net/gml/3.2">gmd2:CI_Citation</targetElement> </appinfo> </annotation> <complexType> <complexContent> <extension base="gml:AbstractMetadataPropertyType"> <sequence/> <attributeGroup ref="gml:AssociationAttributeGroup"/> </extension> </complexContent> </complexType> </element> But I get this error: Error occurred getting featuresjava.util.NoSuchElementException: No top level element found in schemas: {http://xmlns.earthresourceml.org/EarthResource/2.0}sourceReferenceNo top level element found in schemas: {http://xmlns.earthresourceml.org/EarthResource/2.0}sourceReference I've seen this error before, when trying to map gml:metadataProperty, which I managed to get around using the targetAttributeNode, eg: <mappingName>METADATA</mappingName> <sourceDataStore>datastore</sourceDataStore> <sourceType>MV_CIT_CI_CITATION</sourceType> <targetElement>gml:metaDataProperty</targetElement> <attributeMappings> <AttributeMapping> <targetAttribute>gml:metaDataProperty/gml:GenericMetaData</targetAttribute> <targetAttributeNode>mrl:LI_Source_PropertyType</targetAttributeNode> </AttributeMapping> But in the case of er:soruceReference, there is no node to map to. It's a reference intended to have xlink:href and xlink:title attributes. Is there a solution here? Thanks Michael Sexton Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks. ------------------------------------------------------------------------------------------------------------------------- _______________________________________________ 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 Geo...@li...<mailto:Geo...@li...> https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Regards, Nuno Oliveira == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Nuno Miguel Carvalho Oliveira @nmcoliveira Software Engineer GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati "GDPR"), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) ? un dato la cui conoscenza ? riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le ? giunto per errore, ? tenuta/o a cancellarlo, ogni altra operazione ? illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 "GDPR" - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail. Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks. ------------------------------------------------------------------------------------------------------------------------- -- Regards, Nuno Oliveira == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Nuno Miguel Carvalho Oliveira @nmcoliveira Software Engineer GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati "GDPR"), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) ? un dato la cui conoscenza ? riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le ? giunto per errore, ? tenuta/o a cancellarlo, ogni altra operazione ? illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 "GDPR" - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail. Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks. ------------------------------------------------------------------------------------------------------------------------- -- Regards, Nuno Oliveira == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Nuno Miguel Carvalho Oliveira @nmcoliveira Software Engineer GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati "GDPR"), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) ? un dato la cui conoscenza ? riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le ? giunto per errore, ? tenuta/o a cancellarlo, ogni altra operazione ? illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 "GDPR" - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail. Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks. ------------------------------------------------------------------------------------------------------------------------- |