[Geoserver-users] Trouble using GML Datasource with our generated GML files

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

temp.txt (6.1 KB)

bpsReport1.gml (934 Bytes)

bpsRecord.xsd (1.62 KB)

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&quot;
xmlns="http://www.w3.org/2001/XMLSchema&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
targetNamespace="http://www.trafficviewer.nl/2006/trafficits&quot; elementFormDefault="qualified">
  <import namespace="http://www.opengis.net/gml&quot; schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd&quot;/&gt;
  <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

Hi

What version of GeoServer are you using.

I was using 1.6.0 alpha, after having no success with 1.4.1 and 1.5.0rc3.

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.

After installing 1.5.0rc4 and renaming the file I was able to load it and view it in Google Earth.
When I tried loading it in uDig 1.1rc10, it did not work. uDig thinks there are no features in the file. Any ideas what could be causing this? Or should I ask that on an uDig list?

Thanks for the help
Hans

After installing 1.5.0rc4 and renaming the file I was able to load it
and view it in Google Earth.
When I tried loading it in uDig 1.1rc10, it did not work. uDig thinks
there are no features in the file. Any ideas what could be causing
this? Or should I ask that on an uDig list?

Did you load the gml file into uDig as a gml file, or as a wfs via
GeoServer. If the former then I think this is one might be for the udig
guys yes.

Thanks for the help
Hans

------------------------------------------------------------------------

-------------------------------------------------------------------------
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