[Geoserver-users] WFS-T IO Exception

Hello,

I’m having trouble using geoserver and WFS-T to insert a new record into an arcsde datastore. Every time I attempt it I get a Java.IO Exception (included below). I’ve tried a few different formats for the request based on the WFS_transactionInsert.xml sample. Am I doing something wrong (I’m still getting my feet wet wtih WFS-T, so I expect I am doing something wrong), or is inserting new data into arcsde not supported? I’ve included my sample request and the full response below.

---------- BEGIN REQUEST ------------
<wfs:Transaction service=“WFS” version=“1.1.0” xmlns:sde=“http://edats.com/sde” xmlns:wfs=“http://www.opengis.net/wfs” xmlns=“http://www.opengis.net/ogc” xmlns:gml=“http://www.opengis.net/gml” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd”>
wfs:Insert
sde:projects
sde:the_geom
gml:Polygongml:exteriorgml:LinearRinggml:posList-9138285.595934153 3123465.39563944 -9139604.134671887 3124143.7742653745 -9139718.7902143 3121907.991188344 -9138285.595934153 3123465.39563944</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>
</sde:the_geom>
</sde:projects>
</wfs:Insert>
</wfs:Transaction>

---------- BEGIN RESPONSE -----------
<ows:ExceptionReport version=“1.0.0” xsi:schemaLocation=“http://www.opengis.net/ows http://72.158.105.13:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd”>
<ows:Exception exceptionCode=“NoApplicableCode”>
ows:ExceptionText
java.io.IOException: Current fid
index is null, next must be called before write()
Current fid index is null, next must be called before write()
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

Hi Brandon,

Could you log into the interface, turn on verbose exceptions, and include the entire stack trace. Thanks.

The error does however indicate an issue with primary keys. Gabriel can better comment on how arcsde handles primary keys but you should ensure there is nothing a miss with any of the keys on your table.

Also it would be helpful to know which version of geoserver you are running. Thanks.

-Justin

Brandon Niemczyk wrote:

Hello,

