banniere

Le portail francophone de la géomatique


Toujours pas inscrit ? Mot de passe oublié ?
Nom d'utilisateur    Mot de passe              Toujours pas inscrit ?   Mot de passe oublié ?

Annonce

Rencontres QGIS 2025

L'appel à participation est ouvert jusqu'au 19 janvier 2025!

#1 Thu 17 February 2011 09:48

nicolas.leclerc
Participant actif
Date d'inscription: 8 Apr 2009
Messages: 78

[tinyows + Windows server R2] tinyows.exe a cessé de fonctionner...

Bonjour à tous,

nous sommes en train de mettre en place une plate-forme basé sur windows server R2 (à jour), MS4W 3.0.1, tinyows-0.9.0-ms4w3.0, openlayers 2.10, postgresql 9.0.3 et le dernier svn de postgis 2.0.0 (r6834).

Le but étant d'avoir un serveur WFT-S fonctionnel. J'ai suivi le tutoriel de géotribu (http://www.geotribu.net/node/264).

Ma couche s'affiche correctement en WFS (tinyows est donc parfaitement fonctionnel à ce moment là).

Lorsque j'essaie d'afficher ma couche afin de pouvoir l'éditer (donc en wfs-t) elle ne s'affiche pas.

Comme le précise le tutoriel j'essaie la ligne de commande :

./tinyows --check

et là message d'erreur :

C:\ms4w\Apache\cgi-bin>tinyows.exe --check
TinyOWS version:   0.9.0
FCGI support:      Yes
Config File Path:  @prefix@/tinyows/config.xml

Assertion failed: !o->exit, file src\ows\ows_error.c, line 77

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

puis une fenêtre windows : tinyows.exe a cessé de fonctionner


Je ne sais plus ou chercher ! Erreur de code ou de configuration ??

Je vous transmets mon code ol :

Code:

var map, wfs;
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
 
var DeleteFeature = OpenLayers.Class(OpenLayers.Control, {
    initialize: function(layer, options) {
        OpenLayers.Control.prototype.initialize.apply(this, [options]);
        this.layer = layer;
        this.handler = new OpenLayers.Handler.Feature(
            this, layer, {click: this.clickFeature}
        );
    },
    clickFeature: function(feature) {
        // if feature doesn't have a fid, destroy it
        if(feature.fid == undefined) {
            this.layer.destroyFeatures([feature]);
        } else {
            feature.state = OpenLayers.State.DELETE;
            this.layer.events.triggerEvent("afterfeaturemodified", 
                                           {feature: feature});
            feature.renderIntent = "select";
            this.layer.drawFeature(feature);
        }
    },
    setMap: function(map) {
        this.handler.setMap(map);
        OpenLayers.Control.prototype.setMap.apply(this, arguments);
    },
    CLASS_NAME: "OpenLayers.Control.DeleteFeature"
});
 
 
 
function showMsg(szMessage) {
    document.getElementById("message").innerHTML = szMessage;
    setTimeout(
        "document.getElementById('message').innerHTML = ''",2000);
}
 
function showSuccessMsg(){
    showMsg("Transaction successfully completed");
};
 
function showFailureMsg(){
    showMsg("An error occured while operating the transaction");
};
 
 
function init() {
    map = new OpenLayers.Map('map', {
        projection: new OpenLayers.Projection("EPSG:2154"),
        units: "m",
        maxResolution: "auto",
        maxExtent: new OpenLayers.Bounds(99226,6049647,1242375,7110524),
        controls: [
            new OpenLayers.Control.PanZoom()
        ]
    });
 
    var osm = new OpenLayers.Layer.WMS("OpenLayers WMS",
        "http://www.geosignal.org/cgi-bin/wmsmap?",
        {layers: "Regions,Departements",
     projection:"EPSG:2154",
         units: "m",
     maxResolution: "auto",
     maxExtent: new OpenLayers.Bounds(99226,6049647,1242375,7110524),
     sld: "http://www.tinyows.org/tracdocs/demo/OpenLayers-2.9/examples/sld.xml"
    }
    );
 
    var saveStrategy = new OpenLayers.Strategy.Save();
    saveStrategy.events.register("success", '', showSuccessMsg);
    saveStrategy.events.register("failure", '', showFailureMsg);
 
    wfs = new OpenLayers.Layer.Vector("departement", {
        strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
        projection: new OpenLayers.Projection("EPSG:2154"),
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.1.0",
            srsName: "EPSG:2154",
            url: "http://localhost/cgi-bin/tinyows.exe?",
            featureNS :  "http://localhost/",
            featureType: "departement",
            extractAttributes: true,
            geometryName: "the_geom",
            schema: "http://localhost/cgi-bin/tinyows.exe?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=dep:departement"
        })
    }); 
    
    map.addLayers([osm, wfs]);
 
    var panel = new OpenLayers.Control.Panel(
        {'displayClass': 'customEditingToolbar'}
    );
 
    var navigate = new OpenLayers.Control.Navigation({
        title: "Pan Map"
    });
 
    var draw = new OpenLayers.Control.DrawFeature(
        wfs, OpenLayers.Handler.Polygon,
        {
            title: "Draw Feature",
            displayClass: "olControlDrawFeaturePolygon",
            multi: true
        }
    );
 
    var edit = new OpenLayers.Control.ModifyFeature(wfs, {
        title: "Modify Feature",
        displayClass: "olControlModifyFeature"
    });
 
    var del = new DeleteFeature(wfs, {title: "Delete Feature"});
 
    var save = new OpenLayers.Control.Button({
        title: "Save Changes",
        trigger: function() {
            if(edit.feature) {
                edit.selectControl.unselectAll();
            }
            saveStrategy.save();
        },
        displayClass: "olControlSaveFeatures"
    });
 
    panel.addControls([navigate, save, del, edit, draw]);
    panel.defaultControl = navigate;
    map.addControl(panel);
    map.zoomToMaxExtent();
}

Mon fichier de config tinyows :

Code:

<tinyows online_resource="http://127.0.0.1/cgi-bin/tinyows.exe"
         schema_dir="C:/ms4w/apps/tinyows/schema/" log="tinyows.log">

  <pg host="127.0.0.1" user="postgres" password="eclipse" dbname="ccih" port="5432"/>

  <metadata name="TinyOWS Server" title="TinyOWS Server - WFS-T World Service" />

    <contact name="TinyOWS Server"
            site="http://www.tinyows.org/"
            email="tinyows-users@lists.maptools.org" />

    <layer  retrievable="1"
        writeable="1"
        queryable="1"
        shema="public"
               prefix="dep"
                server="localhost"
                name="departement"
                title="France" />
</tinyows>

Merci d'avance pour vos idées...

cordialement

Nicolas Leclerc

Dernière modification par nicolas.leclerc (Thu 17 February 2011 10:01)

Hors ligne

 

Pied de page des forums

Powered by FluxBB