[Mapserver-users] Problems with Java Interface

José María Michia jmmichia at ciudad.com.ar
Mon Feb 3 12:10:17 PST 2003


Hi!

I'm using MapScript (Java interface) for web-based GIS.

I'm trying to add postgis layers on run-time.

For example, this DATA string: "the_geom from (SELECT AsText(ruta.the_geom)
AS the_geom, ruta.oid AS oid, ruta.mslink AS mslink, ruta.id_ruta AS id_ruta
FROM ruta WHERE id_ruta='8') as foo1 using unique oid using srid=-1"
represents a routh beetwen 2 points on the street network. If the layer is
added on run time, with this data string, the web-server work fine, but only
for 2 or 3 or 4 request, after that, the server die, because an error
outside the Java Virtual Machine (in mapObj.draw()).
But, if the layer is added on the MAP file used for instantiate the mapObj,
the web-server work fine every time ?!?!?!

How solve-debug this?

I try to log MapServer, with weblog field (in mapfile) but with mapscript
this not work or something).

Please, help me. Sorry my english, and thanks in advance.
José María Michia

More info:
----------------------------------------------------------------------------
------------------------------------------------
The versions:
MapServer 3.6.4 (with 3.6.3, no difference)
PostgreSQL 7.2.1 - PostGIS 0.7.3
Tomcat 4.1.12 - JDK 1.3
----------------------------------------------------------------------------
--------------------------------------------

The ruta's table:

          Table "ruta"
  Column  |   Type   | Modifiers
----------+----------+-----------
 id_ruta  | integer  |
 mslink   | integer  |
 the_geom | geometry |
Indexes: ruta_geom_index,
         ruta_id_mslink_index,
         ruta_id_ruta_index,
         ruta_oid_index
Check constraints: "$1" (srid(the_geom) = -1)
                   "$2" ((geometrytype(the_geom) = 'MULTILINESTRING'::text)
OR (the_geom IS NULL))
----------------------------------------------------------------------------
------------------------------------------------
The catalina.out (tomcat log):

SIGSEGV   11*  segmentation violation
    si_signo [11]: SIGSEGV   11*  segmentation violation
    si_errno [0]: Success
    si_code [0]: SI_USER [pid: 0, uid: 0]
        stackpointer=0x46b4a85c

Full thread dump Classic VM (1.3.1_02-b02, green threads):
    "StandardManager[/mtallari/sitio]" (TID:0x40e7ff68,
sys_thread_t:0x8c17158, state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "WebappLoader[/mtallari/sitio]" (TID:0x40d2aac0, sys_thread_t:0x8bd66b8,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.loader.WebappLoader.threadSleep(WebappLoader.java:1221)
        at
org.apache.catalina.loader.WebappLoader.run(WebappLoader.java:1341)
        at java.lang.Thread.run(Thread.java:484)
    "MonitorRunnable" (TID:0x40e3a3a0, sys_thread_t:0x925f508, state:CW)
prio=5
        at java.lang.Object.wait(Native Method)
        at
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.jav
a:423)
        at java.lang.Thread.run(Thread.java:484)
    "Thread-9" (TID:0x40e3a660, sys_thread_t:0x92bf9d0, state:CW) prio=5
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:468)
        at java.net.ServerSocket.implAccept(ServerSocket.java:243)
        at java.net.ServerSocket.accept(ServerSocket.java:222)
        at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:254)
        at
org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:504)
        at org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:619)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:484)
    "Thread-8" (TID:0x40e3a5e8, sys_thread_t:0x92b7478, state:CW) prio=5
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:420)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:512)
        at java.lang.Thread.run(Thread.java:484)
    "Thread-7" (TID:0x40e3a580, sys_thread_t:0x9392c40, state:CW) prio=5
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:420)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:512)
        at java.lang.Thread.run(Thread.java:484)
    "Thread-6" (TID:0x40e3a828, sys_thread_t:0x93916b0, state:CW) prio=5
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:420)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:512)
        at java.lang.Thread.run(Thread.java:484)
    "MonitorRunnable" (TID:0x40e3f1d0, sys_thread_t:0x92a67f8, state:CW)
prio=5
        at java.lang.Object.wait(Native Method)
        at
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.jav
a:423)
        at java.lang.Thread.run(Thread.java:484)
    "Thread-4" (TID:0x40e3fbc8, sys_thread_t:0x921b310, state:CW) prio=5
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:468)
        at java.net.ServerSocket.implAccept(ServerSocket.java:243)
        at java.net.ServerSocket.accept(ServerSocket.java:222)
        at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe
rverSocketFactory.java:107)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java
:335)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:484)
    "Thread-3" (TID:0x40e3fec8, sys_thread_t:0x9046c20, state:R) prio=5
        at edu.umn.gis.mapscript.mapscript.mapObj_draw(Native Method)
        at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:267)
        at jmap.MapBean.getImage(MapBean.java:352)
        at org.apache.jsp.Map2_jsp._jspService(Map2_jsp.java:398)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:484)
    "Thread-2" (TID:0x40e3fe40, sys_thread_t:0x904d6a0, state:CW) prio=5
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:420)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:512)
        at java.lang.Thread.run(Thread.java:484)
    "Thread-1" (TID:0x40e3fdc0, sys_thread_t:0x920d300, state:CW) prio=5
        at java.net.SocketInputStream.socketRead(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:90)
        at
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:7
67)
        at
org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputB
uffer.java:428)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:382)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:484)
    "HostConfig[localhost]" (TID:0x40e40a90, sys_thread_t:0x9223830,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.startup.HostConfig.threadSleep(HostConfig.java:985)
        at org.apache.catalina.startup.HostConfig.run(HostConfig.java:1009)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/jmichia0]" (TID:0x40e44b50, sys_thread_t:0x92c0d98,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/webdav]" (TID:0x40e8c768, sys_thread_t:0x92207b0,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[]" (TID:0x40e2a400, sys_thread_t:0x9300830, state:CW)
prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/tomcat-docs]" (TID:0x40e1e468, sys_thread_t:0x92ff2a0,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/admin]" (TID:0x40e77dd8, sys_thread_t:0x924b258,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/manager]" (TID:0x40e760a0, sys_thread_t:0x92818f8,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/mtallari/sitio2]" (TID:0x40e5ec58,
sys_thread_t:0x9024d38, state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "WebappLoader[/mtallari/sitio2]" (TID:0x40e88b38,
sys_thread_t:0x906ba40, state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.loader.WebappLoader.threadSleep(WebappLoader.java:1221)
        at
org.apache.catalina.loader.WebappLoader.run(WebappLoader.java:1341)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/appt1]" (TID:0x40e71c70, sys_thread_t:0x9043940,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "WebappLoader[/appt1]" (TID:0x40eae088, sys_thread_t:0x9020d90,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.loader.WebappLoader.threadSleep(WebappLoader.java:1221)
        at
org.apache.catalina.loader.WebappLoader.run(WebappLoader.java:1341)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/mtallari/gis]" (TID:0x40e87a78,
sys_thread_t:0x8e0ec98, state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "WebappLoader[/mtallari/gis]" (TID:0x40ec1360, sys_thread_t:0x8dc3bc0,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.loader.WebappLoader.threadSleep(WebappLoader.java:1221)
        at
org.apache.catalina.loader.WebappLoader.run(WebappLoader.java:1341)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/examples]" (TID:0x40eca708, sys_thread_t:0x8bee418,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "WebappLoader[/examples]" (TID:0x40eabc70, sys_thread_t:0x8bd2c68,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.loader.WebappLoader.threadSleep(WebappLoader.java:1221)
        at
org.apache.catalina.loader.WebappLoader.run(WebappLoader.java:1341)
        at java.lang.Thread.run(Thread.java:484)
    "StandardManager[/jmichia0/gis]" (TID:0x40ea3da8,
sys_thread_t:0x8bb8cd8, state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.session.StandardManager.threadSleep(StandardManager.java
:780)
        at
org.apache.catalina.session.StandardManager.run(StandardManager.java:839)
        at java.lang.Thread.run(Thread.java:484)
    "WebappLoader[/jmichia0/gis]" (TID:0x40eef6b0, sys_thread_t:0x8a67900,
state:CW) prio=5
        at java.lang.Thread.sleep(Native Method)
        at
org.apache.catalina.loader.WebappLoader.threadSleep(WebappLoader.java:1221)
        at
org.apache.catalina.loader.WebappLoader.run(WebappLoader.java:1341)
        at java.lang.Thread.run(Thread.java:484)
    "Finalizer" (TID:0x40ef5528, sys_thread_t:0x80c8628, state:CW) prio=8
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
    "Reference Handler" (TID:0x40ef5300, sys_thread_t:0x80c35e0, state:CW)
prio=10
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:420)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
    "Signal dispatcher" (TID:0x40ef5330, sys_thread_t:0x80c0108, state:CW)
prio=5
    "main" (TID:0x40ef51b0, sys_thread_t:0x804d018, state:CW) prio=5
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:468)
        at java.net.ServerSocket.implAccept(ServerSocket.java:243)
        at java.net.ServerSocket.accept(ServerSocket.java:222)
        at
org.apache.catalina.core.StandardServer.await(StandardServer.java:526)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:519)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Monitor Cache Dump:
    java.net.PlainSocketImpl at 40E38860/4144F4A8: owner "main" (0x804d018) 1
entry

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable at 40E3A820/414485C8:
<unowned>
        Waiting to be notified:
            "Thread-6" (0x93916b0)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable at 40E3A528/41448680:
<unowned>
        Waiting to be notified:
            "Thread-7" (0x9392c40)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable at 40E3A5E0/41448738:
<unowned>
        Waiting to be notified:
            "Thread-8" (0x92b7478)

org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable at 40E3F1C8/41444A08:
<unowned>
        Waiting to be notified:
            "MonitorRunnable" (0x92a67f8)
    java.lang.ref.ReferenceQueue$Lock at 40EF5540/40F2B460: <unowned>
        Waiting to be notified:
            "Finalizer" (0x80c8628)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable at 40E3FE28/4143D560:
<unowned>
        Waiting to be notified:
            "Thread-2" (0x904d6a0)
    java.net.PlainSocketImpl at 40E3A6D0/41448480: owner "Thread-9" (0x92bf9d0)
1 entry
    java.net.PlainSocketImpl at 40EE7360/410CEBE0: owner "Thread-4" (0x921b310)
1 entry
    java.lang.ref.Reference$Lock at 40EF5310/40F2AF80: <unowned>
        Waiting to be notified:
            "Reference Handler" (0x80c35e0)

org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable at 40E3A398/41448A20:
<unowned>
        Waiting to be notified:
            "MonitorRunnable" (0x925f508)
Registered Monitor Dump:
    utf8 hash table: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class linking lock: <unowned>
    System class loader lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Monitor cache lock: owner "Thread-3" (0x9046c20) 1 entry
    Dynamic loading lock: <unowned>
    Monitor IO lock: <unowned>
    User signal monitor: <unowned>
        Waiting to be notified:
            "Signal dispatcher" (0x80c0108)
    Child death monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            <unknown thread> (0x8057478)
    Thread queue lock: owner "Thread-3" (0x9046c20) 1 entry
    Monitor registry: owner "Thread-3" (0x9046c20) 1 entry
----------------------------------------------------------------------------
------------------------------------------------








More information about the MapServer-users mailing list