I'm having trouble using geoserver and WFS-T to insert a new record into an arcsde datastore. Every time I attempt it I get a Java.IO Exception (included below). I've tried a few different formats for the request based on the WFS_transactionInsert.xml sample. Am I doing something wrong (I'm still getting my feet wet wtih WFS-T, so I expect I am doing something wrong), or is inserting new data into arcsde not supported? I've included my sample request and the full response below.

---------- BEGIN REQUEST ------------
<wfs:Transaction service="WFS" version="1.1.0" xmlns:sde="http://edats.com/sde&quot; xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns="http://www.opengis.net/ogc&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd&quot;&gt;
   <wfs:Insert>
      <sde:projects>
         <sde:the_geom>
            <gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>-9138285.595934153 3123465.39563944 -9139604.134671887 3124143.7742653745 -9139718.7902143 3121907.991188344 -9138285.595934153 3123465.39563944</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>
         </sde:the_geom>
      </sde:projects>
   </wfs:Insert>
</wfs:Transaction>

---------- BEGIN RESPONSE -----------
<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://72.158.105.13:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;
    <ows:Exception exceptionCode="NoApplicableCode">
       <ows:ExceptionText>
java.io.IOException: Current fid
      index is null, next must be called before write()
      Current fid index is null, next must be called before write()
       </ows:ExceptionText>
    </ows:Exception>
</ows:ExceptionReport>

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

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

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hi Justin,

Thanks for the help. I checked both ‘Verbose’ and ‘VerboseExceptions’ in Config → Server and the response is still the same, no stack trace is included. I tried restarting tomcat but that cleared Verbose and VerboseExceptions.

It appears I was wrong about the arcsde part, after re-checking the configuration it appears that even though the layer had been setup in the sde namespace it was actually using shapefiles and I erroneously assumed it was actually an sde layer.

I’m using geoserver version 1.7.2.

I tried adding sde:fid3432</sde:fid> and sde:objectid34532</sde:objectid> below </sde:the_geom> in my request but i still get the same exception about the current FID index being null. In case it’s of any help, I put the shapefile in question up at http://72.158.105.9/~brandon/projects.zip (2.1KB)

On Fri, Mar 27, 2009 at 12:08 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Hi Brandon,

Could you log into the interface, turn on verbose exceptions, and include the entire stack trace. Thanks.

The error does however indicate an issue with primary keys. Gabriel can better comment on how arcsde handles primary keys but you should ensure there is nothing a miss with any of the keys on your table.

Also it would be helpful to know which version of geoserver you are running. Thanks.

-Justin

Brandon Niemczyk wrote:

Hello,

I’m having trouble using geoserver and WFS-T to insert a new record into an arcsde datastore. Every time I attempt it I get a Java.IO Exception (included below). I’ve tried a few different formats for the request based on the WFS_transactionInsert.xml sample. Am I doing something wrong (I’m still getting my feet wet wtih WFS-T, so I expect I am doing something wrong), or is inserting new data into arcsde not supported? I’ve included my sample request and the full response below.

---------- BEGIN REQUEST ------------
<wfs:Transaction service=“WFS” version=“1.1.0” xmlns:sde=“http://edats.com/sde” xmlns:wfs=“http://www.opengis.net/wfs” xmlns=“http://www.opengis.net/ogc” xmlns:gml=“http://www.opengis.net/gml” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd”>
wfs:Insert
sde:projects
sde:the_geom
gml:Polygongml:exteriorgml:LinearRinggml:posList-9138285.595934153 3123465.39563944 -9139604.134671887 3124143.7742653745 -9139718.7902143 3121907.991188344 -9138285.595934153 3123465.39563944</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>
</sde:the_geom>
</sde:projects>
</wfs:Insert>
</wfs:Transaction>

---------- BEGIN RESPONSE -----------
<ows:ExceptionReport version=“1.0.0” xsi:schemaLocation=“http://www.opengis.net/ows http://72.158.105.13:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd”>
<ows:Exception exceptionCode=“NoApplicableCode”>
ows:ExceptionText
java.io.IOException: Current fid
index is null, next must be called before write()
Current fid index is null, next must be called before write()
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>





Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Brandon Niemczyk wrote:

Hi Justin,

Thanks for the help. I checked both 'Verbose' and 'VerboseExceptions' in Config -> Server and the response is still the same, no stack trace is included. I tried restarting tomcat but that cleared Verbose and VerboseExceptions.

That may be because you didn't hit the submit button, then the apply one, then the save one... weird uh? we're working on simplifying that workflow for 2.0.

I would really need the stack trace to try to diagnose the problem, so could you please check if that's the reason why you didn't get the full stack trace before?

Also, please set the logging to the GEOTOOLS_DEVELOPER_LOGGING profile and send me back the geoserver.log file after the failure was reproduced by private email, and the output of a DescribeFeatureType request for your FeatureType.

Best regards,

Gabriel

It appears I was wrong about the arcsde part, after re-checking the configuration it appears that even though the layer had been setup in the sde namespace it was actually using shapefiles and I erroneously assumed it was actually an sde layer.

I'm using geoserver version 1.7.2.

I tried adding <sde:fid>3432</sde:fid> and <sde:objectid>34532</sde:objectid> below </sde:the_geom> in my request but i still get the same exception about the current FID index being null. In case it's of any help, I put the shapefile in question up at http://72.158.105.9/~brandon/projects.zip (2.1KB)

On Fri, Mar 27, 2009 at 12:08 PM, Justin Deoliveira <jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>> wrote:

    Hi Brandon,

    Could you log into the interface, turn on verbose exceptions, and
    include the entire stack trace. Thanks.

    The error does however indicate an issue with primary keys. Gabriel
    can better comment on how arcsde handles primary keys but you should
    ensure there is nothing a miss with any of the keys on your table.

    Also it would be helpful to know which version of geoserver you are
    running. Thanks.

    -Justin

    Brandon Niemczyk wrote:

        Hello,

        I'm having trouble using geoserver and WFS-T to insert a new
        record into an arcsde datastore. Every time I attempt it I get
        a Java.IO Exception (included below). I've tried a few
        different formats for the request based on the
        WFS_transactionInsert.xml sample. Am I doing something wrong
        (I'm still getting my feet wet wtih WFS-T, so I expect I am
        doing something wrong), or is inserting new data into arcsde not
        supported? I've included my sample request and the full
        response below.

        ---------- BEGIN REQUEST ------------
        <wfs:Transaction service="WFS" version="1.1.0"
        xmlns:sde="http://edats.com/sde&quot;
        xmlns:wfs="http://www.opengis.net/wfs&quot;
        xmlns="http://www.opengis.net/ogc&quot;
        xmlns:gml="http://www.opengis.net/gml&quot;
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
        xsi:schemaLocation="http://www.opengis.net/wfs
        http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd&quot;&gt;
          <wfs:Insert>
             <sde:projects>
                <sde:the_geom>
                          <gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>-9138285.595934153
        3123465.39563944 -9139604.134671887 3124143.7742653745
        -9139718.7902143 3121907.991188344 -9138285.595934153
        3123465.39563944</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>
                </sde:the_geom>
             </sde:projects>
          </wfs:Insert>
        </wfs:Transaction>

        ---------- BEGIN RESPONSE -----------
        <ows:ExceptionReport version="1.0.0"
        xsi:schemaLocation="http://www.opengis.net/ows
        http://72.158.105.13:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;
           <ows:Exception exceptionCode="NoApplicableCode">
              <ows:ExceptionText>
        java.io.IOException: Current fid
             index is null, next must be called before write()
             Current fid index is null, next must be called before write()
              </ows:ExceptionText>
           </ows:Exception>
        </ows:ExceptionReport>

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

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

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

        _______________________________________________
        Geoserver-users mailing list
        Geoserver-users@lists.sourceforge.net
        <mailto:Geoserver-users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/geoserver-users

    -- Justin Deoliveira
    OpenGeo - http://opengeo.org
    Enterprise support for open source geospatial.

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

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

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers

Hi Brandon, cotinuing on the public thread.

Thanks for the log.I'm confused though, I thought you were trying ArcSDE? the log states you're actually using shapefiles, so that they only happen to have the sde: namespace assigned?

Now, speaking of the shapefiles, I'm not sure but the error seems to indicate there's no primary key or such?:

Caused by: java.io.IOException: Current fid index is null, next must be called before write()

  at org.geotools.data.shapefile.indexed.IndexedFidWriter.write(IndexedFidWriter.java:245)

  at org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.write(IndexedShapefileFeatureWriter.java:100)

  at org.geotools.data.shapefile.ShapefileFeatureWriter.close(ShapefileFeatureWriter.java:218)

  at org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.close(IndexedShapefileFeatureWriter.java:108)

  at org.geotools.data.TransactionStateDiff.applyDiff(TransactionStateDiff.java:266)

  at org.geotools.data.TransactionStateDiff.commit(TransactionStateDiff.java:151)

  at org.geotools.data.DefaultTransaction.commit(DefaultTransaction.java:182)

  at org.geoserver.wfs.Transaction.execute(Transaction.java:366)

  at org.geoserver.wfs.Transaction.transaction(Transaction.java:108)

Please tell me whether you were trying to hit an ArcSDE server and just missconfigured your feature types or you're actually testing those shapefiles so we know where to point weapons.

TIA,

Gabriel

Brandon Niemczyk wrote:
> Thanks for the help.
>
> I've attached geoserver.log and pasted the output of a
> DescribeFeatureType below. Let me know if there is anything else I can
> do to help.
>
> <xsd:schema elementFormDefault="qualified"
> targetNamespace="http://geoserver.sf.net">
> <xsd:import namespace="http://www.opengis.net/gml&quot;
> schemaLocation="http://72.158.105.13:80/geoserver/schemas/gml/3.1.1/base/gml.xsd&quot;/&gt;
> <xsd:complexType name="projectsType">
> <xsd:complexContent>
> <xsd:extension base="gml:AbstractFeatureType">
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="0" name="the_geom"
> nillable="true" type="gml:MultiSurfacePropertyType"/>
> <xsd:element maxOccurs="1" minOccurs="0" name="OBJECTID"
> nillable="true" type="xsd:int"/>
> <xsd:element maxOccurs="1" minOccurs="0" name="PROJECT_ID"
> nillable="true" type="xsd:int"/>
> <xsd:element maxOccurs="1" minOccurs="0" name="SHAPE_Leng"
> nillable="true" type="xsd:double"/>
> <xsd:element maxOccurs="1" minOccurs="0" name="SHAPE_Area"
> nillable="true" type="xsd:double"/>
> </xsd:sequence>
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
> <xsd:element name="projects" substitutionGroup="gml:_Feature"
> type="sde:projectsType"/>
> </xsd:schema>
Gabriel Roldan wrote:

Brandon Niemczyk wrote:

Hi Justin,

Thanks for the help. I checked both 'Verbose' and 'VerboseExceptions' in Config -> Server and the response is still the same, no stack trace is included. I tried restarting tomcat but that cleared Verbose and VerboseExceptions.

That may be because you didn't hit the submit button, then the apply one, then the save one... weird uh? we're working on simplifying that workflow for 2.0.

I would really need the stack trace to try to diagnose the problem, so could you please check if that's the reason why you didn't get the full stack trace before?

Also, please set the logging to the GEOTOOLS_DEVELOPER_LOGGING profile and send me back the geoserver.log file after the failure was reproduced by private email, and the output of a DescribeFeatureType request for your FeatureType.

Best regards,

Gabriel

It appears I was wrong about the arcsde part, after re-checking the configuration it appears that even though the layer had been setup in the sde namespace it was actually using shapefiles and I erroneously assumed it was actually an sde layer.

I'm using geoserver version 1.7.2.

I tried adding <sde:fid>3432</sde:fid> and <sde:objectid>34532</sde:objectid> below </sde:the_geom> in my request but i still get the same exception about the current FID index being null. In case it's of any help, I put the shapefile in question up at http://72.158.105.9/~brandon/projects.zip (2.1KB)

On Fri, Mar 27, 2009 at 12:08 PM, Justin Deoliveira <jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>> wrote:

    Hi Brandon,

    Could you log into the interface, turn on verbose exceptions, and
    include the entire stack trace. Thanks.

    The error does however indicate an issue with primary keys. Gabriel
    can better comment on how arcsde handles primary keys but you should
    ensure there is nothing a miss with any of the keys on your table.

    Also it would be helpful to know which version of geoserver you are
    running. Thanks.

    -Justin

    Brandon Niemczyk wrote:

        Hello,

        I'm having trouble using geoserver and WFS-T to insert a new
        record into an arcsde datastore. Every time I attempt it I get
        a Java.IO Exception (included below). I've tried a few
        different formats for the request based on the
        WFS_transactionInsert.xml sample. Am I doing something wrong
        (I'm still getting my feet wet wtih WFS-T, so I expect I am
        doing something wrong), or is inserting new data into arcsde not
        supported? I've included my sample request and the full
        response below.

        ---------- BEGIN REQUEST ------------
        <wfs:Transaction service="WFS" version="1.1.0"
        xmlns:sde="http://edats.com/sde&quot;
        xmlns:wfs="http://www.opengis.net/wfs&quot;
        xmlns="http://www.opengis.net/ogc&quot;
        xmlns:gml="http://www.opengis.net/gml&quot;
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
        xsi:schemaLocation="http://www.opengis.net/wfs
        http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd&quot;&gt;
          <wfs:Insert>
             <sde:projects>
                <sde:the_geom>
                          <gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>-9138285.595934153

        3123465.39563944 -9139604.134671887 3124143.7742653745
        -9139718.7902143 3121907.991188344 -9138285.595934153
        3123465.39563944</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>

                </sde:the_geom>
             </sde:projects>
          </wfs:Insert>
        </wfs:Transaction>

        ---------- BEGIN RESPONSE -----------
        <ows:ExceptionReport version="1.0.0"
        xsi:schemaLocation="http://www.opengis.net/ows
        http://72.158.105.13:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;

           <ows:Exception exceptionCode="NoApplicableCode">
              <ows:ExceptionText>
        java.io.IOException: Current fid
             index is null, next must be called before write()
             Current fid index is null, next must be called before write()
              </ows:ExceptionText>
           </ows:Exception>
        </ows:ExceptionReport>

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

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

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

        _______________________________________________
        Geoserver-users mailing list
        Geoserver-users@lists.sourceforge.net
        <mailto:Geoserver-users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/geoserver-users

    -- Justin Deoliveira
    OpenGeo - http://opengeo.org
    Enterprise support for open source geospatial.

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

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

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers

Hi Gabriel,

Shapefiles are correct, I misspoke in my initial email when I said it was an SDE datastore. I didn’t setup the store and I assumed the sde namespace meant my co-worker had set up an sde datastore. I apologize for the confusion. The shapefile is a simple test dataset with 3 records and no null values. It is available for download at http://72.158.105.9/~brandon/projects.zip (2.1KB).

On Mon, Mar 30, 2009 at 11:01 AM, Gabriel Roldan <groldan@anonymised.com.1671…> wrote:

Hi Brandon, cotinuing on the public thread.

Thanks for the log.I’m confused though, I thought you were trying ArcSDE? the log states you’re actually using shapefiles, so that they only happen to have the sde: namespace assigned?

Now, speaking of the shapefiles, I’m not sure but the error seems to indicate there’s no primary key or such?:

Caused by: java.io.IOException: Current fid index is null, next must be called before write()

at org.geotools.data.shapefile.indexed.IndexedFidWriter.write(IndexedFidWriter.java:245)

at org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.write(IndexedShapefileFeatureWriter.java:100)

at org.geotools.data.shapefile.ShapefileFeatureWriter.close(ShapefileFeatureWriter.java:218)

at org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.close(IndexedShapefileFeatureWriter.java:108)

at org.geotools.data.TransactionStateDiff.applyDiff(TransactionStateDiff.java:266)

at org.geotools.data.TransactionStateDiff.commit(TransactionStateDiff.java:151)

at org.geotools.data.DefaultTransaction.commit(DefaultTransaction.java:182)

at org.geoserver.wfs.Transaction.execute(Transaction.java:366)

at org.geoserver.wfs.Transaction.transaction(Transaction.java:108)

Please tell me whether you were trying to hit an ArcSDE server and just missconfigured your feature types or you’re actually testing those shapefiles so we know where to point weapons.

TIA,

Gabriel

Brandon Niemczyk wrote:

Thanks for the help.

I’ve attached geoserver.log and pasted the output of a

DescribeFeatureType below. Let me know if there is anything else I can
do to help.

<xsd:schema elementFormDefault=“qualified”
targetNamespace=“http://geoserver.sf.net”>
<xsd:import namespace=“http://www.opengis.net/gml
schemaLocation=“http://72.158.105.13:80/geoserver/schemas/gml/3.1.1/base/gml.xsd”/>
<xsd:complexType name=“projectsType”>
xsd:complexContent
<xsd:extension base=“gml:AbstractFeatureType”>
xsd:sequence
<xsd:element maxOccurs=“1” minOccurs=“0” name=“the_geom”
nillable=“true” type=“gml:MultiSurfacePropertyType”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“OBJECTID”
nillable=“true” type=“xsd:int”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“PROJECT_ID”
nillable=“true” type=“xsd:int”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“SHAPE_Leng”
nillable=“true” type=“xsd:double”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“SHAPE_Area”
nillable=“true” type=“xsd:double”/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name=“projects” substitutionGroup=“gml:_Feature”
type=“sde:projectsType”/>
</xsd:schema>

Gabriel Roldan wrote:

Brandon Niemczyk wrote:

Hi Justin,

Thanks for the help. I checked both ‘Verbose’ and ‘VerboseExceptions’ in Config → Server and the response is still the same, no stack trace is included. I tried restarting tomcat but that cleared Verbose and VerboseExceptions.

That may be because you didn’t hit the submit button, then the apply one, then the save one… weird uh? we’re working on simplifying that workflow for 2.0.

I would really need the stack trace to try to diagnose the problem, so could you please check if that’s the reason why you didn’t get the full stack trace before?

Also, please set the logging to the GEOTOOLS_DEVELOPER_LOGGING profile and send me back the geoserver.log file after the failure was reproduced by private email, and the output of a DescribeFeatureType request for your FeatureType.

Best regards,

Gabriel

It appears I was wrong about the arcsde part, after re-checking the configuration it appears that even though the layer had been setup in the sde namespace it was actually using shapefiles and I erroneously assumed it was actually an sde layer.

I’m using geoserver version 1.7.2.

I tried adding sde:fid3432</sde:fid> and sde:objectid34532</sde:objectid> below </sde:the_geom> in my request but i still get the same exception about the current FID index being null. In case it’s of any help, I put the shapefile in question up at http://72.158.105.9/~brandon/projects.zip (2.1KB)

On Fri, Mar 27, 2009 at 12:08 PM, Justin Deoliveira <jdeolive@anonymised.com mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)> wrote:

