[Geoserver-users] ORA-01427 in RC1, app-schema

Hi,

I have installed 2.1-RC1 recently, and I have copied a configuration that use the app-schema and oracle extensions from beta3 to RC1.

The configuration nests features, and selects from various views and tables.

It works fine in beta3, but RC1 fails with “java.lang.RuntimeException: java.sql.SQLException: ORA-01427: single-row subquery returns more than one row”.

Does anyone know of changes from beta3 to RC1 that would explain the change in behaviour?

Thanks in advance!

Kind regards,
Morten Lindegaard

Morten,

please turn on verbose logging and let us know if you can see the SQL that is generated when you get this error.

Can we please see your app-schema mapping file?

Kind regards,
Ben.

On 10/02/11 20:22, Lindegaard, Morten wrote:

Hi,

I have installed 2.1-RC1 recently, and I have copied a configuration that use the app-schema and oracle extensions from beta3 to RC1.

The configuration nests features, and selects from various views and tables.

It works fine in beta3, but RC1 fails with "java.lang.RuntimeException: java.sql.SQLException: ORA-01427: single-row subquery returns more than one row".

Does anyone know of changes from beta3 to RC1 that would explain the change in behaviour?

Thanks in advance!

Kind regards,
  Morten Lindegaard

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Morten, here are some suggestions from a colleague:

On 11/02/11 11:21, Warren, Peter (CESRE, North Ryde) wrote:
> Does Geoserver build SQL with subqueries? I wouldn't have thought so. If it doesn't then this is likely an error in a view definition.
> If it does build SQL with subqueries then this could be caused by duplicate feature_IDs used in the chaining.
> Note: We really don't have much to go on here so I could be wrong.

On 11/02/11 10:30, Ben Caradoc-Davies wrote:

Morten,

please turn on verbose logging and let us know if you can see the SQL
that is generated when you get this error.

Can we please see your app-schema mapping file?

Kind regards,
Ben.

On 10/02/11 20:22, Lindegaard, Morten wrote:

Hi,

I have installed 2.1-RC1 recently, and I have copied a configuration that use the app-schema and oracle extensions from beta3 to RC1.

The configuration nests features, and selects from various views and tables.

It works fine in beta3, but RC1 fails with "java.lang.RuntimeException: java.sql.SQLException: ORA-01427: single-row subquery returns more than one row".

Does anyone know of changes from beta3 to RC1 that would explain the change in behaviour?

Thanks in advance!

Kind regards,
   Morten Lindegaard

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

