[mapserver-users] problems with mapscript java on linux

Tobias Zügel zuegelts at studi.informatik.uni-stuttgart.de
Wed Jun 5 05:05:28 EDT 2002


Hi,

I built mapscript (from mapserver 3.6) java on debian (IBM Jdk 1.3.1,
SWIG 1.3.11u).
Building process works fine; only a few warnings though ...
I afterwards copied the library and the classes to the appropriate
locations and tried to write my first program, which is attached below.
It compiles just fine, but i get the following output:

# java demo
Trying to load mapscript ...
successful!
Unexpected exception has occurred:
ReportedExceptionCode = b, at ExceptionAddress = 41e34310
        ACCESS_VIOLATION occured outside Interpreter and JITed code
        ExecMode = EXECMODE_BYTECODE
        stackpointer=0xbffc7370
Writing Java core file ....
Written Java core to javacore.txt


When I look inside javacore.txt i find the following:

"main" (TID:0x100519D8, sys_thread_t:0x8058B68, state:R, native
ID:0x400) prio=5
        at edu.umn.gis.mapscript.mapscript.mapObj_draw(Native Method)
        at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:267)
        at demo.main(demo.java:19)


What is wrong here? Any suggestions?

Greetings,
Toby


----------------------snipp------------------------------------------------

import java.io.*;
import java.util.*;
import edu.umn.gis.mapscript.*;

class demo {
        static public void main (String args[]) {
                try
                {	
			System.out.println("Loading library ...");
                        System.loadLibrary("mapscript");
			System.out.println("successful!");
                }
                catch (UnsatisfiedLinkError e)
                {
                        e.printStackTrace();
                }

                mapObj map = new mapObj("/var/www/mapserver/demo.map");
                imageObj image = map.draw();              
		image.saveImage("/var/www/mapserver/tmp/demo.png",mapscript.get_MS_PNG(),1,1,0);rip
        }
}

----------------------snipp------------------------------------------------





-- 
 /"\                         /   
 \ /  ASCII Ribbon Campaign /  In the beginning was  
  X   Against HTML mail    /  the word, and the word    
 / \  and postings        /  was content-type: text/plain      



More information about the mapserver-users mailing list