2013年1月24日木曜日

W7でEventLogのJNIが、Tomcatが起動しない

-Djava.net.preferIPv4Stack=true
-Djava.library.path="path to dll"

Dependency Walker
-verbose:jni

2013/01/23 20:15:47 org.apache.catalina.core.ApplicationContext log
致命的: StandardWrapper.Throwable
java.lang.UnsatisfiedLinkError: xx_EventLogBean.outputEventLog(IIILjava/lang/String;[BLjava/lang/String;[B)V
    at xx_EventLogBean.outputEventLog(Native Method)
    at xx_EventLogBean.outputEventLog(xx_EventLogBean.java:)
    at xx_InitalizeListener.init(xx_InitalizeListener.java:)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
2013/01/23 20:15:47 org.apache.catalina.core.StandardContext loadOnStartup


プロジェクトのプロパティプロジェクト・ファセット


2013/01/25 11:36:24 org.apache.catalina.core.AprLifecycleListener init
情報: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\path\DLL

https://tomcat.apache.org/download-connectors.cgi
からダウンロード しtcnative-1.dllをコピる

server.xml
    
    address="127.0.0.1"
/>