Using the 8-25-10 build, I do not get this NullPointer exception. However,
WFS response documents are returning MappedFeatures where the
gsmlcore:metadata element is empty, when it should not be... I've gotten the
service live, so feel free to take a look at http://debug.usgin.org/gsml.
This is running the most recent nightly build.
Empty elements makes me think there's some kind of backend data problem, but
I've double-checked and can't find it. To explain, the isp:MD_Metadata
mapping looks like:
<AttributeMapping>
<targetAttribute>FEATURE_LINK[1]</targetAttribute>
<sourceExpression>
<OCQL>datasources_id</OCQL>
</sourceExpression>
</AttributeMapping>
The chaining from the MappedFeature looks like:
<AttributeMapping>
<targetAttribute>gsmlcore:metadata</targetAttribute>
<sourceExpression>
<OCQL>datasourceid</OCQL>
<linkElement>isp:MD_Metadata</linkElement>
<linkField>FEATURE_LINK[1]</linkField>
</sourceExpression>
<isMultiple>false</isMultiple>
</AttributeMapping>
And this returns empty gsmlcore:metadata elements. However, the SQL Query:
SELECT mapunitpolys.mapunit, datasources.source
FROM ncgmp.mapunitpolys LEFT JOIN ncgmp.datasources ON
mapunitpolys.datasourceid = datasources.datasources_id
WHERE datasources.source IS NULL;
... does not return any records, indicating that every MappedFeature (from
the mapunitpolys table) has an associated MD_Metadata feature (from the
datasources table), but for some reason it is not coming through in the WFS
response.
Thanks,
Ryan
-----Original Message-----
From: Ryan Clark [mailto:[email protected]]
Sent: Wednesday, August 25, 2010 8:42 AM
To: [email protected]
Subject: Re: [Geoserver-users] Appschema: NullPointerException
Attached are the mappings I'm using. I double-checked, and there are no null
values in the backend tables relating to this particular attribute mapping.
I'm using a dump from svn trunk that I took about a month ago - not exactly
sure what day it was. Today I'll be trying to set things up in a live
environment with the lastest nightly build.
Thanks for taking a look!
Ryan
-----Original Message-----
From: v...@csiro [mailto:[email protected]]
Sent: Tuesday, August 24, 2010 11:20 PM
To: [email protected]
Subject: Re: [Geoserver-users] Appschema: NullPointerException
Hi Ryan,
Which build version are you using?
Would you be able to send the mapping files? I ran into a similar issue in
the past and it was due to null values in the database even though the
schema is set to minOccur=0
I have submitted a patch for this last month
http://jira.codehaus.org/browse/GEOT-2679
Perhaps you can try with the latest version from trunk which is build from
our buildbot :)
http://files.ivec.org/geoserver/geoserver-trunk/2010-08-25/
Ryan Clark wrote:
>
> Okay - hopefully my last app-schema issue for a while. I certainly
> appreciate the help!
>
>
>
> My MappedFeature mapping file works perfectly until I add the
> targetAttribute "gsmlcore:metadata". Here's the mapping:
>
> <AttributeMapping>
>
> <targetAttribute>gsmlcore:metadata</targetAttribute>
>
> <sourceExpression>
>
> <OCQL>datasourceid</OCQL>
>
>
> <linkElement>isp:MD_Metadata</linkElement>
>
> <linkField>FEATURE_LINK[1]</linkField>
>
> </sourceExpression>
>
> <isMultiple>false</isMultiple>
>
> </AttributeMapping>
>
>
>
> Exactly the same mapping works fine within my GeologicUnit mapping
> file, which also has a gsmlcore:metadata property. Therefore, I don't
> think that the problem has anything to do with the mapping for the
> isp:MD_Metadata element.
>
>
>
> When I add this targetAttribute to the MappedFeature file, Geoserver
> gags on boot, throwing the error shown below. The error goes away if I
> rename the targetAttribute to something that doesn't exist (e.g.
> "gsmlcore:moustache"),
> but then as you'd expect there's an error when making a feature request.
>
>
>
> Thanks!
>
> Ryan
>
>
>
> 24 Aug 12:56:37 INFO [org.geoserver] -
>
> java.io.IOException
>
> at
> org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:362)
>
> at
>
org.geoserver.catalog.impl.DataStoreInfoImpl.getDataStore(DataStoreInfoImpl.
> java:37)
>
> at
> org.geoserver.config.GeoServerLoader.readCatalog(GeoServerLoader.java:
> 572)
>
> at
> org.geoserver.config.GeoServerLoader.loadCatalog(GeoServerLoader.java:
> 152)
>
> at
> org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(G
> eoServ
> erLoader.java:123)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> .applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBe
> anFact
> ory.java:350)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1330)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> $1.run(AbstractAutowireCapableBeanFactory.java:409)
>
> at java.security.AccessController.doPrivileged(Native
> Method)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> .createBean(AbstractAutowireCapableBeanFactory.java:380)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObj
> ect(Ab
> stractBeanFactory.java:264)
>
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
> .getSi
> ngleton(DefaultSingletonBeanRegistry.java:221)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBea
> n(Abst
> ractBeanFactory.java:261)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> Abstra
> ctBeanFactory.java:185)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> Abstra
> ctBeanFactory.java:164)
>
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.
> resolv
> eReference(BeanDefinitionValueResolver.java:269)
>
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.
> resolv
> eValueIfNecessary(BeanDefinitionValueResolver.java:104)
>
> at
> org.springframework.beans.factory.support.ConstructorResolver.resolveC
> onstru
> ctorArguments(ConstructorResolver.java:495)
>
> at
> org.springframework.beans.factory.support.ConstructorResolver.autowire
> Constr
> uctor(ConstructorResolver.java:162)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> .autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> .createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> $1.run(AbstractAutowireCapableBeanFactory.java:409)
>
> at java.security.AccessController.doPrivileged(Native
> Method)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory
> .createBean(AbstractAutowireCapableBeanFactory.java:380)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObj
> ect(Ab
> stractBeanFactory.java:264)
>
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
> .getSi
> ngleton(DefaultSingletonBeanRegistry.java:221)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBea
> n(Abst
> ractBeanFactory.java:261)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> Abstra
> ctBeanFactory.java:185)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> Abstra
> ctBeanFactory.java:164)
>
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.p
> reInst
> antiateSingletons(DefaultListableBeanFactory.java:429)
>
> at
> org.springframework.context.support.AbstractApplicationContext.finishB
> eanFac
> toryInitialization(AbstractApplicationContext.java:729)
>
> at
> org.springframework.context.support.AbstractApplicationContext.refresh
> (Abstr
> actApplicationContext.java:381)
>
> at
> org.springframework.web.context.ContextLoader.createWebApplicationCont
> ext(Co
> ntextLoader.java:255)
>
> at
> org.springframework.web.context.ContextLoader.initWebApplicationContex
> t(Cont
> extLoader.java:199)
>
> at
> org.springframework.web.context.ContextLoaderListener.contextInitializ
> ed(Con
> textLoaderListener.java:45)
>
> at
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.j
> ava:54
> 0)
>
> at
> org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
>
> at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java
> :1220)
>
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:5
> 10)
>
> at
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
>
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:3
> 9)
>
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:1
> 30)
>
> at org.mortbay.jetty.Server.doStart(Server.java:222)
>
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:3
> 9)
>
> at org.geoserver.web.Start.main(Start.java:68)
>
> Caused by: java.lang.NullPointerException
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDe
> script
> or(FeatureTypeRegistry.java:285)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:463)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:398)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(
> Featur
> eTypeRegistry.java:202)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(Feature
> TypeRe
> gistry.java:342)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDe
> script
> or(FeatureTypeRegistry.java:254)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:463)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:398)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(
> Featur
> eTypeRegistry.java:202)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(Feature
> TypeRe
> gistry.java:342)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDe
> script
> or(FeatureTypeRegistry.java:254)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:463)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:398)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(
> Featur
> eTypeRegistry.java:202)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(Feature
> TypeRe
> gistry.java:342)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDe
> script
> or(FeatureTypeRegistry.java:254)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:463)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:398)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(
> Featur
> eTypeRegistry.java:202)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(Feature
> TypeRe
> gistry.java:342)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDe
> script
> or(FeatureTypeRegistry.java:254)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:463)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(Featur
> eTypeR
> egistry.java:398)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(
> Featur
> eTypeRegistry.java:202)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(Feature
> TypeRe
> gistry.java:342)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDe
> script
> or(FeatureTypeRegistry.java:254)
>
> at
> org.geotools.data.complex.config.FeatureTypeRegistry.getDescriptor(Fea
> tureTy
> peRegistry.java:161)
>
> at
> org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.getTa
> rgetDe
> scriptor(AppSchemaDataAccessConfigurator.java:237)
>
> at
> org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.creat
> eFeatu
> reTypeMappings(AppSchemaDataAccessConfigurator.java:205)
>
> at
> org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.build
> Mappin
> gs(AppSchemaDataAccessConfigurator.java:185)
>
> at
> org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.build
> Mappin
> gs(AppSchemaDataAccessConfigurator.java:159)
>
> at
> org.geotools.data.complex.AppSchemaDataAccessFactory.createDataStore(A
> ppSche
> maDataAccessFactory.java:93)
>
> at
> org.vfny.geoserver.util.DataStoreUtils.getDataAccess(DataStoreUtils.ja
> va:97)
>
> at
> org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:329)
>
> ... 46 more
>
>
>
>
>
>
> ----------------------------------------------------------------------
> -------- Sell apps to millions through the Intel(R) Atom(Tm) Developer
> Program Be part of this innovative community and reach millions of
> netbook users worldwide. Take advantage of special opportunities to
> increase revenue and speed time-to-market. Join now, and jumpstart
> your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
--
View this message in context:
http://old.nabble.com/Appschema%3A-NullPointerException-tp29526007p29529133.
html
Sent from the GeoServer - User mailing list archive at Nabble.com.
----------------------------------------------------------------------------
--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users