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(GeoServ
> erLoader.java:123)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFact
> ory.java:350)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1330)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> $1.run(AbstractAutowireCapableBeanFactory.java:409)
> 
>                 at java.security.AccessController.doPrivileged(Native
> Method)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .createBean(AbstractAutowireCapableBeanFactory.java:380)
> 
>                 at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
> stractBeanFactory.java:264)
> 
>                 at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
> ngleton(DefaultSingletonBeanRegistry.java:221)
> 
>                 at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(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.resolveConstru
> ctorArguments(ConstructorResolver.java:495)
> 
>                 at
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstr
> uctor(ConstructorResolver.java:162)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> $1.run(AbstractAutowireCapableBeanFactory.java:409)
> 
>                 at java.security.AccessController.doPrivileged(Native
> Method)
> 
>                 at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .createBean(AbstractAutowireCapableBeanFactory.java:380)
> 
>                 at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
> stractBeanFactory.java:264)
> 
>                 at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
> ngleton(DefaultSingletonBeanRegistry.java:221)
> 
>                 at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(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.preInst
> antiateSingletons(DefaultListableBeanFactory.java:429)
> 
>                 at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
> toryInitialization(AbstractApplicationContext.java:729)
> 
>                 at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
> actApplicationContext.java:381)
> 
>                 at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
> ntextLoader.java:255)
> 
>                 at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
> extLoader.java:199)
> 
>                 at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
> textLoaderListener.java:45)
> 
>                 at
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java: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:510)
> 
>                 at
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
> 
>                 at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
> 
>                 at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> 
>                 at org.mortbay.jetty.Server.doStart(Server.java:222)
> 
>                 at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
> 
>                 at org.geoserver.web.Start.main(Start.java:68)
> 
> Caused by: java.lang.NullPointerException
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescript
> or(FeatureTypeRegistry.java:285)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:463)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:398)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(Featur
> eTypeRegistry.java:202)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRe
> gistry.java:342)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescript
> or(FeatureTypeRegistry.java:254)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:463)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:398)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(Featur
> eTypeRegistry.java:202)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRe
> gistry.java:342)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescript
> or(FeatureTypeRegistry.java:254)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:463)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:398)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(Featur
> eTypeRegistry.java:202)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRe
> gistry.java:342)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescript
> or(FeatureTypeRegistry.java:254)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:463)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:398)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(Featur
> eTypeRegistry.java:202)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRe
> gistry.java:342)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescript
> or(FeatureTypeRegistry.java:254)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:463)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeR
> egistry.java:398)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(Featur
> eTypeRegistry.java:202)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRe
> gistry.java:342)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescript
> or(FeatureTypeRegistry.java:254)
> 
>                 at
> org.geotools.data.complex.config.FeatureTypeRegistry.getDescriptor(FeatureTy
> peRegistry.java:161)
> 
>                 at
> org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.getTargetDe
> scriptor(AppSchemaDataAccessConfigurator.java:237)
> 
>                 at
> org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.createFeatu
> reTypeMappings(AppSchemaDataAccessConfigurator.java:205)
> 
>                 at
> org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.buildMappin
> gs(AppSchemaDataAccessConfigurator.java:185)
> 
>                 at
> org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.buildMappin
> gs(AppSchemaDataAccessConfigurator.java:159)
> 
>                 at
> org.geotools.data.complex.AppSchemaDataAccessFactory.createDataStore(AppSche
> maDataAccessFactory.java:93)
> 
>                 at
> org.vfny.geoserver.util.DataStoreUtils.getDataAccess(DataStoreUtils.java: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

Reply via email to