[Mapserver-users] java mapscript getPoints is already defined error

Mario Basa mbasa at orkney.co.jp
Thu Jun 10 21:23:09 EDT 2004


Hello,

Has anybody had any success with JavaMapScript in a servlet/tomcat 
environment. I made a simple servlet and did some tests on it using 
JMeter, and the application usually dies when around 5 concurrent 
threads try to access it. I tried synchronizing the class that contains 
the MapScript and also the SingleThreadModel but the application still dies.

Regards.

mario.


Merlos wrote:

>Wiki modified
>
>I have never created a patch, so I what I did was explain how to avoid the 
>compilation problem.
>
>I have edited a little the howto, not it uses headings and HTML. I've added a 
>simple example. 
>
>Take a look to it. 
>
>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?JavaMapScriptHowTo
>
>
>Regards. Juan.
>
>On Thursday 10 June 2004 08:51, Umberto Nicoletti wrote:
>  
>
>>Could you please add a patch file to the wiki?
>>
>>Thanks,
>>Umberto
>>
>>On Wed, 2004-06-09 at 21:20, Merlos wrote:
>>    
>>
>>>I also had that problem when compiling java mapscript for mapserver 4.2
>>>
>>>If you compare original java files with patched java files you will see
>>>that it only removes the redundant functions. The problem is that in C++
>>>you can return different classes in two methods that have the same name
>>>and arguments, but in java it is not possible.
>>>
>>>So what I did to overtake this error was edit symbolObj.java nd on line
>>>207 removed this line:
>>>
>>>  public lineObj getPoints() {
>>>
>>>And added:
>>>
>>>  public lineObj getPoints(boolean lala) {
>>>       if (lala==true) {}
>>>
>>>
>>>At least it compiled. And could finish all the stuff following the steps
>>>of the howto.
>>>
>>>
>>>Regards. Juan.
>>>
>>>
>>>I suppose it would be a good idea add it to the wiki.
>>>
>>>On Wednesday 09 June 2004 18:27, gabriel hunter wrote:
>>>      
>>>
>>>>Hi all,
>>>>
>>>>I'm new to mapserver, I tried to compile java mapscript but I can't go
>>>>any further without some help.
>>>>
>>>>I followed the JavaMapScriptHowTo, but executing
>>>>
>>>>javac edu/umn/gis/mapscript/*.java
>>>>
>>>>without patching, gives an error about functions already defined:
>>>>
>>>>setExtension and setMimetype in file outputFormatObj.java
>>>>getPoints in file symbolObj.java
>>>>
>>>>and an "attempting to use incompatible return type" on function clone
>>>>in file mapObj.java.
>>>>
>>>>when I apply the patch I can see that change are made to files
>>>>outpuFormatObj.java and mapObj.java, but no changes are made to
>>>>symbolObj.java
>>>>
>>>>so I compiled again and get:
>>>>
>>>>symbolObj.java:207: getPoints() is already defined
>>>>
>>>>I'm using mapserver 4.2, gdal 1.2.0b, gd 2.0.20, swig 1.3.21 on
>>>>slackware 9.1
>>>>
>>>>What can I do?
>>>>
>>>>Thanks in advance.
>>>>
>>>>Gabriel Hunter
>>>>
>>>>
>>>>---------------------------------
>>>>Do you Yahoo!?
>>>>Friends.  Fun. Try the all-new Yahoo! Messenger
>>>>        
>>>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>    
>>
>
>  
>




More information about the mapserver-users mailing list