[I'm putting this discussion back on the list where it belongs. There are a lot more on the list who might be able to help.]

Morten,

turning on VERBOSE_LOGGING should show you all SQL statements. They should be on lines containing "[geotools.jdbc]". You might have to reload the GeoServer servlet (logging can be a bit twitchy). It looks like your SQL error has gone away.

Rini thinks you should be seeing more in your error messages (see below). Niels added these diagnostics so might be able to help.

Kind regards,
Ben.

-------- Original Message --------
Subject: RE: SV: [ExternalEmail] Re: [Geoserver-users] ORA-01427 in RC1, app-schema
Date: Tue, 15 Feb 2011 10:36:54 +0800
From: Angreani, Rini (CESRE, Kensington) <Rini.Angreani@anonymised.com>

Hmm, the error is there to isolate the problem to an attribute mapping.
It was done for catching invalid attribute mapping, e.g. if the column it's mapped to doesn't exist.
But, it should have the original exception printed as well, e.g. something like:

java.lang.RuntimeException: Error applying mapping with targetAttribute gml:name[4]
Error applying mapping with targetAttribute gml:name[4]
Could not find working property accessor for attribute (DESCRIPTIO) in object (SimpleFeatureImpl:InvalidColumnGeologicUnit=[SimpleFeatureImpl.Attribute: NAME&amp;lt;NAME id=gu.93&amp;gt;=Yaugher Volcanic Group, SimpleFeatureImpl.Attribute: CODE&amp;lt;CODE id=gu.93&amp;gt;=-Py, SimpleFeatureImpl.Attribute: URN&amp;lt;URN id=gu.93&amp;gt;=urn:x-test:GeologicUnit:16777549126931093, SimpleFeatureImpl.Attribute: DESCRIPTION&amp;lt;DESCRIPTION id=gu.93&amp;gt;=Olivine basalt, tuff, microgabbro, minor sedimentary rocks])
No value for xpath: DESCRIPTIO

So, without the full stack trace, it's hard to determine the cause.

On 14/02/11 18:21, Lindegaard, Morten wrote:

Hi Ben,

Thank you for the suggestions!

I used verbose logging, but I didn't find the SQL. I'll take a closer look at the view.

I have attached a zip-file containing the workspace with my mapping files.

However, I'm unable to reproduce the ORA-01427 error at the moment. So I'm afraid it is no help. Since I tried various things to fix the error, I have most likely changed something in the mapping files and forgotten about it.

Right now, I run into this error:
java.lang.RuntimeException: Error applying mapping with targetAttribute kms:harSamletFastEjendom
Error applying mapping with targetAttribute kms:harSamletFastEjendom
Error applying mapping with targetAttribute FEATURE_LINK
Index: 0, Size: 0

So that's what I'm trying to get around now...

If there is anything in my mapping files that looks suspicious at a glance, I'll be happy to know.

Kind regards,
  Morten

Miljøministeriet, Kort& Matrikelstyrelsen, direkte tlf. 72545506. Officiel kommunikation bedes dirigeret via e-mail kms@anonymised.com eller telefon 72545000

-----Oprindelig meddelelse-----
Fra: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@anonymised.com]
Sendt: 11. februar 2011 05:56
Til: Lindegaard, Morten
Cc: geoserver-users@lists.sourceforge.net
Emne: Re: [ExternalEmail] Re: [Geoserver-users] ORA-01427 in RC1, app-schema

Morten, here are some suggestions from a colleague:

On 11/02/11 11:21, Warren, Peter (CESRE, North Ryde) wrote:
  > Does Geoserver build SQL with subqueries? I wouldn't have thought
so. If it doesn't then this is likely an error in a view definition.
  > If it does build SQL with subqueries then this could be caused by
duplicate feature_IDs used in the chaining.
  > Note: We really don't have much to go on here so I could be wrong.

On 11/02/11 10:30, Ben Caradoc-Davies wrote:

Morten,

please turn on verbose logging and let us know if you can see the SQL
that is generated when you get this error.

Can we please see your app-schema mapping file?

Kind regards,
Ben.

On 10/02/11 20:22, Lindegaard, Morten wrote:

Hi,

I have installed 2.1-RC1 recently, and I have copied a configuration that use the app-schema and oracle extensions from beta3 to RC1.

The configuration nests features, and selects from various views and tables.

It works fine in beta3, but RC1 fails with "java.lang.RuntimeException: java.sql.SQLException: ORA-01427: single-row subquery returns more than one row".

Does anyone know of changes from beta3 to RC1 that would explain the change in behaviour?

Thanks in advance!

Kind regards,
    Morten Lindegaard

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Hi Ben,

Yes, the original SQL error has gone away. However, it might be because of more immediate errors.

When I use GeoServer 2.1 beta 3, my configuration seems to give the desired results.

The query
http://localhost:8080/geoserver21b3/kms/wfs?version=1.1.0&service=WFS&request=GetFeature&typename=kms:Jordstykke&maxfeatures=4&filter=<Filter%20xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>kms:featureID</PropertyName><Literal>1613974</Literal></PropertyIsEqualTo></Filter>

yields a response with data in GML, and the following is in the log:

