Tim,
 
This is a validation exception. I've hard coded the gml2 schema into Geotools ... so if you have either modified or used another version of the http://www.opengis.net/gml namespace, it won't work. I took the approach that anything in a spec should be constant ... and the user may not over-ride.
 
In your case, I'm guessing you're still trying to parse gml3 data ... just changed the namespace declaration. If you want to parse this data, you may need to write a schema which defines those gml3 attributes you are interested in as inherited from the gml2 schema ... then the parser will be happy (this is also refered to as an application schema, you can nest these).
 
HTH,
 
David

 
On 2/16/06, Tim Englich <[EMAIL PROTECTED]> wrote:
Hello david,
thanks for your quick response.

Now have got the next Exception that I can't understand.
Perhaps you have got an answer for it:

Caused by: org.xml.sax.SAXException: Too many elements for
http://www.opengis.net/gml:Point (type = PointType) : 1 children, 0
maxOccurs
       at org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.java:229)
       at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
       at
org.apache.xerces.validators.common.XMLValidator.callEndElement (XMLValidator.java:1436)
       at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)
       at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java :381)
       at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
       at javax.xml.parsers.SAXParser.parse(Unknown Source)
       at javax.xml.parsers.SAXParser.parse(Unknown Source)
       at org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:139)
       at org.geotools.data.wfs.WFSFeatureReader.run(WFSFeatureReader.java:123)

Best regrads
Tim

> --- Ursprüngliche Nachricht ---
> Von: David Zwiers <[EMAIL PROTECTED]>
> An: Tim Englich <[EMAIL PROTECTED]>
> Kopie: [email protected]
> Betreff: Re: [Geotools-gt2-users] Nullpointerexception in WFS-Datastore
> Datum: Wed, 15 Feb 2006 12:40:45 -0800
>
> The WFS client only support GML 2.x ...
>
> schemaLocation="http://schemas.opengis.net/gml/3.0.1/base/feature.xsd"
>
> David
>
>
> On 2/15/06, Tim Englich < [EMAIL PROTECTED]> wrote:
> >
> > Hello everybody,
> > i have got trouble with the WFS-Datastore.
> > I recive the follwing Exception when I try to Query Features from the
> WFS:
> >
> > 15.02.2006 20:58:23 org.geotools.xml.handlers.xsi.ComplexTypeHandler
> > compress
> > WARNUNG: LengthType :: http://www.opengis.net/gml should have a real
> > parent:
> >
> > null
> > java.lang.NullPointerException
> >        at
> > org.geotools.xml.handlers.xsi.ComplexTypeHandler.compress(
> > ComplexTypeHandler.java:645)
> >        at
> > org.geotools.xml.handlers.xsi.SchemaHandler.compress(SchemaHandler.java
> > :520)
> >        at
> >
> org.geotools.xml.handlers.xsi.RootHandler.getSchema (RootHandler.java:116)
> >        at
> org.geotools.xml.XSISAXHandler.getSchema(XSISAXHandler.java:238)
> >        at org.geotools.xml.SchemaFactory.getRealInstance(
> > SchemaFactory.java :286)
> >        at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java
> > :264)
> >        at
> > org.geotools.xml.handlers.xsi.SchemaHandler.compress(SchemaHandler.java
> > :374)
> >        at
> >
> org.geotools.xml.handlers.xsi.RootHandler.getSchema(RootHandler.java:116)
> >        at
> org.geotools.xml.XSISAXHandler.getSchema(XSISAXHandler.java :238)
> >        at org.geotools.xml.SchemaFactory.getRealInstance(
> > SchemaFactory.java:286)
> >        at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java
> > :264)
> >        at
> > org.geotools.xml.handlers.xsi.SchemaHandler.compress(SchemaHandler.java
> > :374)
> >        at
> >
> org.geotools.xml.handlers.xsi.RootHandler.getSchema(RootHandler.java :116)
> >        at
> org.geotools.xml.XSISAXHandler.getSchema(XSISAXHandler.java:238)
> >        at org.geotools.xml.SchemaFactory.getRealInstance(
> > SchemaFactory.java:286)
> >        at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java
> > :264)
> >        at
> > org.geotools.xml.handlers.xsi.SchemaHandler.compress(SchemaHandler.java
> > :374)
> >        at
> >
> org.geotools.xml.handlers.xsi.RootHandler.getSchema(RootHandler.java:116)
> >        at
> org.geotools.xml.XSISAXHandler.getSchema(XSISAXHandler.java:238)
> >        at org.geotools.xml.SchemaFactory.getRealInstance (
> > SchemaFactory.java:286)
> >        at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java
> > :264)
> >        at
> > org.geotools.xml.handlers.xsi.SchemaHandler.compress (SchemaHandler.java
> > :419)
> >        at
> >
> org.geotools.xml.handlers.xsi.RootHandler.getSchema(RootHandler.java:116)
> >        at
> org.geotools.xml.XSISAXHandler.getSchema (XSISAXHandler.java:238)
> >        at org.geotools.xml.SchemaFactory.getRealInstance(
> > SchemaFactory.java:336)
> >        at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java
> > :318)
> >        at org.geotools.xml.SchemaFactory.getInstance(SchemaFactory.java
> > :192)
> >        at org.geotools.data.wfs.WFSDataStore.getSchemaGet(
> > WFSDataStore.java :386)
> >        at org.geotools.data.wfs.WFSDataStore.getSchema(WFSDataStore.java
> > :293)
> >        at org.geotools.data.wfs.WFSDataStore.splitFilters(
> > WFSDataStore.java:853)
> >        at
> >
> org.geotools.data.wfs.WFSDataStore.getFeatureReader(WFSDataStore.java:706)
> >        at
> > de.ivu.geotools.maplayer.wfs.WFSDataStore.getFeatures(WFSDataStore.java
> > :119)
> >        at
> > de.ivu.geotools.maplayer.wfs.WFSFeatureProvider.getFeatures(
> > WFSFeatureProvider.java:48)
> >        at
> > de.ivu.geotools.maplayer.AbstractLayerSourceManager.getLayer (
> > AbstractLayerSourceManager.java:119)
> >        at
> > de.ivu.geotools.maplayer.wfs.WFSLayerSourceManagerBase.getLayer(
> > WFSLayerSourceManagerBase.java:60)
> >        at
> > de.ivu.geotools.maplayermanager.DefaultLayerManager.insertWEBService(
> > DefaultLayerManager.java:499)
> >        at
> >
> >
>
de.ivu.geotools.mapgui.tools.layertools.gui.InsertLayerDialog$InsertLayerAction.insertLayer
> > (InsertLayerDialog.java:319)
> >        at
> >
> >
>
de.ivu.geotools.mapgui.tools.layertools.gui.InsertLayerDialog$InsertLayerAction.actionPerformed
> > (InsertLayerDialog.java :281)
> >        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> >        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown
> > Source)
> >        at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown
> > Source)
> >        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> >        at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
> > Source)
> >        at java.awt.Component.processMouseEvent(Unknown Source)
> >        at javax.swing.JComponent.processMouseEvent(Unknown Source)
> >        at java.awt.Component.processEvent(Unknown Source)
> >        at java.awt.Container.processEvent(Unknown Source)
> >        at java.awt.Component.dispatchEventImpl(Unknown Source)
> >        at java.awt.Container.dispatchEventImpl(Unknown Source)
> >        at java.awt.Component.dispatchEvent(Unknown Source)
> >        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown
> > Source)
> >        at java.awt.LightweightDispatcher.processMouseEvent (Unknown
> Source)
> >        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
> >        at java.awt.Container.dispatchEventImpl(Unknown Source)
> >        at java.awt.Window.dispatchEventImpl (Unknown Source)
> >        at java.awt.Component.dispatchEvent(Unknown Source)
> >        at java.awt.EventQueue.dispatchEvent(Unknown Source)
> >        at java.awt.EventDispatchThread.pumpOneEventForHierarchy (Unknown
> > Source)
> >        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
> > Source)
> >        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> >        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> >        at java.awt.EventDispatchThread.run(Unknown Source)
> >
> >
> > The Second point is that I recieve this Exception only when I run my
> > Application as an Applet in an Webbrowser. When I run the Application
> e.g.
> > in Eclipse everything works fine.
> > I tried out the Version 2.1.0 and 2.1.1
> >
> > Here is the XML-Schema of the WFS:
> >
> > <xs:schema targetNamespace="http://myServer.de/WFS/wfs"
> > elementFormDefault="qualified" attributeFormDefault="unqualified"
> > version="1.0">
> > <xs:import namespace="http://www.opengis.net/gml"
> > schemaLocation=" http://schemas.opengis.net/gml/3.0.1/base/feature.xsd"/>
> >
> > <xs:complexType name="typefahrzeug">
> > <xs:complexContent>
> >   <xs:extension base="gml:AbstractFeatureType">
> >    <xs:sequence>
> >      <xs:element name="typ" type="xs:string" minOccurs="1"
> > nillable="false"
> > maxOccurs="1"/>
> >      <xs:element name="tid" type="xs:string" minOccurs="1"
> > nillable="false"
> > maxOccurs="1"/>
> >      <xs:element name="sym" type="xs:string" minOccurs="1"
> > nillable="false"
> > maxOccurs="1"/>
> >      <xs:element name="frb" type="xs:string" minOccurs="1"
> > nillable="false"
> > maxOccurs="1"/>
> >      <xs:element name="li" type="xs:string" minOccurs="1"
> nillable="false"
> > maxOccurs="1"/>
> >      <xs:element name="ku" type="xs:string" minOccurs="1"
> nillable="false"
> > maxOccurs="1"/>
> >     <xs:element name="liku" type="xs:string" minOccurs="1"
> > nillable="false"
> > maxOccurs="1"/>
> >     <xs:element name="wunr" type="xs:string" minOccurs="1"
> > nillable="false"
> > maxOccurs="1"/>
> >     <xs:element name="fnr" type="xs:string" minOccurs="1"
> nillable="false"
> > maxOccurs="1"/>
> >    <xs:element name="SELECTED" type="xs:short" minOccurs="1"
> > nillable="false" maxOccurs="1"/>
> >    <xs:element name="fab" type="xs:string" minOccurs="1"
> nillable="false"
> > maxOccurs="1"/>
> >    <xs:element name="position" type="gml:PointPropertyType"
> minOccurs="1"
> > nillable="false" maxOccurs="1"/>
> >   </xs:sequence>
> > </xs:extension>
> > </xs:complexContent>
> > </xs:complexType>
> > <xs:element name="fahrzeug" type="bon:typefahrzeug"
> > substitutionGroup="gml:_Feature"/>
> > </xs:schema>
> >
> >
> > I also tried to Import a WFS created by GeoServer. It cause the same
> > Problems.
> >
> > I hope that someone can help me.
> >
> > Best regrads
> > Tim
> >
> > --
> > DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
> > GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> > _______________________________________________
> > Geotools-gt2-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> >
>

--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

Reply via email to