Hi Brandon,

Could you log into the interface, turn on verbose exceptions, and
include the entire stack trace. Thanks.

The error does however indicate an issue with primary keys. Gabriel
can better comment on how arcsde handles primary keys but you should
ensure there is nothing a miss with any of the keys on your table.

Also it would be helpful to know which version of geoserver you are
running. Thanks.

-Justin

Brandon Niemczyk wrote:

Hello,

I’m having trouble using geoserver and WFS-T to insert a new
record into an arcsde datastore. Every time I attempt it I get
a Java.IO Exception (included below). I’ve tried a few
different formats for the request based on the
WFS_transactionInsert.xml sample. Am I doing something wrong
(I’m still getting my feet wet wtih WFS-T, so I expect I am
doing something wrong), or is inserting new data into arcsde not
supported? I’ve included my sample request and the full
response below.

---------- BEGIN REQUEST ------------
<wfs:Transaction service=“WFS” version=“1.1.0”
xmlns:sde=“http://edats.com/sde
xmlns:wfs=“http://www.opengis.net/wfs
xmlns=“http://www.opengis.net/ogc
xmlns:gml=“http://www.opengis.net/gml
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=“http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd”>
wfs:Insert
sde:projects
sde:the_geom
gml:Polygongml:exteriorgml:LinearRinggml:posList-9138285.595934153
3123465.39563944 -9139604.134671887 3124143.7742653745
-9139718.7902143 3121907.991188344 -9138285.595934153
3123465.39563944</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>
</sde:the_geom>
</sde:projects>
</wfs:Insert>
</wfs:Transaction>