2011-02-16 13:17:35,337 INFO [geoserver.wfs] -
Request: getFeature
  handle = null
  service = WFS
  version = 1.1.0
  baseUrl = http://localhost:8080/geoserver21b3/
  providedVersion = null
  extendedProperties = {}
  query = [net.opengis.wfs.impl.QueryTypeImpl@anonymised.com (group: null, propertyName: null, function: null, filter: [ kms:featureID = 1613974 ], sortBy: null, featureVersion: null, handle: null, srsName: null, typeName: [{http://schemas.kms.dk/wfs\}Jordstykke])]
  maxFeatures = 4
  outputFormat = text/xml; subtype=gml/3.1.1
  resultType = results
  traverseXlinkDepth = null
  traverseXlinkExpiry = null
  formatOptions = {}
  metadata = null

I then use the same workspace configuration in GeoServer 2.1 RC 1, and the query results in an error that puts the below entries in the log.

I had expected that I would have been able to simply copy a configuration from beta 3 to RC 1.

Kind regards,
Morten

2011-02-16 12:53:05,476 DEBUG [geoserver.requests] - Query is net.opengis.wfs.impl.QueryTypeImpl@anonymised.com (group: , propertyName: , function: null, filter: [ kms:featureID = 1613974 ], sortBy: , featureVersion: null, handle: null, srsName: null, typeName: [{http://schemas.kms.dk/wfs\}Jordstykke])
To gt2: Query:
   feature type: Jordstykke
   filter: [ kms:featureID = 1613974 ]
   [properties: ALL ]
2011-02-16 12:53:05,476 DEBUG [geotools.jdbc] - CREATE CONNECTION
2011-02-16 12:53:05,476 TRACE [geotools.core] - ENTRY 14
2011-02-16 12:53:05,476 DEBUG [geotools.filter] - exporting SQL ComparisonFilter
2011-02-16 12:53:05,476 DEBUG [geotools.filter] - exporting PropertyName
2011-02-16 12:53:05,476 DEBUG [geotools.jdbc] - SELECT KFID,UUID,FEATUREID,FEATURETYPE,FEATURECODE,DATASETIDENTIFIER,DATAQUALITYSPECIFICATION,DATAQUALITYSTATEMENT,DATAQUALITYDESCRIPTION,DATAQUALITYPROCESSOR,DATAQUALITYRESPONSIBLEPARTY,TIMEOFCREATION,TIMEOFPUBLICATION,TIMEOFREVISION,ESR_EJENDOMSNUMMER,KMS_SAGSID,KMS_JOURNALNUMMER,REGISTRERINGSDATO,EJERLAVSNAVN,LANDSEJERLAVSKODE,MATRIKELNUMMER,FAELLESLOD,MODERJORDSTYKKE,SUPMSAGSID,SKELFORRETNINGSSAGSID,REGISTRERETAREAL,AREALBEREGN,VEJAREAL,VEJAREALBEREGN,VANDAREALBEREGN,AREALTYPE,REGIONSKODE,REGIONSNAVN,KOMMUNEKODE,KOMMUNENAVN,SOGNEKODE,SOGNENAVN,RETSKREDSKODE,RETSKREDSNAVN,SURFACEPROPERTY as SURFACEPROPERTY FROM LDS_2.KF_JORDSTYKKE_V WHERE FEATUREID = ?
2011-02-16 12:53:05,476 DEBUG [geotools.jdbc] - 1 = 1613974
2011-02-16 12:53:05,617 DEBUG [geotools.jdbc] - CREATE CONNECTION
2011-02-16 12:53:05,695 TRACE [geotools.core] - ENTRY -12.345
2011-02-16 12:53:05,695 DEBUG [geotools.jdbc] - SELECT KFID,UUID,FEATUREID,FEATURETYPE,FEATURECODE,DATASETIDENTIFIER,DATAQUALITYSPECIFICATION,DATAQUALITYSTATEMENT,DATAQUALITYDESCRIPTION,DATAQUALITYPROCESSOR,DATAQUALITYRESPONSIBLEPARTY,TIMEOFCREATION,TIMEOFPUBLICATION,TIMEOFREVISION,ESR_EJENDOMSNUMMER,KMS_SAGSID,KMS_JOURNALNUMMER,REGISTRERINGSDATO,EJERLAVSNAVN,LANDSEJERLAVSKODE,MATRIKELNUMMER,FAELLESLOD,MODERJORDSTYKKE,SUPMSAGSID,SKELFORRETNINGSSAGSID,REGISTRERETAREAL,AREALBEREGN,VEJAREAL,VEJAREALBEREGN,VANDAREALBEREGN,AREALTYPE,REGIONSKODE,REGIONSNAVN,KOMMUNEKODE,KOMMUNENAVN,SOGNEKODE,SOGNENAVN,RETSKREDSKODE,RETSKREDSNAVN,SURFACEPROPERTY as SURFACEPROPERTY FROM LDS_2.KF_JORDSTYKKE_V WHERE 0 = 1
2011-02-16 12:53:05,710 WARN [data.complex] - This shouldn't have happened.There should be at least 1 features with id='KF_JORDSTYKKE_V.fid-58777fea_12e2decb235_-7fdf'.
2011-02-16 12:53:05,710 DEBUG [geotools.jdbc] - CLOSE CONNECTION
2011-02-16 12:53:05,710 ERROR [geoserver.ows] -
java.lang.RuntimeException: Error applying mapping with targetAttribute kms:featureID
  at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:739)
  at org.geotools.data.complex.AbstractMappingFeatureIterator.next(AbstractMappingFeatureIterator.java:171)
  at org.geotools.data.complex.MappingFeatureCollection.size(MappingFeatureCollection.java:300)
  at org.geoserver.wfs.GetFeature.run(GetFeature.java:372)
  at org.geoserver.wfs.DefaultWebFeatureService.getFeature(DefaultWebFeatureService.java:114)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
  at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:51)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
  at $Proxy95.getFeature(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:624)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:229)
  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:875)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:68)
  at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
  at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:39)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:48)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
  at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
  at java.util.ArrayList.RangeCheck(Unknown Source)
  at java.util.ArrayList.get(Unknown Source)
  at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:736)
  ... 155 more

