Hi Hans,
What version of GeoServer are you using. Using GeoServer 1.5.0 I was
able to get these files to work but I had to rename "bpsReport1.gml" to
"locatie.gml". This is a workaround to get around the fact that the gml
datastore sometimes derives the feature type name from the name of the
file.
Let me know if it works out for you.
-Justin
Hans Bogaards wrote:
Hello All,
We have an application that produces maps with related information. We
are experimenting with writing this information as GML.
When I try to load these GML files in GeoServer as a DataSet I end up
with an empty GeoServer FeatureType Editor caused by an
NullPointerException
What are we doing wrong? Is our GML file/format incorrect?
I have attached an example .gml file with corresponing .xsd file and the
exception trace.
Hope you can help
--
Greetings
Hans Bogaards
Traffic IT Services, the Netherlands
------------------------------------------------------------------------
FeatureType Editor problem:java.lang.NullPointerException:
java.lang.NullPointerException:
at org.vfny.geoserver.global.dto.DataTransferObjectFactory.generateAttributes(DataTransferObjectFactory.java:180
)
at org.vfny.geoserver.form.data.TypesEditorForm.reset(TypesEditorForm.java:282)
at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:484)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:457)
at org.apache.jsp.WEB_002dINF.pages.data.featureTypes.Editor_jsp._jspService(Editor_jsp.java:154)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.WEB_002dINF.pages.layouts.mainLayout_jsp._jspx_meth_tiles_insert_6(mainLayout_jsp.java:1408)
at org.apache.jsp.WEB_002dINF.pages.layouts.mainLayout_jsp._jspService(mainLayout_jsp.java:552)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
17-apr-2007 12:40:58 org.apache.struts.taglib.tiles.InsertTag$InsertHandler doEndTag
SEVERE: ServletException in '/WEB-INF/pages/data/featureTypes/Editor.jsp':
org.apache.jasper.JasperException:
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.WEB_002dINF.pages.layouts.mainLayout_jsp._jspx_meth_tiles_insert_6(mainLayout_jsp.java:1408)
at org.apache.jsp.WEB_002dINF.pages.layouts.mainLayout_jsp._jspService(mainLayout_jsp.java:552)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at org.vfny.geoserver.config.web.tiles.MultipleDelegatingTilesRequestProcessor.doForward(MultipleDelegatingTiles
RequestProcessor.java:346)
at org.vfny.geoserver.config.web.tiles.MultipleDelegatingTilesRequestProcessor.processTilesDefinition(MultipleDe
legatingTilesRequestProcessor.java:212)
------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
<schema xmlns:trafficits="http://www.trafficviewer.nl/2006/trafficits"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:gml="http://www.opengis.net/gml"
targetNamespace="http://www.trafficviewer.nl/2006/trafficits" elementFormDefault="qualified">
<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
<element name="FeatureCollection" type="trafficits:FeatureCollectionType" substitutionGroup="gml:_FeatureCollection"/>
<complexType name="FeatureCollectionType">
<complexContent>
<extension base="gml:AbstractFeatureCollectionType">
<attribute name="lockId" type="string" use="optional"/>
<attribute name="scope" type="string" use="optional"/>
</extension>
</complexContent>
</complexType>
<element name="locatie" type="trafficits:locatieType" substitutionGroup="gml:_Feature"/>
<complexType name="locatieType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element ref="gml:Point"/>
</sequence>
<attribute name="bps" type="string" use="required"/>
</extension>
</complexContent>
</complexType>
<element name="wegvak" type="trafficits:wegvakType" substitutionGroup="gml:_Feature"/>
<complexType name="wegvakType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element ref="gml:LineString"/>
</sequence>
<attribute name="id" type="string" use="required"/>
</extension>
</complexContent>
</complexType>
</schema>
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com