[Geoserver-devel] ServiceException While getting features from datasource

When try this getreature operation:
http://localhost:8080/geoserver/GetFeature?version=0.0.14&request=GETFEATURE&TYPENAME=carreteras

get this exception:

<ServiceExceptionReport version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ogc
../wfs/1.0.0/OGC-exception.xsd">
  <ServiceException locator="Class FeatureResponse, in method getQuery">
      While getting features from datasource: Error from the result set:
Expected number but encountered word: e-16
</ServiceException>
</ServiceExceptionReport>

My opengis database table is :
create table carreteras (
  gid int4 ,
   FNODE_ int4,
   TNODE_ int4,
   LPOLY_ int4,
   RPOLY_ int4,
   LENGTH float8,
   RDLINE_ int4,
   RDLINE_ID int4,
   RDLNTYPE varchar,
   RDLNSTAT varchar);
select
AddGeometryColumn('proyecto','carreteras','the_geom','-1','MULTILINESTRING',2);

schema.xml file is:
<xs:complexType name="carreteras_Type">
   <xs:complexContent>
       <xs:extension base="gml:AbstractFeatureType">
           <xs:sequence>
        <xs:element name="poblaciones.gid" type="integer" nillable="false"/>
      <xs:element name="poblaciones.fnode_" type="integer" nillable="false" />
      <xs:element name="poblaciones.tnode_" type="integer" nillable="false" />
    <xs:element name="poblaciones.lpoly_" type="xs:integer" nillable="false"/>
    <xs:element name="poblaciones.rpoly_" type="xs:integer" nillable="false"/>
     <xs:element name="poblaciones.length" type="xs:double" nillable="false"/>
   <xs:element name="poblaciones.rdline_" type="xs:integer" nillable="false"/>
<xs:element name="poblaciones.rdline_id" type="xs:integer" nillable="false"/>
                  <xs:element name="poblaciones.rdlntype" nillable="false">
                         <xs:simpleType>
                               <xs:restriction base="xs:string">
                               <xs:enumeration value="1"/>
                               <xs:enumeration value="2"/>
                               <xs:enumeration value="3"/>
                               <xs:enumeration value="8"/>
                            </xs:restriction>
                         </xs:simpleType>
                    </xs:element>
                    <xs:element name="poblaciones.rdlnstat" nillable="false">
                           <xs:simpleType>
                                <xs:restriction base="xs:string">
                                <xs:enumeration value="1"/>
                                <xs:enumeration value="2"/>
                                <xs:enumeration value="3"/>
                                <xs:enumeration value="4"/>
                                <xs:enumeration value="5"/>
                                <xs:enumeration value="6"/>
                                 <xs:enumeration value="9"/>
                             </xs:restriction>
                        </xs:simpleType>
                     </xs:element>
    <xs:element name="poblaciones.the_geom"
type="gml:MultiLineStringType" nillable="false"
/>
           </xs:sequence>
       </xs:extension>
   </xs:complexContent>
</xs:complexType>

info.xml file:
<?xml version="1.0" encoding="ISO-8859-15"?>
<featureType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
        <Name>carreteras</Name>
        <Title>Carreteras</Title>
        <Abstract>Covertura con las carreteras</Abstract>
        <Keywords>España, carreteras, multilineas</Keywords>
        <SRS>-1</SRS>
        <LatLonBoundingBox minx="-9.2643261" miny="35.281647" maxx="4.3074093"
maxy="43.742516"/>
        <DatasourceParams>
                <host>localhost</host>
                <port>5432</port>
                <database>proyecto</database>
                <user>cliente</user>
                <passwd>test</passwd>
                <table>carreteras</table>
                <dbtype>postgis</dbtype>
        </DatasourceParams>
</featureType>

Thanks in advance.

Do you have very small numbers in your database? Like
.0000000000000023452?

I'm pretty sure that's a problem with the JTS Topology Suite Well Known
Text Reader. I emailed their developers, and they said they'd try to fix
it soon. I haven't checked out the latest jts release, so maybe they got
the fix in there. This will also be fixed when we get around to
implementing Well Known Binary, which will speed things up and avoid
reading strings like e-16. The problem is that none of the specs seem to
state how well known text should represent very small numbers, so Postgis
returns 2.3452 e-16, jts returns 2.3452 E-16, and jts does not read either
of those.

If you need it fixed now, I would first try to download the latest jts
jar, and put that in the lib directory of geoserver. That may fix things
up. If it doesn't you can look into their io code, and get it to read the
e-16, as they'd probably be happy for that patch. Or I can try to bump
wkb support up my priority list, as it should naturally fix the problem.

Chris

On Mon, 5 May 2003, Manolo wrote:

When try this getreature operation:
http://localhost:8080/geoserver/GetFeature?version=0.0.14&request=GETFEATURE&TYPENAME=carreteras

get this exception:

<ServiceExceptionReport version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ogc
../wfs/1.0.0/OGC-exception.xsd">
  <ServiceException locator="Class FeatureResponse, in method getQuery">
      While getting features from datasource: Error from the result set:
Expected number but encountered word: e-16
</ServiceException>
</ServiceExceptionReport>

My opengis database table is :
create table carreteras (
  gid int4 ,
   FNODE_ int4,
   TNODE_ int4,
   LPOLY_ int4,
   RPOLY_ int4,
   LENGTH float8,
   RDLINE_ int4,
   RDLINE_ID int4,
   RDLNTYPE varchar,
   RDLNSTAT varchar);
select
AddGeometryColumn('proyecto','carreteras','the_geom','-1','MULTILINESTRING',2);

schema.xml file is:
<xs:complexType name="carreteras_Type">
   <xs:complexContent>
       <xs:extension base="gml:AbstractFeatureType">
           <xs:sequence>
        <xs:element name="poblaciones.gid" type="integer" nillable="false"/>
      <xs:element name="poblaciones.fnode_" type="integer" nillable="false" />
      <xs:element name="poblaciones.tnode_" type="integer" nillable="false" />
    <xs:element name="poblaciones.lpoly_" type="xs:integer" nillable="false"/>
    <xs:element name="poblaciones.rpoly_" type="xs:integer" nillable="false"/>
     <xs:element name="poblaciones.length" type="xs:double" nillable="false"/>
   <xs:element name="poblaciones.rdline_" type="xs:integer" nillable="false"/>
<xs:element name="poblaciones.rdline_id" type="xs:integer" nillable="false"/>
                  <xs:element name="poblaciones.rdlntype" nillable="false">
                         <xs:simpleType>
                               <xs:restriction base="xs:string">
                               <xs:enumeration value="1"/>
                               <xs:enumeration value="2"/>
                               <xs:enumeration value="3"/>
                               <xs:enumeration value="8"/>
                            </xs:restriction>
                         </xs:simpleType>
                    </xs:element>
                    <xs:element name="poblaciones.rdlnstat" nillable="false">
                           <xs:simpleType>
                                <xs:restriction base="xs:string">
                                <xs:enumeration value="1"/>
                                <xs:enumeration value="2"/>
                                <xs:enumeration value="3"/>
                                <xs:enumeration value="4"/>
                                <xs:enumeration value="5"/>
                                <xs:enumeration value="6"/>
                                 <xs:enumeration value="9"/>
                             </xs:restriction>
                        </xs:simpleType>
                     </xs:element>
    <xs:element name="poblaciones.the_geom"
type="gml:MultiLineStringType" nillable="false"
/>
           </xs:sequence>
       </xs:extension>
   </xs:complexContent>
</xs:complexType>

info.xml file:
<?xml version="1.0" encoding="ISO-8859-15"?>
<featureType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
        <Name>carreteras</Name>
        <Title>Carreteras</Title>
        <Abstract>Covertura con las carreteras</Abstract>
        <Keywords>España, carreteras, multilineas</Keywords>
        <SRS>-1</SRS>
        <LatLonBoundingBox minx="-9.2643261" miny="35.281647" maxx="4.3074093"
maxy="43.742516"/>
        <DatasourceParams>
                <host>localhost</host>
                <port>5432</port>
                <database>proyecto</database>
                <user>cliente</user>
                <passwd>test</passwd>
                <table>carreteras</table>
                <dbtype>postgis</dbtype>
        </DatasourceParams>
</featureType>

Thanks in advance.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel