『Java』JNA访问本地库,Tomcat崩溃问题

vitachuh 2009-06-05 11:37:04
环境:B/S项目、OpenSolaris、JDK1.6、Tomcat
条件:1. 通过JNA调用本地函数(由C编写的测试库);
2. 通过传入参数出现异常(该库接收int参数,0为正常;非0抛出异常)。
问题:当传入0时,一切结果都和预想效果一样,没有任何错误产生;当传入1时,开始等待(底层调用的库应该在这时出异常了)等待几秒后,Tomcat服务器自动停止。

请问,本地库的方法内部的异常咋办?为什么它内部有异常,Tomcat挂了?仍然用JNA的话,有没有什么解决办法?

解决问题,100分重谢!
...全文
1150 30 打赏 收藏 转发到动态 举报
写回复
用AI写文章
30 条回复
切换为时间正序
请发表友善的回复…
发表回复
laoheshangDML 2010-06-10
  • 打赏
  • 举报
回复
我也是
seven7nine 2009-10-28
  • 打赏
  • 举报
回复
感谢以上回复的所有人!
我也出现了同样的问题...
kiono 2009-06-16
  • 打赏
  • 举报
回复
这个可能不行,你那个是属于内存级错误了,在java看来是不可捕获的异常,java很多api也是jni调本地dll来实现,其实jna底层也是jni,jni用不好,虚拟机就崩,更不要说jna这种不需要编译头文件的工具包了。调第三方dll的时候,最好知道其api参数类型和返回结果。
vitachuh 2009-06-16
  • 打赏
  • 举报
回复
顶个先~~~
vitachuh 2009-06-16
  • 打赏
  • 举报
回复
看来也只有这样了。。谢谢大家的回复,散分了
vitachuh 2009-06-15
  • 打赏
  • 举报
回复
[Quote=引用 24 楼 kiono 的回复:]
你发的错误日志上,已经记录了你的哪行代码出的错,大概错误是什么。一般来说,JNA调用的时候,如果参数类型(不管是出参还是入参)和你dll里定义的参数类型不匹配,就会崩溃。
你说传入的是0或者1应该是int型的,那么你就要检查你的dll里是int型还是int指针,你可以用int或intByreference类型来试试。解决了,不要忘了给我加分。谢谢。
[/Quote]

你好,日志里面的出错情况我知道,也是预料中的。
那个dll的作用就是用来出现正常运行、出现异常、直接退出(dll内部调用exit())这3种情况的。
因为真正项目中有很多库是用别人提供的,而且没有源码,其内部有可能会出现上述3种情况。
当库中出现异常和直接退出时,Tomcat就自动关闭了。

我就是想,如果库中出现异常或者直接退出,Tomcat照样正常运行。就是这样的要求。

放心,解决了后,有用回复铁定加分。
kiono 2009-06-12
  • 打赏
  • 举报
回复
你发的错误日志上,已经记录了你的哪行代码出的错,大概错误是什么。一般来说,JNA调用的时候,如果参数类型(不管是出参还是入参)和你dll里定义的参数类型不匹配,就会崩溃。
你说传入的是0或者1应该是int型的,那么你就要检查你的dll里是int型还是int指针,你可以用int或intByreference类型来试试。解决了,不要忘了给我加分。谢谢。
vitachuh 2009-06-12
  • 打赏
  • 举报
回复
[Quote=引用 22 楼 YL_Show 的回复:]

[/Quote]

谢谢这位仁兄的回复,终于可以发帖了。。。


--------------- S Y S T E M ---------------

OS: Windows XP Build 2600 Service Pack 2

CPU:total 2 (cores per cpu 2, threads per core 1) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2

Memory: 4k page, physical 2066664k(1128456k free), swap 4194303k(4194303k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0_14-b03) for windows-x86, built on Oct 5 2007 01:21:52 by "java_re" with MS VC++ 6.0



CSDN不能上传附件么?郁闷,源码地址如下:
http://pickup.mofile.com/1277448483222153
YL_Show 2009-06-12
  • 打赏
  • 举报
回复
vitachuh 2009-06-12
  • 打赏
  • 举报
回复

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
=>0x008a5dd0 JavaThread "http-8080-1" daemon [_thread_in_native, id=1980]
0x008a4d40 JavaThread "TP-Monitor" daemon [_thread_blocked, id=1984]
0x008a3a70 JavaThread "TP-Processor4" daemon [_thread_in_native, id=1272]
0x008a1180 JavaThread "TP-Processor3" daemon [_thread_blocked, id=8028]
0x008a0200 JavaThread "TP-Processor2" daemon [_thread_blocked, id=6876]
0x008a14d0 JavaThread "TP-Processor1" daemon [_thread_blocked, id=4740]
0x00867e10 JavaThread "http-8080-Acceptor-0" daemon [_thread_in_native, id=2364]
0x0089b060 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=5748]
0x008300d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=5744]
0x0082f690 JavaThread "CompilerThread0" daemon [_thread_blocked, id=7736]
0x0082e5a0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1204]
0x0082d930 JavaThread "Finalizer" daemon [_thread_blocked, id=4572]
0x0082c6c0 JavaThread "Reference Handler" daemon [_thread_blocked, id=2264]
0x008236c0 JavaThread "main" [_thread_in_native, id=7872]

Other Threads:
0x0082b950 VMThread [id=6960]
0x00832bc0 WatcherThread [id=5264]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation total 704K, used 581K [0x22bd0000, 0x22c90000, 0x230b0000)
eden space 640K, 83% used [0x22bd0000, 0x22c55578, 0x22c70000)
from space 64K, 74% used [0x22c80000, 0x22c8bfd0, 0x22c90000)
to space 64K, 0% used [0x22c70000, 0x22c70000, 0x22c80000)
tenured generation total 8496K, used 7206K [0x230b0000, 0x238fc000, 0x26bd0000)
the space 8496K, 84% used [0x230b0000, 0x237b9a18, 0x237b9c00, 0x238fc000)
compacting perm gen total 8192K, used 7791K [0x26bd0000, 0x273d0000, 0x2abd0000)
the space 8192K, 95% used [0x26bd0000, 0x2736bef0, 0x2736c000, 0x273d0000)
ro space 8192K, 67% used [0x2abd0000, 0x2b1322c8, 0x2b132400, 0x2b3d0000)
rw space 12288K, 47% used [0x2b3d0000, 0x2b97f6a0, 0x2b97f800, 0x2bfd0000)

Dynamic libraries:
0x00400000 - 0x0040d000 E:\Java\jdk1.5.0_14\bin\javaw.exe
0x7c920000 - 0x7c9b4000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c91d000 C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e49000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee2000 C:\WINDOWS\system32\RPCRT4.dll
0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll
0x77d10000 - 0x77d9f000 C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f37000 C:\WINDOWS\system32\GDI32.dll
0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll
0x76300000 - 0x7631d000 C:\WINDOWS\system32\IMM32.DLL
0x62c20000 - 0x62c29000 C:\WINDOWS\system32\LPK.DLL
0x73fa0000 - 0x7400b000 C:\WINDOWS\system32\USP10.dll
0x6d740000 - 0x6d8de000 E:\Java\jdk1.5.0_14\jre\bin\client\jvm.dll
0x76b10000 - 0x76b3a000 C:\WINDOWS\system32\WINMM.dll
0x6d300000 - 0x6d308000 E:\Java\jdk1.5.0_14\jre\bin\hpi.dll
0x76bc0000 - 0x76bcb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d710000 - 0x6d71c000 E:\Java\jdk1.5.0_14\jre\bin\verify.dll
0x6d380000 - 0x6d39d000 E:\Java\jdk1.5.0_14\jre\bin\java.dll
0x6d730000 - 0x6d73f000 E:\Java\jdk1.5.0_14\jre\bin\zip.dll
0x6d540000 - 0x6d553000 E:\Java\jdk1.5.0_14\jre\bin\net.dll
0x71a20000 - 0x71a37000 C:\WINDOWS\system32\WS2_32.dll
0x71a10000 - 0x71a18000 C:\WINDOWS\system32\WS2HELP.dll
0x719c0000 - 0x719fe000 C:\WINDOWS\system32\mswsock.dll
0x60fd0000 - 0x61025000 C:\WINDOWS\system32\hnetcfg.dll
0x71a00000 - 0x71a08000 C:\WINDOWS\System32\wshtcpip.dll
0x76ef0000 - 0x76f17000 C:\WINDOWS\system32\DNSAPI.dll
0x76f80000 - 0x76f88000 C:\WINDOWS\System32\winrnr.dll
0x76f30000 - 0x76f5c000 C:\WINDOWS\system32\WLDAP32.dll
0x16080000 - 0x16099000 C:\Program Files\Bonjour\mdnsNSP.dll
0x76d30000 - 0x76d48000 C:\WINDOWS\system32\Iphlpapi.dll
0x76f90000 - 0x76f96000 C:\WINDOWS\system32\rasadhlp.dll
0x10000000 - 0x10052000 E:\Apache Software Foundation\Tomcat 6.0\temp\jna13836.tmp
0x03670000 - 0x0368b000 C:\WINDOWS\system32\ExceptionTest.dll
0x10200000 - 0x10320000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\MSVCR80D.dll

VM Arguments:
jvm_args: -Dcatalina.home=E:\Apache Software Foundation\Tomcat 6.0 -Dcatalina.base=E:\Apache Software Foundation\Tomcat 6.0 -Djava.endorsed.dirs=E:\Apache Software Foundation\Tomcat 6.0/common/endorsed -Djava.io.tmpdir=E:\Apache Software Foundation\Tomcat 6.0\temp -Djava.library.path=E:\Java\jdk1.5.0_14\bin;E:\Apache Software Foundation\Tomcat 6.0\bin -Dsun.io.useCanonCaches=false
java_command: org.apache.catalina.startup.Bootstrap start
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=E:\Java\jdk1.5.0_14
CLASSPATH=E:\Java\jdk1.5.0_14\lib;.
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;E:\Java\jdk1.5.0_14\bin;;E:\MySQL\MySQL Server 5.1\bin;E:\JBoss-4.2.3.GA\bin;E:\glassfish-v2.1\bin;;C:\strawberry\c\bin;C:\strawberry\perl\bin;4.564730E+219YBUILD_BASE/bin;e:\StormII\Codec;e:\StormII;E:\SSH Communications Security\SSH Secure Shell
USERNAME=wolf.lai
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel


未完待续...
vitachuh 2009-06-12
  • 打赏
  • 举报
