OK - I went with the JAVA_OPTS suggestion and the Java heap space problem has
gone, but disappointingly the previous error has returned.
To answer your earlier question, I can now get a simple feature displayed from
the table I'm using. The output is attached in case that's helpful.
Cheers,
Will
-----Original Message-----
From: Ben Caradoc-Davies [mailto:ben.caradoc-dav...@csiro.au]
Sent: 17 December 2010 01:43
To: Rogers, Will (STFC,RAL,ESC)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] app-schema mapping geometry column in PostGIS
Will,
are you running 64-bit Java? If so, I strongly recommend using Oracle
(AKA Sun) Java 6 with the JVM argument -XX:+UseCompressedOops to reduce
memory footprint. Also, I am not sure that setting root's CATALINA_OPTS
is the canonical [1] way of setting this. Can you see these options in
the java process commandline?
ps auxwwwww | grep tomcat6
Under Debian Lenny we set JAVA_OPTS in /etc/default/tomcat6, which I
have been advised is the canonical [1] location for configuring this
service. I don't know if Ubuntu does the same.
Kind regards,
Ben.
[1] canonical with a small c. :-)
On 17/12/10 01:29, will.rog...@stfc.ac.uk wrote:
> Thanks for the response - I've been tied up with other things a bit.
>
> After ensuring that the geometry column WAS registered (a number of my
> experiments may have meant this wasn't the case), I'm instead getting a:
>
> java.lang.OutOfMemoryError: Java heap space
> Java heap space
>
> Is this reasonably likely with what I'm trying to do, or does it tell me that
> there's still something wrong? The request is:
> http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=hy-p:Watercourse&maxFeatures=1
>
> I've attempted to increase the heap space as follows:
>
> w...@will-desktop:~$ sudo bash
> [sudo] password for will:
> r...@will-desktop:~# export CATALINA_OPTS="-Xmx512m -Xms512m"
> r...@will-desktop:~# service tomcat6 restart
> ...
> [
> OK ]
>
> But I still get the error. I include the above because it is possible that
> what I've done will not have the desired effect. Tomcat is running in an
> Ubuntu virtual machine which has 1GB RAM allocated.
>
> Any more thoughts? Thanks for the help.
>
> Cheers,
> Will
>
>
> -----Original Message-----
> From: Ben Caradoc-Davies [mailto:ben.caradoc-dav...@csiro.au]
> Sent: 09 December 2010 03:14
> To: Rogers, Will (STFC,RAL,ESC)
> Cc: geoserver-users@lists.sourceforge.net
> Subject: Re: [Geoserver-users] app-schema mapping geometry column in PostGIS
>
> Will,
>
> I have a few more questions:
>
> - Can you publish this table as a GeoServer simple feature? For example,
> can you use the GeoServer GUI to add a new data store for your database,
> publish the rivers_polyline layer, and make a WFS GML 3.1 request
> against it? This will help us diagnose whether it is the simple feature
> layer or the app-schema layer that is having problems.
>
> - When you view the table as a GML 3.1 (WFS 1.1) simple feature, are the
> geometries correctly encoded?
>
> - Are all your geometries in this column the same type? I don't think
> GeoServer will like a mix.
>
> - Is this geometry column registered in geometry_columns? Bad Things
> Will Happen if it is not correctly registered.
>
> Kind regards,
> Ben.
>
>
> On 09/12/10 00:09, will.rog...@stfc.ac.uk wrote:
>> That was what we thought. But we don't know why it's null.
>>
>> 'select count(*) from rivers_polyline where the_geom is null' gives 0.
>>
>> It now looks like we should be able to map a LineString on to the
>> GeometricPrimitivePropertyType, so we're not sure what else might be wrong.
>>
>> -----Original Message-----
>> From: Ben Caradoc-Davies [mailto:ben.caradoc-dav...@csiro.au]
>> Sent: 08 December 2010 05:35
>> To: Rogers, Will (STFC,RAL,ESC)
>> Cc: geoserver-users@lists.sourceforge.net
>> Subject: Re: [Geoserver-users] app-schema mapping geometry column in PostGIS
>>
>> On 07/12/10 20:18, will.rog...@stfc.ac.uk wrote:
>>> The exception I get is:
>>> <ows:ExceptionText>
>>> org.geotools.feature.IllegalAttributeException:http://www.opengis.net/gml:GeometricPrimitivePropertyType
>>> not nillable:null value:null
>>> http://www.opengis.net/gml:GeometricPrimitivePropertyType not nillable
>>> </ows:ExceptionText>
>> [...]
>>> Does anyone have any idea what's wrong with this? I can provide more
>>> details if necessary.
>>
>> This error is caused by mapping a null from your database into a
>> mandatory property. hy-p:geometry is a mandatory property of
>> hy-p:SurfaceWaterType. The error is telling you that this property is
>> not nillable and has a null value.
>>
>> What do you get for this?
>> select count(1) from yourtablename where isnull(the_geom);
>>
>> app-schema supports conditional mappings of properties (even choosing
>> between xlink:href and values) but I am not sure this will work in your
>> case because geometries are handled as atomic types by GeoServer and
>> app-schema has only limited ability to manipulate them:
>> http://docs.geoserver.org/latest/en/user/data/app-schema/polymorphism.html
>>
>
>
--
Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
--
Scanned by iCritical.
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection numberOfFeatures="1" timeStamp="2010-12-17T14:14:17.301Z" xsi:schemaLocation="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0 http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=hy-p%3Arivers_linestring http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd" xmlns:GB_NORTH="http://geotod.org/GB_NORTH" xmlns:test="http://geotod.org/test" xmlns:ogc="http://www.opengis.net/ogc" xmlns:tn-ra="urn:x-inspire:specification:gmlas:RailwayTransportNetwork:3.0" xmlns:cite="http://www.opengeospatial.net/cite" xmlns:net="urn:x-inspire:specification:gmlas:Network:3.2" xmlns:hy-p="urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gsml="urn:cgi:xmlns:CGI:GeoSciML:2.0" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink"><gml:featureMembers><hy-p:rivers_linestring gml:id="rivers_linestring.fid-db09997_12cf39acb18_-7ffd"><gml:name>Leeds & Liverpool Canal</gml:name><hy-p:gid>19</hy-p:gid><hy-p:code>5240</hy-p:code><hy-p:legend>Canal</hy-p:legend><hy-p:file_name>gb_north</hy-p:file_name><hy-p:number>86432</hy-p:number><hy-p:name>Leeds & Liverpool Canal</hy-p:name><hy-p:imperial>-9999</hy-p:imperial><hy-p:metric>-9999</hy-p:metric><hy-p:gid2>19</hy-p:gid2><hy-p:the_geom><gml:LineString srsName="urn:x-ogc:def:crs:EPSG:27700"><gml:posList>384145.0 840973.0 384131.0 841002.0 383980.0 841310.0 383920.0 841460.0 383850.0 841640.0 383820.0 841810.0 383810.0 842000.0 383770.0 842100.0 383660.0 842180.0 383590.0 842230.0 383600.0 842440.0 383580.0 842590.0 383600.0 842770.0 383670.0 842870.0 383730.0 843000.0 383750.0 843130.0 383720.0 843200.0 383620.0 843340.0 383550.0 843480.0 383380.0 843610.0 383250.0 843720.0 383160.0 843940.0 383115.0 844017.0 383060.0 844110.0 382800.0 844370.0 382760.0 844470.0 382820.0 844730.0 382870.0 844920.0 382850.0 845060.0 382720.0 845270.0 382530.0 845380.0 382351.0 845443.0 382300.0 845460.0 382130.0 845550.0 381960.0 845700.0 381840.0 845860.0 381650.0 845870.0 381520.0 845950.0 381450.0 846100.0 381298.0 846210.0 381270.0 846230.0 381120.0 846270.0 380970.0 846420.0 380800.0 846550.0</gml:posList></gml:LineString></hy-p:the_geom></hy-p:rivers_linestring></gml:featureMembers></wfs:FeatureCollection>
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users