-----Oprindelig meddelelse-----
Fra: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@anonymised.com]
Sendt: 15. februar 2011 03:51
Til: Lindegaard, Morten
Cc: geoserver-users@lists.sourceforge.net
Emne: Re: SV: [ExternalEmail] Re: [Geoserver-users] ORA-01427 in RC1, app-schema

[I'm putting this discussion back on the list where it belongs. There
are a lot more on the list who might be able to help.]

Morten,

turning on VERBOSE_LOGGING should show you all SQL statements. They
should be on lines containing "[geotools.jdbc]". You might have to
reload the GeoServer servlet (logging can be a bit twitchy). It looks
like your SQL error has gone away.

Rini thinks you should be seeing more in your error messages (see
below). Niels added these diagnostics so might be able to help.

Kind regards,
Ben.

-------- Original Message --------
Subject: RE: SV: [ExternalEmail] Re: [Geoserver-users] ORA-01427 in RC1,
app-schema
Date: Tue, 15 Feb 2011 10:36:54 +0800
From: Angreani, Rini (CESRE, Kensington) <Rini.Angreani@anonymised.com>

Hmm, the error is there to isolate the problem to an attribute mapping.
It was done for catching invalid attribute mapping, e.g. if the column
it's mapped to doesn't exist.
But, it should have the original exception printed as well, e.g.
something like:

java.lang.RuntimeException: Error applying mapping with targetAttribute
gml:name[4]
Error applying mapping with targetAttribute gml:name[4]
Could not find working property accessor for attribute (DESCRIPTIO) in
object
(SimpleFeatureImpl:InvalidColumnGeologicUnit=[SimpleFeatureImpl.Attribute:
NAME&amp;lt;NAME id=gu.93&amp;gt;=Yaugher Volcanic Group,
SimpleFeatureImpl.Attribute: CODE&amp;lt;CODE id=gu.93&amp;gt;=-Py,
SimpleFeatureImpl.Attribute: URN&amp;lt;URN
id=gu.93&amp;gt;=urn:x-test:GeologicUnit:16777549126931093,
SimpleFeatureImpl.Attribute: DESCRIPTION&amp;lt;DESCRIPTION
id=gu.93&amp;gt;=Olivine basalt, tuff, microgabbro, minor sedimentary
rocks])
No value for xpath: DESCRIPTIO

So, without the full stack trace, it's hard to determine the cause.

On 14/02/11 18:21, Lindegaard, Morten wrote:

Hi Ben,

Thank you for the suggestions!

I used verbose logging, but I didn't find the SQL. I'll take a closer look at the view.

I have attached a zip-file containing the workspace with my mapping files.

However, I'm unable to reproduce the ORA-01427 error at the moment. So I'm afraid it is no help. Since I tried various things to fix the error, I have most likely changed something in the mapping files and forgotten about it.

Right now, I run into this error:
java.lang.RuntimeException: Error applying mapping with targetAttribute kms:harSamletFastEjendom
Error applying mapping with targetAttribute kms:harSamletFastEjendom
Error applying mapping with targetAttribute FEATURE_LINK
Index: 0, Size: 0

So that's what I'm trying to get around now...

If there is anything in my mapping files that looks suspicious at a glance, I'll be happy to know.

Kind regards,
  Morten

Miljøministeriet, Kort& Matrikelstyrelsen, direkte tlf. 72545506. Officiel kommunikation bedes dirigeret via e-mail kms@anonymised.com eller telefon 72545000

-----Oprindelig meddelelse-----
Fra: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@anonymised.com]
Sendt: 11. februar 2011 05:56
Til: Lindegaard, Morten
Cc: geoserver-users@lists.sourceforge.net
Emne: Re: [ExternalEmail] Re: [Geoserver-users] ORA-01427 in RC1, app-schema

Morten, here are some suggestions from a colleague:

On 11/02/11 11:21, Warren, Peter (CESRE, North Ryde) wrote:
  > Does Geoserver build SQL with subqueries? I wouldn't have thought
so. If it doesn't then this is likely an error in a view definition.
  > If it does build SQL with subqueries then this could be caused by
duplicate feature_IDs used in the chaining.
  > Note: We really don't have much to go on here so I could be wrong.

On 11/02/11 10:30, Ben Caradoc-Davies wrote:

Morten,

please turn on verbose logging and let us know if you can see the SQL
that is generated when you get this error.

Can we please see your app-schema mapping file?

Kind regards,
Ben.

On 10/02/11 20:22, Lindegaard, Morten wrote:

Hi,

I have installed 2.1-RC1 recently, and I have copied a configuration that use the app-schema and oracle extensions from beta3 to RC1.

The configuration nests features, and selects from various views and tables.

It works fine in beta3, but RC1 fails with "java.lang.RuntimeException: java.sql.SQLException: ORA-01427: single-row subquery returns more than one row".

Does anyone know of changes from beta3 to RC1 that would explain the change in behaviour?

Thanks in advance!

Kind regards,
    Morten Lindegaard

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Thanks, Morten.

It looks like something has gone horribly wrong in the conversion of a filter to SQL. The SELECT with the clause "WHERE 0 = 1" is never going to return any rows. :frowning:

I will create a Jira issue.

Kind regards,
Ben.

On 16/02/11 20:43, Lindegaard, Morten wrote:

Hi Ben,

Yes, the original SQL error has gone away. However, it might be because of more immediate errors.

When I use GeoServer 2.1 beta 3, my configuration seems to give the desired results.

The query
http://localhost:8080/geoserver21b3/kms/wfs?version=1.1.0&service=WFS&request=GetFeature&typename=kms:Jordstykke&maxfeatures=4&filter=<Filter%20xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>kms:featureID</PropertyName><Literal>1613974</Literal></PropertyIsEqualTo></Filter>

yields a response with data in GML, and the following is in the log:

2011-02-16 13:17:35,337 INFO [geoserver.wfs] -
Request: getFeature
         handle = null
         service = WFS
         version = 1.1.0
         baseUrl = http://localhost:8080/geoserver21b3/
         providedVersion = null
         extendedProperties = {}
         query = [net.opengis.wfs.impl.QueryTypeImpl@anonymised.com (group: null, propertyName: null, function: null, filter: [ kms:featureID = 1613974 ], sortBy: null, featureVersion: null, handle: null, srsName: null, typeName: [{http://schemas.kms.dk/wfs\}Jordstykke])]
         maxFeatures = 4
         outputFormat = text/xml; subtype=gml/3.1.1
         resultType = results
         traverseXlinkDepth = null
         traverseXlinkExpiry = null
         formatOptions = {}
         metadata = null

I then use the same workspace configuration in GeoServer 2.1 RC 1, and the query results in an error that puts the below entries in the log.

I had expected that I would have been able to simply copy a configuration from beta 3 to RC 1.

Kind regards,
  Morten

2011-02-16 12:53:05,476 DEBUG [geoserver.requests] - Query is net.opengis.wfs.impl.QueryTypeImpl@anonymised.com (group: , propertyName: , function: null, filter: [ kms:featureID = 1613974 ], sortBy: , featureVersion: null, handle: null, srsName: null, typeName: [{http://schemas.kms.dk/wfs\}Jordstykke])
  To gt2: Query:
    feature type: Jordstykke
    filter: [ kms:featureID = 1613974 ]
    [properties: ALL ]
2011-02-16 12:53:05,476 DEBUG [geotools.jdbc] - CREATE CONNECTION
2011-02-16 12:53:05,476 TRACE [geotools.core] - ENTRY 14
2011-02-16 12:53:05,476 DEBUG [geotools.filter] - exporting SQL ComparisonFilter
2011-02-16 12:53:05,476 DEBUG [geotools.filter] - exporting PropertyName
2011-02-16 12:53:05,476 DEBUG [geotools.jdbc] - SELECT KFID,UUID,FEATUREID,FEATURETYPE,FEATURECODE,DATASETIDENTIFIER,DATAQUALITYSPECIFICATION,DATAQUALITYSTATEMENT,DATAQUALITYDESCRIPTION,DATAQUALITYPROCESSOR,DATAQUALITYRESPONSIBLEPARTY,TIMEOFCREATION,TIMEOFPUBLICATION,TIMEOFREVISION,ESR_EJENDOMSNUMMER,KMS_SAGSID,KMS_JOURNALNUMMER,REGISTRERINGSDATO,EJERLAVSNAVN,LANDSEJERLAVSKODE,MATRIKELNUMMER,FAELLESLOD,MODERJORDSTYKKE,SUPMSAGSID,SKELFORRETNINGSSAGSID,REGISTRERETAREAL,AREALBEREGN,VEJAREAL,VEJAREALBEREGN,VANDAREALBEREGN,AREALTYPE,REGIONSKODE,REGIONSNAVN,KOMMUNEKODE,KOMMUNENAVN,SOGNEKODE,SOGNENAVN,RETSKREDSKODE,RETSKREDSNAVN,SURFACEPROPERTY as SURFACEPROPERTY FROM LDS_2.KF_JORDSTYKKE_V WHERE FEATUREID = ?
2011-02-16 12:53:05,476 DEBUG [geotools.jdbc] - 1 = 1613974
2011-02-16 12:53:05,617 DEBUG [geotools.jdbc] - CREATE CONNECTION
2011-02-16 12:53:05,695 TRACE [geotools.core] - ENTRY -12.345
2011-02-16 12:53:05,695 DEBUG [geotools.jdbc] - SELECT KFID,UUID,FEATUREID,FEATURETYPE,FEATURECODE,DATASETIDENTIFIER,DATAQUALITYSPECIFICATION,DATAQUALITYSTATEMENT,DATAQUALITYDESCRIPTION,DATAQUALITYPROCESSOR,DATAQUALITYRESPONSIBLEPARTY,TIMEOFCREATION,TIMEOFPUBLICATION,TIMEOFREVISION,ESR_EJENDOMSNUMMER,KMS_SAGSID,KMS_JOURNALNUMMER,REGISTRERINGSDATO,EJERLAVSNAVN,LANDSEJERLAVSKODE,MATRIKELNUMMER,FAELLESLOD,MODERJORDSTYKKE,SUPMSAGSID,SKELFORRETNINGSSAGSID,REGISTRERETAREAL,AREALBEREGN,VEJAREAL,VEJAREALBEREGN,VANDAREALBEREGN,AREALTYPE,REGIONSKODE,REGIONSNAVN,KOMMUNEKODE,KOMMUNENAVN,SOGNEKODE,SOGNENAVN,RETSKREDSKODE,RETSKREDSNAVN,SURFACEPROPERTY as SURFACEPROPERTY FROM LDS_2.KF_JORDSTYKKE_V WHERE 0 = 1
2011-02-16 12:53:05,710 WARN [data.complex] - This shouldn't have happened.There should be at least 1 features with id='KF_JORDSTYKKE_V.fid-58777fea_12e2decb235_-7fdf'.
2011-02-16 12:53:05,710 DEBUG [geotools.jdbc] - CLOSE CONNECTION
2011-02-16 12:53:05,710 ERROR [geoserver.ows] -
java.lang.RuntimeException: Error applying mapping with targetAttribute kms:featureID
         at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:739)
         at org.geotools.data.complex.AbstractMappingFeatureIterator.next(AbstractMappingFeatureIterator.java:171)
         at org.geotools.data.complex.MappingFeatureCollection.size(MappingFeatureCollection.java:300)
         at org.geoserver.wfs.GetFeature.run(GetFeature.java:372)
         at org.geoserver.wfs.DefaultWebFeatureService.getFeature(DefaultWebFeatureService.java:114)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:51)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy95.getFeature(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:624)
         at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:229)
         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:875)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
         at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:68)
         at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
         at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
         at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
         at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
         at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
         at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:39)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:48)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
         at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
         at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
         at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
         at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
         at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
         at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
         at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at java.util.ArrayList.RangeCheck(Unknown Source)
         at java.util.ArrayList.get(Unknown Source)
         at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:736)
         ... 155 more

-----Oprindelig meddelelse-----
Fra: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@anonymised.com]
Sendt: 15. februar 2011 03:51
Til: Lindegaard, Morten
Cc: geoserver-users@lists.sourceforge.net
Emne: Re: SV: [ExternalEmail] Re: [Geoserver-users] ORA-01427 in RC1, app-schema

[I'm putting this discussion back on the list where it belongs. There
are a lot more on the list who might be able to help.]

Morten,

turning on VERBOSE_LOGGING should show you all SQL statements. They
should be on lines containing "[geotools.jdbc]". You might have to
reload the GeoServer servlet (logging can be a bit twitchy). It looks
like your SQL error has gone away.

Rini thinks you should be seeing more in your error messages (see
below). Niels added these diagnostics so might be able to help.

Kind regards,
Ben.

-------- Original Message --------
Subject: RE: SV: [ExternalEmail] Re: [Geoserver-users] ORA-01427 in RC1,
app-schema
Date: Tue, 15 Feb 2011 10:36:54 +0800
From: Angreani, Rini (CESRE, Kensington)<Rini.Angreani@anonymised.com>

Hmm, the error is there to isolate the problem to an attribute mapping.
It was done for catching invalid attribute mapping, e.g. if the column
it's mapped to doesn't exist.
But, it should have the original exception printed as well, e.g.
something like:

java.lang.RuntimeException: Error applying mapping with targetAttribute
gml:name[4]
Error applying mapping with targetAttribute gml:name[4]
Could not find working property accessor for attribute (DESCRIPTIO) in
object
(SimpleFeatureImpl:InvalidColumnGeologicUnit=[SimpleFeatureImpl.Attribute:
NAME&amp;lt;NAME id=gu.93&amp;gt;=Yaugher Volcanic Group,
SimpleFeatureImpl.Attribute: CODE&amp;lt;CODE id=gu.93&amp;gt;=-Py,
SimpleFeatureImpl.Attribute: URN&amp;lt;URN
id=gu.93&amp;gt;=urn:x-test:GeologicUnit:16777549126931093,
SimpleFeatureImpl.Attribute: DESCRIPTION&amp;lt;DESCRIPTION
id=gu.93&amp;gt;=Olivine basalt, tuff, microgabbro, minor sedimentary
rocks])
No value for xpath: DESCRIPTIO

So, without the full stack trace, it's hard to determine the cause.

On 14/02/11 18:21, Lindegaard, Morten wrote:

Hi Ben,

Thank you for the suggestions!

I used verbose logging, but I didn't find the SQL. I'll take a closer look at the view.

I have attached a zip-file containing the workspace with my mapping files.

However, I'm unable to reproduce the ORA-01427 error at the moment. So I'm afraid it is no help. Since I tried various things to fix the error, I have most likely changed something in the mapping files and forgotten about it.

Right now, I run into this error:
java.lang.RuntimeException: Error applying mapping with targetAttribute kms:harSamletFastEjendom
Error applying mapping with targetAttribute kms:harSamletFastEjendom
Error applying mapping with targetAttribute FEATURE_LINK
Index: 0, Size: 0

So that's what I'm trying to get around now...

If there is anything in my mapping files that looks suspicious at a glance, I'll be happy to know.

Kind regards,
   Morten

Miljøministeriet, Kort& Matrikelstyrelsen, direkte tlf. 72545506. Officiel kommunikation bedes dirigeret via e-mail kms@anonymised.com eller telefon 72545000

-----Oprindelig meddelelse-----
Fra: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@anonymised.com]
Sendt: 11. februar 2011 05:56
Til: Lindegaard, Morten
Cc: geoserver-users@lists.sourceforge.net
Emne: Re: [ExternalEmail] Re: [Geoserver-users] ORA-01427 in RC1, app-schema

Morten, here are some suggestions from a colleague:

On 11/02/11 11:21, Warren, Peter (CESRE, North Ryde) wrote:
   > Does Geoserver build SQL with subqueries? I wouldn't have thought
so. If it doesn't then this is likely an error in a view definition.
   > If it does build SQL with subqueries then this could be caused by
duplicate feature_IDs used in the chaining.
   > Note: We really don't have much to go on here so I could be wrong.

On 11/02/11 10:30, Ben Caradoc-Davies wrote:

Morten,

please turn on verbose logging and let us know if you can see the SQL
that is generated when you get this error.

Can we please see your app-schema mapping file?

Kind regards,
Ben.

On 10/02/11 20:22, Lindegaard, Morten wrote:

Hi,

I have installed 2.1-RC1 recently, and I have copied a configuration that use the app-schema and oracle extensions from beta3 to RC1.

The configuration nests features, and selects from various views and tables.

It works fine in beta3, but RC1 fails with "java.lang.RuntimeException: java.sql.SQLException: ORA-01427: single-row subquery returns more than one row".

Does anyone know of changes from beta3 to RC1 that would explain the change in behaviour?

Thanks in advance!

Kind regards,
     Morten Lindegaard

--
Ben Caradoc-Davies<Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

I am sure this is a problem in data aaccess layer, so i have created a GeoTools Jira issue:
http://jira.codehaus.org/browse/GEOT-3436

On 17/02/11 11:59, Ben Caradoc-Davies wrote:

Thanks, Morten.

It looks like something has gone horribly wrong in the conversion of a
filter to SQL. The SELECT with the clause "WHERE 0 = 1" is never going
to return any rows. :frowning:

I will create a Jira issue.

Kind regards,
Ben.

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

This issue should now be fixed. The error you received is due to app-schema
handling of generated unique id wrongly. The issue is now fixed or
alternative you can just set a IdExpression for the table mapping where
primary key is not present.

Ben Caradoc-Davies-2 wrote:

I am sure this is a problem in data aaccess layer, so i have created a
GeoTools Jira issue:
http://jira.codehaus.org/browse/GEOT-3436

On 17/02/11 11:59, Ben Caradoc-Davies wrote:

Thanks, Morten.

It looks like something has gone horribly wrong in the conversion of a
filter to SQL. The SELECT with the clause "WHERE 0 = 1" is never going
to return any rows. :frowning:

I will create a Jira issue.

Kind regards,
Ben.

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://old.nabble.com/ORA-01427-in-RC1%2C-app-schema-tp30892219p31010705.html
Sent from the GeoServer - User mailing list archive at Nabble.com.