回复

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;+309
j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+194
j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
j $Proxy0.doExceptionTest(I)I+19
j com.wolflai.action.TestAction.test(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;+22
v ~StubRoutines::call_stub
j sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
J sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
j org.apache.struts.actions.DispatchAction.dispatchMethod(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;)Lorg/apache/struts/action/ActionForward;+114
j org.apache.struts.actions.DispatchAction.execute(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;+113
j org.apache.struts.actions.MappingDispatchAction.execute(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;+6
j org.apache.struts.action.RequestProcessor.processActionPerform(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/Action;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)Lorg/apache/struts/action/ActionForward;+7
j org.apache.struts.action.RequestProcessor.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+257
j org.apache.struts.action.ActionServlet.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+40
j org.apache.struts.action.ActionServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+139
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+804
j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+365
j org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
j org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
j org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
j org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+157
j org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+432
j org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82
j org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub


未完待续...
vitachuh 2009-06-12
  • 打赏
  • 举报
回复
[Quote=引用 15 楼 jl_xiao 的回复:]
JNA底层也是要加载native的库,根据我的理解,它是对JNI的进一步封装,目前还是java.net的孵化项目,
所以不排除是他们代码的bug。

请先在重现这个错误时,检查一下你的tomcat使用的jdk或者jre的bin目录,看看下面有没有hs_err_pid*****.log类似的log文件
如果有,这里面就记录了错误所在。

如果没有,请再描述清楚点,或者贴点代码,呵呵。
[/Quote]

找了半天才找到这个日志文件。。结果是在CATALINA_HOME的bin下面。。我把内容全部都贴出来吧,如下:


#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_INT_DIVIDE_BY_ZERO (0xc0000094) at pc=0x036813c0, pid=5424, tid=1980
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_14-b03 mixed mode, sharing)
# Problematic frame:
# C [ExceptionTest.dll+0x113c0]
#

--------------- T H R E A D ---------------

Current thread (0x008a5dd0): JavaThread "http-8080-1" daemon [_thread_in_native, id=1980]

siginfo: ExceptionCode=0xc0000094

Registers:
EAX=0x00000064, EBX=0x00000000, ECX=0x00000000, EDX=0x00000000
ESP=0x0366ebd4, EBP=0x0366ecb8, ESI=0x0366eda0, EDI=0x0366ecb8
EIP=0x036813c0, EFLAGS=0x00010213

Top of Stack: (sp=0x0366ebd4)
0x0366ebd4: 008a5dd0 0366eda0 00000000 cccccccc
0x0366ebe4: cccccccc cccccccc cccccccc cccccccc
0x0366ebf4: cccccccc cccccccc cccccccc cccccccc
0x0366ec04: cccccccc cccccccc cccccccc cccccccc
0x0366ec14: cccccccc cccccccc cccccccc cccccccc
0x0366ec24: cccccccc cccccccc cccccccc cccccccc
0x0366ec34: cccccccc cccccccc cccccccc cccccccc
0x0366ec44: cccccccc cccccccc cccccccc cccccccc

Instructions: (pc=0x036813c0)
0x036813b0: ff eb 18 c7 45 f8 00 00 00 00 b8 64 00 00 00 99
0x036813c0: f7 7d f8 89 45 ec b8 01 00 00 00 5f 5e 5b 81 c4


Stack: [0x03630000,0x03670000), sp=0x0366ebd4, free space=250k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ExceptionTest.dll+0x113c0]
C [jna13836.tmp+0xda37]
C [jna13836.tmp+0x9182]
C [jna13836.tmp+0x2161]
C [jna13836.tmp+0x2849]
j com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;+309
j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+194
j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
j $Proxy0.doExceptionTest(I)I+19
j com.wolflai.action.TestAction.test(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;+22
v ~StubRoutines::call_stub
V [jvm.dll+0x875dd]
V [jvm.dll+0xdfd96]
V [jvm.dll+0x874ae]
V [jvm.dll+0xf3f82]
V [jvm.dll+0xa5752]
C [java.dll+0x6d4f]
j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
J sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
j org.apache.struts.actions.DispatchAction.dispatchMethod(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;)Lorg/apache/struts/action/ActionForward;+114
j org.apache.struts.actions.DispatchAction.execute(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;+113
j org.apache.struts.actions.MappingDispatchAction.execute(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;+6
j org.apache.struts.action.RequestProcessor.processActionPerform(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/Action;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)Lorg/apache/struts/action/ActionForward;+7
j org.apache.struts.action.RequestProcessor.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+257
j org.apache.struts.action.ActionServlet.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+40
j org.apache.struts.action.ActionServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+139
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+804
j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+365
j org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
j org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
j org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
j org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+157
j org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+432
j org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82
j org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
V [jvm.dll+0x875dd]
V [jvm.dll+0xdfd96]
V [jvm.dll+0x874ae]
V [jvm.dll+0x8720b]
V [jvm.dll+0xa2089]
V [jvm.dll+0x1112e8]
V [jvm.dll+0x1112b6]
C [MSVCRT.dll+0x2a3b0]
C [kernel32.dll+0xb683]


未完待续...
machao299 2009-06-09
  • 打赏
  • 举报
回复
Up java 超级群 :有时间大家共同交流 51177847
IT东 2009-06-09
  • 打赏
  • 举报
回复
JNI我也用过一次,但是没关键的方法没调用成功,帮你顶一下吧
  • 打赏
  • 举报
回复
痛苦

确实痛苦


同情中
livepdm 2009-06-09
  • 打赏
  • 举报
回复
JNA底层也是要加载native的库,根据我的理解,它是对JNI的进一步封装,目前还是java.net的孵化项目,
所以不排除是他们代码的bug。

请先在重现这个错误时,检查一下你的tomcat使用的jdk或者jre的bin目录,看看下面有没有hs_err_pid*****.log类似的log文件
如果有,这里面就记录了错误所在。

如果没有,请再描述清楚点,或者贴点代码,呵呵。
vitachuh 2009-06-08
  • 打赏
  • 举报
回复
再顶一个。。。
jinxfei 2009-06-08
  • 打赏
  • 举报
回复
同情楼主,这样的问题,如果不是面对面细查代码,基本上是无法三言两语解决掉的。
lcb521 2009-06-08
  • 打赏
  • 举报
回复
顶个
vitachuh 2009-06-08
  • 打赏
  • 举报
回复
继续顶个~~~
加载更多回复(10)

67,541

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