[Geoserver-devel] retriving data from postgisDB with geoserver ?

Hi

I hope someone can help me out here. (sorry the long posting)

I have an postgisDB (postgis 0.7.3) running with an mapserver and ~10 layers

I wanted to try out to use geoserver (0.93) to retrive the data from the postgisDB, and
have made the info.xml & schema.xml files, but when trying to retrive data with
http://<hostname>:8080/geoserver/GetFeature?version=1.0.0&typeName=bjorneklo
I will get the attached http error:

it seems that the geoserv don't recive the selected data from postgis, when making the
sql "SELECT oid, gid, forekomst, comment, email, ip, dato, lokalitet, antal, areal, AsText(the_geom), objectid FROM
bjorneklo LIMIT 500;" mannualy the result for the testdata i 7 lines.

So what goes wrong ? did I do somthing wrong in the info/scema.xml file ?

regards
niels

-- (http error)
- <WFS_Exception>
  - <Exception>
      <Locator>Class FeatureResponse, in method getQuery</Locator>
  - <Message>
      While getting features from datasource: Error from the result set: null
    </Message>
  </Exception>
</WFS_Exception>

- the connection to the DB is ok, I can se several sql requests in the /usr/local/pgsql/data/serverlog like:

DEBUG: StartTransactionCommand
DEBUG: query: SELECT type FROM GEOMETRY_COLUMNS WHERE f_table_name='bjorneklo' AND f_geometry_column='the_geom';
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT srid FROM GEOMETRY_COLUMNS WHERE f_table_name='bjorneklo';
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT '' as TABLE_CAT,'' AS TABLE_SCHEM,bc.relname AS TABLE_NAME,a.attname AS COLUMN_NAME,a.attnum as KEY_SEQ,ic.relname as PK_NAME FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.relkind = 'r' and upper(bc.relname) = upper('bjorneklo') and i.indrelid = bc.oid and i.indexrelid = ic.oid and ic.oid = a.attrelid and i.indisprimary='t' ORDER BY table_name, pk_name, key_seq
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT oid, gid, forekomst, comment, email, ip, dato, lokalitet, antal, areal, AsText(the_geom), objectid FROM
bjorneklo LIMIT 500;
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand

--
the log from /var/log/catalina.out says:
java.lang.NullPointerException
        at org.geotools.feature.FeatureFlat.createNew(FeatureFlat.java:115)
        at org.geotools.feature.FeatureFlat.<init>(FeatureFlat.java:70)
        at org.geotools.feature.FeatureFactory.create(FeatureFactory.java:94)
        at org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:584)
        at org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:512)
        at org.vfny.geoserver.responses.FeatureResponse.getQuery(Unknown Source)
        at org.vfny.geoserver.responses.FeatureResponse.getXmlResponse(Unknown Source)
        at org.vfny.geoserver.servlets.Feature.doGet(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
        at java.lang.Thread.run(Thread.java:536)
--
the table bjorneklo is created as:
             Table "bjorneklo"
  Column | Type | Modifiers
-----------+-------------------+-----------
gid | integer |
forekomst | character varying |
comment | character varying |
email | character varying |
ip | character varying |
dato | character varying |
lokalitet | character varying |
antal | character varying |
areal | character varying |
the_geom | geometry |
objectid | integer |
Check constraints: "$1" (srid(the_geom) = -1)
                   "$2" ((geometrytype(the_geom) = 'POINT'::text) OR (the_geom IS NULL))
--
info.xml:
<?xml version="1.0" encoding="UTF-8"?>
<featureType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;

  <Name>bjorneklo</Name>
  <Title>Forekomster af Bjorneklo</Title>
  <Abstract>Forekomster af bjorneklo i Viborg Amt</Abstract>
  <Keywords>Bjorneklo, Viborg Amt</Keywords>
  <SRS>EPSG:23032</SRS>
  <Operations/>

  <LatLonBoundingBox minx="-174.561" miny="-8.20422e+12" maxx="154.107" maxy="8.20422e+12" />

   <MetadataURL>
    <url>none</url>
    <format>XML</format>
    <type>TC211</type>
  </MetadataURL>

  <Host>localhost</Host>
  <Port>5432</Port>
  <DatabaseName>vibamt</DatabaseName>
  <User>gis</User>
  <Password></Password>
</featureType>
--
scema.xml :
<xs:complexType name="bjorneklo_Type">
    <xs:complexContent>
      <xs:extension base="gml:AbstractFeatureType">
        <xs:sequence>

          <xs:element name="bjorneklo.gid" nillable="true" minOccurs="0" maxOccurs="1">
          </xs:element>

          <xs:element name="bjorneklo.forekomst" nillable="true" minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.comment" nillable="true" minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.email" nillable="true" minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.ip" nillable="true" minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.dato" nillable="true" minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.lokalitet" nillable="true" minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.antal" nillable="true" minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.areal" nillable="true" minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.the_geom" type="gml:PointPropertyType" nillable="false" minOccurs="1" maxOccurs="1"/>

          <xs:element name="bjorneklo.objectid" nillable="true" minOccurs="0" maxOccurs="1">
          </xs:element>

        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

No, you're doing nothing wrong, and the info.xml and schema.xml files look
fine. And don't apologize for the long post...we much prefer the detailed
message you've provided, as it makes it far easier to figure out exactly
what's going wrong. You've run across a bug in the last release that
doesn't deal with null values from postgis. If you were to remove all
rows that have nulls for one or more of their columns then it should work.
This is because geotools, on top of which geoserver is built, initially
did not allow nulls in features, in order to simplify things. This bug is
fixed in CVS, and will be the next release. I should get the 0.94 release
out sometime friday the 11th (though it's probably going to be later in
the day US time, as I'm getting a bit behind this week, but you'll
definitely be able to download it on the 12th). So you can get rid of the
null rows, or just wait till next week and get the latest version
(which is recommended, as there are other bug fixes and improvements).

Chris

On Wed, 9 Apr 2003, Niels Svennekjær wrote:

Hi

I hope someone can help me out here. (sorry the long posting)

I have an postgisDB (postgis 0.7.3) running with an mapserver and ~10 layers

I wanted to try out to use geoserver (0.93) to retrive the data from the
postgisDB, and
have made the info.xml & schema.xml files, but when trying to retrive
data with
http://<hostname>:8080/geoserver/GetFeature?version=1.0.0&typeName=bjorneklo
I will get the attached http error:

it seems that the geoserv don't recive the selected data from postgis,
when making the
sql "SELECT oid, gid, forekomst, comment, email, ip, dato, lokalitet,
antal, areal, AsText(the_geom), objectid FROM
bjorneklo LIMIT 500;" mannualy the result for the testdata i 7 lines.

So what goes wrong ? did I do somthing wrong in the info/scema.xml file ?

regards
niels

-- (http error)
- <WFS_Exception>
  - <Exception>
      <Locator>Class FeatureResponse, in method getQuery</Locator>
  - <Message>
      While getting features from datasource: Error from the result set:
null
    </Message>
  </Exception>
</WFS_Exception>

- the connection to the DB is ok, I can se several sql requests in the
/usr/local/pgsql/data/serverlog like:

DEBUG: StartTransactionCommand
DEBUG: query: SELECT type FROM GEOMETRY_COLUMNS WHERE
f_table_name='bjorneklo' AND f_geometry_column='the_geom';
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT srid FROM GEOMETRY_COLUMNS WHERE
f_table_name='bjorneklo';
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT '' as TABLE_CAT,'' AS TABLE_SCHEM,bc.relname AS
TABLE_NAME,a.attname AS COLUMN_NAME,a.attnum as KEY_SEQ,ic.relname as
PK_NAME FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE
bc.relkind = 'r' and upper(bc.relname) = upper('bjorneklo') and
i.indrelid = bc.oid and i.indexrelid = ic.oid and ic.oid = a.attrelid
and i.indisprimary='t' ORDER BY table_name, pk_name, key_seq
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT oid, gid, forekomst, comment, email, ip, dato,
lokalitet, antal, areal, AsText(the_geom), objectid FROM
bjorneklo LIMIT 500;
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand

--
the log from /var/log/catalina.out says:
java.lang.NullPointerException
        at org.geotools.feature.FeatureFlat.createNew(FeatureFlat.java:115)
        at org.geotools.feature.FeatureFlat.<init>(FeatureFlat.java:70)
        at
org.geotools.feature.FeatureFactory.create(FeatureFactory.java:94)
        at
org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:584)
        at
org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:512)
        at org.vfny.geoserver.responses.FeatureResponse.getQuery(Unknown
Source)
        at
org.vfny.geoserver.responses.FeatureResponse.getXmlResponse(Unknown Source)
        at org.vfny.geoserver.servlets.Feature.doGet(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
        at java.lang.Thread.run(Thread.java:536)
--
the table bjorneklo is created as:
             Table "bjorneklo"
  Column | Type | Modifiers
-----------+-------------------+-----------
gid | integer |
forekomst | character varying |
comment | character varying |
email | character varying |
ip | character varying |
dato | character varying |
lokalitet | character varying |
antal | character varying |
areal | character varying |
the_geom | geometry |
objectid | integer |
Check constraints: "$1" (srid(the_geom) = -1)
                   "$2" ((geometrytype(the_geom) = 'POINT'::text) OR
(the_geom IS NULL))
--
info.xml:
<?xml version="1.0" encoding="UTF-8"?>
<featureType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;

  <Name>bjorneklo</Name>
  <Title>Forekomster af Bjorneklo</Title>
  <Abstract>Forekomster af bjorneklo i Viborg Amt</Abstract>
  <Keywords>Bjorneklo, Viborg Amt</Keywords>
  <SRS>EPSG:23032</SRS>
  <Operations/>

  <LatLonBoundingBox minx="-174.561" miny="-8.20422e+12" maxx="154.107"
maxy="8.20422e+12" />

   <MetadataURL>
    <url>none</url>
    <format>XML</format>
    <type>TC211</type>
  </MetadataURL>

  <Host>localhost</Host>
  <Port>5432</Port>
  <DatabaseName>vibamt</DatabaseName>
  <User>gis</User>
  <Password></Password>
</featureType>
--
scema.xml :
<xs:complexType name="bjorneklo_Type">
    <xs:complexContent>
      <xs:extension base="gml:AbstractFeatureType">
        <xs:sequence>

          <xs:element name="bjorneklo.gid" nillable="true" minOccurs="0"
maxOccurs="1">
          </xs:element>

          <xs:element name="bjorneklo.forekomst" nillable="true"
minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.comment" nillable="true"
minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.email" nillable="true"
minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.ip" nillable="true" minOccurs="0"
maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.dato" nillable="true"
minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.lokalitet" nillable="true"
minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.antal" nillable="true"
minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.areal" nillable="true"
minOccurs="0" maxOccurs="1">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="100"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>

          <xs:element name="bjorneklo.the_geom"
type="gml:PointPropertyType" nillable="false" minOccurs="1" maxOccurs="1"/>

          <xs:element name="bjorneklo.objectid" nillable="true"
minOccurs="0" maxOccurs="1">
          </xs:element>

        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

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

Hi

OK, I did take the CVS solution, and now I don't get any errors in any of the logfiles
but still no data comes, the result is:

request:
http://131.165.211.29:8080/geoserver/GetFeature?version=1.0.0&typeName=bjorneklo

response:
- <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">
         Could not find Feature Type named: bjorneklo, feature information is not in the data folder.
    </ServiceException>
</ServiceExceptionReport>

but it now seems that it never reachec the DB, are there extra infos to be adapted to the
xml files ? (config, build, info, schema)

the info & schema resides in /var/tomcat4/webapps/geoserver/data/featureTypes/bjorneklo

- niels

Chris Holmes wrote:

No, you're doing nothing wrong, and the info.xml and schema.xml files look
fine. And don't apologize for the long post...we much prefer the detailed
message you've provided, as it makes it far easier to figure out exactly
what's going wrong. You've run across a bug in the last release that
doesn't deal with null values from postgis. If you were to remove all
rows that have nulls for one or more of their columns then it should work. This is because geotools, on top of which geoserver is built, initially
did not allow nulls in features, in order to simplify things. This bug is
fixed in CVS, and will be the next release. I should get the 0.94 release
out sometime friday the 11th (though it's probably going to be later in
the day US time, as I'm getting a bit behind this week, but you'll
definitely be able to download it on the 12th). So you can get rid of the
null rows, or just wait till next week and get the latest version
(which is recommended, as there are other bug fixes and improvements).

Chris

<snip, please look at old posting :slight_smile: />

Hmmm... So cvs has a number of changes to properly handle namespaces, but
I thought I made everything backwards compatible. It might work if you
try it with the proper namespace prefix. To figure out what that is do a
GetCapabilities request, and look at the name of the feature, it should
probably be myns:bjorneklo (although the prefix may be different). So
your request should be
http://131.165.211.29:8080/geoserver/GetFeature?typeName=myns:bjorneklo

If that doesn't work than go to the source of
org.vfny.geoserver.servlets.FreefsLog and change line 34 to Level.FINER,
and send me the output from the log when you try the request. (Yes, I am
going to make it easier to change the logging, if not this release than
the one after).

Hope this helps,

Chris

On Wed, 9 Apr 2003, Niels Svennekjær wrote:

Hi

OK, I did take the CVS solution, and now I don't get any errors in any
of the logfiles
but still no data comes, the result is:

request:
http://131.165.211.29:8080/geoserver/GetFeature?version=1.0.0&typeName=bjorneklo

response:
- <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">
         Could not find Feature Type named: bjorneklo, feature
information is not in the data folder.
    </ServiceException>
</ServiceExceptionReport>

but it now seems that it never reachec the DB, are there extra infos to
be adapted to the
xml files ? (config, build, info, schema)

the info & schema resides in
/var/tomcat4/webapps/geoserver/data/featureTypes/bjorneklo

- niels

Chris Holmes wrote:

>No, you're doing nothing wrong, and the info.xml and schema.xml files look
>fine. And don't apologize for the long post...we much prefer the detailed
>message you've provided, as it makes it far easier to figure out exactly
>what's going wrong. You've run across a bug in the last release that
>doesn't deal with null values from postgis. If you were to remove all
>rows that have nulls for one or more of their columns then it should work.
>This is because geotools, on top of which geoserver is built, initially
>did not allow nulls in features, in order to simplify things. This bug is
>fixed in CVS, and will be the next release. I should get the 0.94 release
>out sometime friday the 11th (though it's probably going to be later in
>the day US time, as I'm getting a bit behind this week, but you'll
>definitely be able to download it on the 12th). So you can get rid of the
>null rows, or just wait till next week and get the latest version
>(which is recommended, as there are other bug fixes and improvements).
>
>
>Chris
>
>
>
<snip, please look at old posting :slight_smile: />

Hmmm... So cvs has a number of changes to properly handle namespaces, but
I thought I made everything backwards compatible. It might work if you
try it with the proper namespace prefix. To figure out what that is do a
GetCapabilities request, and look at the name of the feature, it should
probably be myns:bjorneklo (although the prefix may be different). So
your request should be
http://131.165.211.29:8080/geoserver/GetFeature?typeName=myns:bjorneklo

Didn't work

If that doesn't work than go to the source of
org.vfny.geoserver.servlets.FreefsLog and change line 34 to Level.FINER,
and send me the output from the log when you try the request. (Yes, I am
going to make it easier to change the logging, if not this release than
the one after).

Ahh, there was the debuglevel controle, FINER didn't give so mutch info so I did use FINEST
(and now there was comming output)

The following 4 dir's is in data/featuretype: bjorneklo, rail, roads, topp:road
but 'roads' is empty in CVS

There have been made following 3 requests

http://131.165.211.29:8080/geoserver/GetFeature?typeName=bjorneklo
http://131.165.211.29:8080/geoserver/GetFeature?typeName=myns:bjorneklo

The first have been made 2 times because the first time if did return an Execption
--
java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:389)
at java.util.Properties.setProperty(Properties.java:102)
at org.vfny.geoserver.config.FeatureType.getDataParams(Unknown Source)
at org.vfny.geoserver.config.FeatureType.getInstance(Unknown Source)
at org.vfny.geoserver.config.TypeInfo.readTypeInfo(Unknown Source)
at org.vfny.geoserver.config.TypeInfo.(Unknown Source)
--

The catalina.out log is attached (I don''t know if that will come trough sourceforge)

- niels

(attachments)

catalina.out (15.8 KB)

Ok, I got it. Thanks for the logs, and for taking the time to investigate
this bug, I definitely wouldn't have found it on my own for this release.
The problem was that the password tag had nothing in it, and in my
changing of the configuration, I accidentally was trying to put a null
instead of an empty string if I didn't find a value. So it's now fixed in
CVS, and should hopefully get things working for you. Just do an update,
and it should come in.

thanks,

  Chris

On Thu, 10 Apr 2003, Niels Svennekjær wrote:

>
>
>Hmmm... So cvs has a number of changes to properly handle namespaces, but
>I thought I made everything backwards compatible. It might work if you
>try it with the proper namespace prefix. To figure out what that is do a
>GetCapabilities request, and look at the name of the feature, it should
>probably be myns:bjorneklo (although the prefix may be different). So
>your request should be
>http://131.165.211.29:8080/geoserver/GetFeature?typeName=myns:bjorneklo
>

Didn't work

>If that doesn't work than go to the source of
>org.vfny.geoserver.servlets.FreefsLog and change line 34 to Level.FINER,
>and send me the output from the log when you try the request. (Yes, I am
>going to make it easier to change the logging, if not this release than
>the one after).
>
Ahh, there was the debuglevel controle, FINER didn't give so mutch info
so I did use FINEST
(and now there was comming output)

