Issue 11094
SearchResponseBuilder - Error getting key field java.lang.IllegalArgumentException: No name specified
11094
Reporter: mdoering
Assignee: fmendez
Type: Bug
Summary: SearchResponseBuilder - Error getting key field java.lang.IllegalArgumentException: No name specified
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2012-05-15 10:25:23.834
Updated: 2013-12-16 17:51:01.707
Resolved: 2012-06-07 12:06:36.515
TimeEstimate: 0
TimeSpent: 14400
Description: Found many times in the staging logs:
09:44:39.131 [http-8080-6] INFO o.g.c.search.inject.BaseSearchModule - Creating solr server with path=http://jawa.gbif.org:8082/solr
09:44:39.826 [http-8080-6] INFO o.g.c.s.builder.FullTextQueryBuilder - Query pattern generated for fulltext search: (dataset_title:$q^10.0 OR dataset_title:*$q*^1.0 OR keyword:$q^4.0 OR iso_country_code:$q^3.0 OR owning_organization_title:$q^2.0 OR hosting_organization_title:$q^2.0 OR description:$q^1.0 OR full_text:$q^0.5)
09:44:39.826 [http-8080-6] INFO o.g.c.s.builder.FullTextQueryBuilder - Query pattern generated for fulltext search (Phrase Query): (dataset_title:$q^10.0 OR keyword:$q^4.0 OR iso_country_code:$q^3.0 OR owning_organization_title:$q^2.0 OR hosting_organization_title:$q^2.0 OR description:$q^1.0 OR full_text:$q^0.5)
09:44:39.965 [http-8080-6] DEBUG o.g.r.s.w.r.DatasetSearchResource - Search operation received SearchRequest{parameters={facet.multiselect=[true], q=[mammals], lang=[en], hl=[true]}, facets=[REGISTERED, NETWORK_ORIGIN, TYPE, SUBTYPE, OWNING_ORG, HOSTING_ORG, KEYWORD, DECADE, DATA_AVAILABLE, DATA_INDEXABLE, COUNTRY_CODE, CONTINENT], offset=0, limit=20, facetsOnly=false, facetParameters={}, language=en, q=mammals, multiSelectFacets=true, highlight=true}
09:44:39.967 [http-8080-6] INFO o.g.c.s.builder.FullTextQueryBuilder - Solr query generated for fulltext search: (dataset_title:mammals^10.0 OR dataset_title:*mammals*^1.0 OR keyword:mammals^4.0 OR iso_country_code:mammals^3.0 OR owning_organization_title:mammals^2.0 OR hosting_organization_title:mammals^2.0 OR description:mammals^1.0 OR full_text:mammals^0.5)
09:44:39.972 [http-8080-6] DEBUG o.g.c.s.builder.SearchRequestBuilder - Solr query q=%28dataset_title%3Amammals%5E10.0+OR+dataset_title%3A*mammals*%5E1.0+OR+keyword%3Amammals%5E4.0+OR+iso_country_code%3Amammals%5E3.0+OR+owning_organization_title%3Amammals%5E2.0+OR+hosting_organization_title%3Amammals%5E2.0+OR+description%3Amammals%5E1.0+OR+full_text%3Amammals%5E0.5%29&facet=true&facet.field=dataset_is_registered&facet.field=network_of_origin&facet.field=dataset_type&facet.field=dataset_subtype&facet.field=owning_organization_key&facet.field=hosting_organization_key&facet.field=keyword&facet.field=decade&facet.field=data_available&facet.field=iso_country_code&facet.mincount=1&facet.missing=true&facet.sort=count&f.dataset_is_registered.facet.mincount=0&f.dataset_is_registered.facet.missing=false&f.network_of_origin.facet.mincount=0&f.network_of_origin.facet.missing=false&f.network_of_origin.facet.sort=index&f.dataset_type.facet.mincount=0&f.dataset_type.facet.missing=false&f.dataset_type.facet.sort=index&f.dataset_subtype.facet.mincount=0&f.dataset_subtype.facet.missing=false&f.dataset_subtype.facet.sort=index&f.owning_organization_key.facet.mincount=0&f.owning_organization_key.facet.missing=false&f.hosting_organization_key.facet.mincount=0&f.hosting_organization_key.facet.missing=false&f.keyword.facet.mincount=0&f.keyword.facet.missing=false&f.decade.facet.mincount=0&f.decade.facet.missing=false&f.decade.facet.sort=index&f.data_available.facet.mincount=0&f.data_available.facet.missing=false&f.iso_country_code.facet.mincount=0&f.iso_country_code.facet.missing=false&f.iso_country_code.facet.sort=index&rows=20&start=0&q.alt=*%3A*&hl=true&hl.snippets=10&hl.fragsize=0&hl.fl=dataset_title&hl.fl=keyword&hl.fl=iso_country_code&hl.fl=owning_organization_title&hl.fl=hosting_organization_title&hl.fl=description&hl.fl=full_text&sort=score+desc%2Cdataset_is_registered+desc%2Cdataset_title+asc
09:44:39.973 [http-8080-6] DEBUG o.g.c.s.service.SolrSearchService - Solr query q=%28dataset_title%3Amammals%5E10.0+OR+dataset_title%3A*mammals*%5E1.0+OR+keyword%3Amammals%5E4.0+OR+iso_country_code%3Amammals%5E3.0+OR+owning_organization_title%3Amammals%5E2.0+OR+hosting_organization_title%3Amammals%5E2.0+OR+description%3Amammals%5E1.0+OR+full_text%3Amammals%5E0.5%29&facet=true&facet.field=dataset_is_registered&facet.field=network_of_origin&facet.field=dataset_type&facet.field=dataset_subtype&facet.field=owning_organization_key&facet.field=hosting_organization_key&facet.field=keyword&facet.field=decade&facet.field=data_available&facet.field=iso_country_code&facet.mincount=1&facet.missing=true&facet.sort=count&f.dataset_is_registered.facet.mincount=0&f.dataset_is_registered.facet.missing=false&f.network_of_origin.facet.mincount=0&f.network_of_origin.facet.missing=false&f.network_of_origin.facet.sort=index&f.dataset_type.facet.mincount=0&f.dataset_type.facet.missing=false&f.dataset_type.facet.sort=index&f.dataset_subtype.facet.mincount=0&f.dataset_subtype.facet.missing=false&f.dataset_subtype.facet.sort=index&f.owning_organization_key.facet.mincount=0&f.owning_organization_key.facet.missing=false&f.hosting_organization_key.facet.mincount=0&f.hosting_organization_key.facet.missing=false&f.keyword.facet.mincount=0&f.keyword.facet.missing=false&f.decade.facet.mincount=0&f.decade.facet.missing=false&f.decade.facet.sort=index&f.data_available.facet.mincount=0&f.data_available.facet.missing=false&f.iso_country_code.facet.mincount=0&f.iso_country_code.facet.missing=false&f.iso_country_code.facet.sort=index&rows=20&start=0&q.alt=*%3A*&hl=true&hl.snippets=10&hl.fragsize=0&hl.fl=dataset_title&hl.fl=keyword&hl.fl=iso_country_code&hl.fl=owning_organization_title&hl.fl=hosting_organization_title&hl.fl=description&hl.fl=full_text&sort=score+desc%2Cdataset_is_registered+desc%2Cdataset_title+asc
09:44:40.095 [http-8080-6] ERROR o.g.c.s.b.SearchResponseBuilder - Error getting key field
java.lang.IllegalArgumentException: No name specified
at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:635) ~[commons-beanutils-1.7.0.jar:1.6]
at org.apache.commons.beanutils.BeanUtilsBean.getNestedProperty(BeanUtilsBean.java:698) ~[commons-beanutils-1.7.0.jar:1.6]
at org.apache.commons.beanutils.BeanUtilsBean.getProperty(BeanUtilsBean.java:723) ~[commons-beanutils-1.7.0.jar:1.6]
at org.apache.commons.beanutils.BeanUtils.getProperty(BeanUtils.java:265) ~[commons-beanutils-1.7.0.jar:1.6]
at org.gbif.common.search.builder.SearchResponseBuilder.getByKey(SearchResponseBuilder.java:137) [gbif-common-search-0.1-20120430.082821-110.jar:0.1-SNAPSHOT]
at org.gbif.common.search.builder.SearchResponseBuilder.setHighlightedFields(SearchResponseBuilder.java:187) [gbif-common-search-0.1-20120430.082821-110.jar:0.1-SNAPSHOT]
at org.gbif.common.search.builder.SearchResponseBuilder.build(SearchResponseBuilder.java:117) [gbif-common-search-0.1-20120430.082821-110.jar:0.1-SNAPSHOT]
at org.gbif.common.search.service.SolrSearchService.search(SolrSearchService.java:107) [gbif-common-search-0.1-20120430.082821-110.jar:0.1-SNAPSHOT]
at org.gbif.registry.search.ws.resources.DatasetSearchResource.search(DatasetSearchResource.java:39) [DatasetSearchResource.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_22]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_22]
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.11.jar:1.11]
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) [jersey-server-1.11.jar:1.11]
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.11.jar:1.11]
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) [jersey-server-1.11.jar:1.11]
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.11.jar:1.11]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.11.jar:1.11]
]]>
Author: fmendez@gbif.org
Comment: PropertyUtils was causing this error on staging server, the method: getPropertyDescriptors; depends on the java reflection api which is affected by the JVM version. This was causing that for class SolrAnnotatedDataset the field "key" was obtained from the super class instead of the actual class.
Created: 2012-06-07 12:06:36.55
Updated: 2012-06-07 12:06:36.55