Hi, Sorry forgot to add all that stuff. Anyway here it is.
Makefile /opt/mapserver-4.10.0/configure --without-tiff \ --with-threads \ --with-proj \ --with-gdal \ --with-ogr \ --with-gd \ --with-freetype \ --with-curl \ --with-wmsclient \ --with-wfs \ --with-wfsclient \ --with-geos \ --with-sos MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Java java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode) OS Linux Fedora Core 6 Servlet Container Oracle 0C4J (Part of JDeveloper) Have done the same build on Linux CentOS4.3 and get the same error (Servlet Container Apache Tomcat 5.5.20) At the moment the onlt geo data source I am using is Shapefiles, and the only output I am returning is either PNG or JPEG. Cheers S -----Original Message----- From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] Behalf Of Umberto Nicoletti Sent: 10 August 2007 20:32 To: MAPSERVER-USERS@LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Java Mapscript Error Please report the mapserver version, how it was built and the environment (windows/linux, shapefiles, database, ecc). It is difficult to help you without knowing that. Umberto On 8/10/07, Stephen Jones <[EMAIL PROTECTED]> wrote: > > > > Hi, > > I am hoping that someone is going to be able to help me out here. > > I am using the Java version of mapscript, along with Tomcat to produce > dynamic mapping for an application. Whilst coloring all features on a layer > with the same color all is ok. Once I try to classify the features, the > first client displays ok, but when another client invokes a session I get > this error message > > java.lang.UnknownError: loadSymbolSet(): Unknown identifier. Parsing error > near (SYMBOL):(line 0) > at > edu.umn.gis.mapscript.mapscriptJNI.mapObj_setSymbolSet(Native > Method) > at > edu.umn.gis.mapscript.mapObj.setSymbolSet(mapObj.java:461) > > I have replicated this using a simple loop to draw my map as below > > public void doMap(){ > int j; > for (j=0;j<10;j++){ > drawMap(j); > } > > public void drawMap(int index){ > String filename = "mapImg"+Integer.toString(index)+".jpg"; > mapObj icemap = new mapObj(""); > rectObj mainExtent = new > rectObj(-77.1,38.85,-76.9,38.95,mapscriptConstants.MS_FALSE); > icemap.setExtent(mainExtent); > setPaths(icemap,index); > icemap.setHeight(800); > icemap.setWidth(800); > doImageColor(icemap); > webObj thisWeb = icemap.getWeb(); > thisWeb.setImagepath("/var/maps/tmp/"); > addLayerInfo(icemap,"Urban > Area","ap",mapscriptConstants.MS_LAYER_POLYGON,mapscriptConstants.MS_ON,0,10000000,15657698,"NAME","georgia-bold",6,100000,50000000,0,0.0,0); > > addthermalMap2(icemap); > imageObj mapImg = icemap.draw(); > mapImg.save("/var/maps/tmp/"+filename,icemap); > icemap.delete(); > } > > In addLayerInfo I create a layer etc etc and define a class with an empty > expression (ie all features) > > classObj oMapClass = new classObj(aLayer); > oMapClass.setExpression(""); > > In addthermalMap2 I create an expression for an attrubute field frst as such > > oMapClass.setExpression("([frst]>=3.0)"); > > The function setPath , sets the path to shapefiles, symbol & font files. > > public void setPaths(mapObj icemap, int index){ > icemap.setShapepath("/var/maps/shapefiles/"); > System.out.println("Set Shape path"); > icemap.setSymbolSet(symSet); // THIS IS THE LINE THAT CAUSES IT TO > STOP > System.out.println("Set Symbol"); > icemap.setFontSet("/var/maps/symbols/fonts.txt"); > System.out.println("Set Font"); > } > > The second time around the loop setPath generates the error message. If i > comment out the addthermalMap, it runs ok ? I have seen something similar > posted for php/mapscript. Is there any way round this ? Have I missed the > point and done something wrong ? Is it a known bug ? If so is it planned to > fix it ? This is real urgent as I have a deadline of end of this month to > have the first system out for test. > > Thanks Stephen