The following 4 dir's is in data/featuretype: bjorneklo, rail, roads,
topp:road
but 'roads' is empty in CVS

There have been made following 3 requests

http://131.165.211.29:8080/geoserver/GetFeature?typeName=bjorneklo
http://131.165.211.29:8080/geoserver/GetFeature?typeName=bjorneklo
http://131.165.211.29:8080/geoserver/GetFeature?typeName=myns:bjorneklo

The first have been made 2 times because the first time if did return an
Execption
--
java.lang.NullPointerException at
java.util.Hashtable.put(Hashtable.java:389)
at java.util.Properties.setProperty(Properties.java:102)
at org.vfny.geoserver.config.FeatureType.getDataParams(Unknown Source)
at org.vfny.geoserver.config.FeatureType.getInstance(Unknown Source)
at org.vfny.geoserver.config.FeatureType.getInstance(Unknown Source)
at org.vfny.geoserver.config.TypeInfo.readTypeInfo(Unknown Source)
at org.vfny.geoserver.config.TypeInfo.(Unknown Source)
--

The catalina.out log is attached (I don''t know if that will come trough
sourceforge)

- niels

Hi

Thanks, it works now, and I am getting the data now in XML as expected.
(though another challenge did occure, but I will create an new threat aboud that)

- niels

Ok, I got it. Thanks for the logs, and for taking the time to investigate this bug, I definitely wouldn't have found it on my own for this release. The problem was that the password tag had nothing in it, and in my changing of the configuration, I accidentally was trying to put a null instead of an empty string if I didn't find a value. So it's now fixed in CVS, and should hopefully get things working for you. Just do an update, and it should come in.

thanks,

Chris