---------- BEGIN RESPONSE -----------
<ows:ExceptionReport version=“1.0.0”
xsi:schemaLocation=“http://www.opengis.net/ows
http://72.158.105.13:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd”>
<ows:Exception exceptionCode=“NoApplicableCode”>
ows:ExceptionText
java.io.IOException: Current fid
index is null, next must be called before write()
Current fid index is null, next must be called before write()
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>





Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
mailto:[Geoserver-users@lists.sourceforge.net](mailto:Geoserver-users@anonymised.comrge.net)
https://lists.sourceforge.net/lists/listinfo/geoserver-users

– Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.





Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers

Ok, a wfs insert still is not working but I’m making progress. I modified the datastore so that I am actually using ArcSDE now. I can successfully insert a new record, but the shape column in the arcsde database is always set to null. The request included in the below log output is what I am using to insert the new record. I think this is related to the srsName because geoserer log shows the srsName as null in a couple lines. I’ve also tried using 1.1.0 for the wfs version instead of 1.0.0 and it also succeeds but inserts a row with no gemoetry.

2009-04-06 17:02:18,930 DEBUG [org.geoserver.ows] - Raw XML request starts with: <wfs:Transaction service=“WFS” version=“1.0.0” xmlns:sde=“http://edats.com/sde” xmlns:wfs=“http://www.opengis.net/wfs” xmlns=“http://www.opengis.net/ogc” xmlns:gml=“http://www.opengis.net/gml” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd”>wfs:Insertsde:projectssde:the_geom<gml:MultiPolygon srsName=“EPSG:900913”>gml:polygonMember<gml:Polygon srsName=“EPSG:900913”>gml:outerBoundaryIsgml:LinearRinggml:coordinates-9138476.68850484,3123885.799294947 -9140062.756841535,3122194.6300443737 -9136565.762797976,3121879.327302741 -9138476.68850484,3123885.799294947</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></sde:the_geom></sde:projects></wfs:Insert></wfs:Transaction>
2009-04-06 17:02:18,977 INFO [org.geoserver.wfs] -
Request: getServiceInfo
2009-04-06 17:02:21,070 DEBUG [org.geoserver.wfs] - Locating FeatureSource uri:‘http://geoserver.sf.net’ name:‘projects’
2009-04-06 17:02:21,070 DEBUG [org.geoserver.wfs] - located FeatureType w/ typeRef ‘charlotte_cmp:projects’ and elementName ‘{http://geoserver.sf.net}projects’
2009-04-06 17:02:21,102 DEBUG [org.geoserver.wfs] - Transasction Insert:net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com (feature: [org.geotools.feature.simple.SimpleFeatureImpl@anonymised.com], handle: null, idgen: , inputFormat: , srsName: null)
2009-04-06 17:02:21,117 DEBUG [org.geoserver.wfs] - Use featureValidation to check contents of insert
2009-04-06 17:02:21,242 INFO [org.geoserver.wfs] -
Request: transaction
handle = null
service = WFS
version = 1.0.0
baseUrl = http://72.158.105.13:80/geoserver/
providedVersion = 1.0.0
lockId = null
group = [wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com295… (feature: [org.geotools.feature.simple.SimpleFeatureImpl@anonymised.com], handle: null, idgen: , inputFormat: , srsName: null)]
insert = [net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com (feature: [org.geotools.feature.simple.SimpleFeatureImpl@anonymised.com], handle: null, idgen: , inputFormat: , srsName: null)]
update =
delete =
native =
releaseAction = ALL

On Mon, Mar 30, 2009 at 11:36 AM, Brandon Niemczyk <bniemczyk@anonymised.com> wrote:

Hi Gabriel,

Shapefiles are correct, I misspoke in my initial email when I said it was an SDE datastore. I didn’t setup the store and I assumed the sde namespace meant my co-worker had set up an sde datastore. I apologize for the confusion. The shapefile is a simple test dataset with 3 records and no null values. It is available for download at http://72.158.105.9/~brandon/projects.zip (2.1KB).

On Mon, Mar 30, 2009 at 11:01 AM, Gabriel Roldan <groldan@anonymised.com> wrote:

Hi Brandon, cotinuing on the public thread.

Thanks for the log.I’m confused though, I thought you were trying ArcSDE? the log states you’re actually using shapefiles, so that they only happen to have the sde: namespace assigned?

Now, speaking of the shapefiles, I’m not sure but the error seems to indicate there’s no primary key or such?:

Caused by: java.io.IOException: Current fid index is null, next must be called before write()

at org.geotools.data.shapefile.indexed.IndexedFidWriter.write(IndexedFidWriter.java:245)

at org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.write(IndexedShapefileFeatureWriter.java:100)

at org.geotools.data.shapefile.ShapefileFeatureWriter.close(ShapefileFeatureWriter.java:218)

at org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.close(IndexedShapefileFeatureWriter.java:108)

at org.geotools.data.TransactionStateDiff.applyDiff(TransactionStateDiff.java:266)

at org.geotools.data.TransactionStateDiff.commit(TransactionStateDiff.java:151)

at org.geotools.data.DefaultTransaction.commit(DefaultTransaction.java:182)

at org.geoserver.wfs.Transaction.execute(Transaction.java:366)

at org.geoserver.wfs.Transaction.transaction(Transaction.java:108)

Please tell me whether you were trying to hit an ArcSDE server and just missconfigured your feature types or you’re actually testing those shapefiles so we know where to point weapons.

TIA,

Gabriel

Brandon Niemczyk wrote:

Thanks for the help.

I’ve attached geoserver.log and pasted the output of a

DescribeFeatureType below. Let me know if there is anything else I can
do to help.

<xsd:schema elementFormDefault=“qualified”
targetNamespace=“http://geoserver.sf.net”>
<xsd:import namespace=“http://www.opengis.net/gml
schemaLocation=“http://72.158.105.13:80/geoserver/schemas/gml/3.1.1/base/gml.xsd”/>
<xsd:complexType name=“projectsType”>
xsd:complexContent
<xsd:extension base=“gml:AbstractFeatureType”>
xsd:sequence
<xsd:element maxOccurs=“1” minOccurs=“0” name=“the_geom”
nillable=“true” type=“gml:MultiSurfacePropertyType”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“OBJECTID”
nillable=“true” type=“xsd:int”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“PROJECT_ID”
nillable=“true” type=“xsd:int”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“SHAPE_Leng”
nillable=“true” type=“xsd:double”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“SHAPE_Area”
nillable=“true” type=“xsd:double”/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name=“projects” substitutionGroup=“gml:_Feature”
type=“sde:projectsType”/>
</xsd:schema>

Gabriel Roldan wrote:

Brandon Niemczyk wrote:

Hi Justin,

Thanks for the help. I checked both ‘Verbose’ and ‘VerboseExceptions’ in Config → Server and the response is still the same, no stack trace is included. I tried restarting tomcat but that cleared Verbose and VerboseExceptions.

That may be because you didn’t hit the submit button, then the apply one, then the save one… weird uh? we’re working on simplifying that workflow for 2.0.

I would really need the stack trace to try to diagnose the problem, so could you please check if that’s the reason why you didn’t get the full stack trace before?

Also, please set the logging to the GEOTOOLS_DEVELOPER_LOGGING profile and send me back the geoserver.log file after the failure was reproduced by private email, and the output of a DescribeFeatureType request for your FeatureType.

Best regards,

Gabriel

It appears I was wrong about the arcsde part, after re-checking the configuration it appears that even though the layer had been setup in the sde namespace it was actually using shapefiles and I erroneously assumed it was actually an sde layer.

I’m using geoserver version 1.7.2.

I tried adding sde:fid3432</sde:fid> and sde:objectid34532</sde:objectid> below </sde:the_geom> in my request but i still get the same exception about the current FID index being null. In case it’s of any help, I put the shapefile in question up at http://72.158.105.9/~brandon/projects.zip (2.1KB)

On Fri, Mar 27, 2009 at 12:08 PM, Justin Deoliveira <jdeolive@anonymised.com mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)> wrote:

Hi Brandon,

Could you log into the interface, turn on verbose exceptions, and
include the entire stack trace. Thanks.

The error does however indicate an issue with primary keys. Gabriel
can better comment on how arcsde handles primary keys but you should
ensure there is nothing a miss with any of the keys on your table.

Also it would be helpful to know which version of geoserver you are
running. Thanks.

-Justin

Brandon Niemczyk wrote:

Hello,

I’m having trouble using geoserver and WFS-T to insert a new
record into an arcsde datastore. Every time I attempt it I get
a Java.IO Exception (included below). I’ve tried a few
different formats for the request based on the
WFS_transactionInsert.xml sample. Am I doing something wrong
(I’m still getting my feet wet wtih WFS-T, so I expect I am
doing something wrong), or is inserting new data into arcsde not
supported? I’ve included my sample request and the full
response below.

---------- BEGIN REQUEST ------------
<wfs:Transaction service=“WFS” version=“1.1.0”
xmlns:sde=“http://edats.com/sde
xmlns:wfs=“http://www.opengis.net/wfs
xmlns=“http://www.opengis.net/ogc
xmlns:gml=“http://www.opengis.net/gml
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=“http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd”>
wfs:Insert
sde:projects
sde:the_geom
gml:Polygongml:exteriorgml:LinearRinggml:posList-9138285.595934153
3123465.39563944 -9139604.134671887 3124143.7742653745
-9139718.7902143 3121907.991188344 -9138285.595934153
3123465.39563944</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon>
</sde:the_geom>
</sde:projects>
</wfs:Insert>
</wfs:Transaction>

---------- BEGIN RESPONSE -----------
<ows:ExceptionReport version=“1.0.0”
xsi:schemaLocation=“http://www.opengis.net/ows
http://72.158.105.13:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd”>
<ows:Exception exceptionCode=“NoApplicableCode”>
ows:ExceptionText
java.io.IOException: Current fid
index is null, next must be called before write()
Current fid index is null, next must be called before write()
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>





Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
mailto:[Geoserver-users@lists.sourceforge.net](mailto:Geoserver-users@anonymised.comrge.net)
https://lists.sourceforge.net/lists/listinfo/geoserver-users

– Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.





Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers