解决Tomcat: Can't load IA 32-bit .dll on a AMD 64-bit platform问题

来源:互联网 发布:手机噪声检测软件 编辑:程序博客网 时间:2024/06/06 01:29

引用地址:http://blog.sina.com.cn/s/blog_65f1519f0100sdzg.html

错误如下:

[java] view plaincopy
  1. java.lang.UnsatisfiedLinkError: E:\Program Files\MyEclipse10\apache-tomcat-7.0.23\bin\tcnative-1.dll: Can't load IA 32-bit .dll on a AMD64-bit platform 
  2.  
  3.     at java.lang.ClassLoader$NativeLibrary.load(Native Method) 
  4.     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778
  5.     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703
  6.     at java.lang.Runtime.loadLibrary0(Runtime.java:823
  7.     at java.lang.System.loadLibrary(System.java:1030
  8.     at org.apache.tomcat.jni.Library.<init>(Library.java:42
  9.     at org.apache.tomcat.jni.Library.initialize(Library.java:174
  10.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
  11.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
  12.  
  13.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
  14.     at java.lang.reflect.Method.invoke(Method.java:597
  15.     at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:179
  16.     at org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:84
  17.     at org.apache.catalina.connector.Connector.setProtocol(Connector.java:567
  18.     at org.apache.catalina.connector.Connector.<init>(Connector.java:69
  19.     at org.apache.catalina.startup.ConnectorCreateRule.begin(ConnectorCreateRule.java:62
  20.     at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276
  21.     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501
  22.     at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179
  23.     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339
  24.     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747
  25.     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648
  26.     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510
  27.     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807
  28.     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737
  29.     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107
  30.     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205
  31.     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522
  32.     at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537
  33.  
  34.     at org.apache.catalina.startup.Catalina.load(Catalina.java:555
  35.     at org.apache.catalina.startup.Catalina.load(Catalina.java:598
  36.  
  37.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
  38.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
  39.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
  40.     at java.lang.reflect.Method.invoke(Method.java:597
  41.     at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281
  42.     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:449
  43. 2013-3-2913:18:09 org.apache.catalina.core.AprLifecycleListener init 

问题所在:
主要是在64位的系统下安装的虚拟机是64位的,而WTK的sublime.dll不能在64位的平台下加载64位的虚拟机,只能加载32位的。由于WTK在安装的时候加载的64虚拟机的地址,它找到的是64位的虚拟机,所以它提示不能加载32位的虚拟机(在目录下没有32的虚拟机)


下载 the 32bit from http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.20/binaries/ to 替换

下载时有更新变动,下载最近的即可http://www.apache.org/dist/tomcat/tomcat-connectors/native/

如下图

OK 问题解决

[java] view plaincopy
  1. 2013-3-2913:22:45 org.apache.catalina.core.AprLifecycleListener init 
  2. 信息: Loaded APR based Apache Tomcat Native library1.1.27
  3. 2013-3-2913:22:45 org.apache.catalina.core.AprLifecycleListener init 
  4. 信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 
  5. 2013-3-2913:22:47 org.apache.coyote.AbstractProtocol init 
  6. 信息: Initializing ProtocolHandler ["http-apr-8080"
  7. 2013-3-2913:22:47 org.apache.coyote.AbstractProtocol init 
  8. 信息: Initializing ProtocolHandler ["ajp-apr-8009"
  9. 2013-3-2913:22:47 org.apache.catalina.startup.Catalina load 
  10. 信息: Initialization processed in2088 ms 
  11. 2013-3-2913:22:47 org.apache.catalina.core.StandardService startInternal 
  12. 信息: Starting service Catalina 
  13. 2013-3-2913:22:47 org.apache.catalina.core.StandardEngine startInternal 
  14. 信息: Starting Servlet Engine: Apache Tomcat/7.0.23 
  15. 2013-3-2913:22:47 org.apache.catalina.startup.HostConfig deployDirectory 
  16. 信息: Deploying web application directory E:\Program Files\MyEclipse10\apache-tomcat-7.0.23\webapps\docs 
  17. 2013-3-2913:22:47 org.apache.catalina.startup.HostConfig deployDirectory 
  18. 信息: Deploying web application directory E:\Program Files\MyEclipse10\apache-tomcat-7.0.23\webapps\examples 
  19. 2013-3-2913:22:48 org.apache.catalina.core.ApplicationContext log 
  20. 信息: ContextListener: contextInitialized() 
  21. 2013-3-2913:22:48 org.apache.catalina.core.ApplicationContext log 
  22. 信息: SessionListener: contextInitialized() 
  23. 2013-3-2913:22:48 org.apache.catalina.core.ApplicationContext log 
  24. 信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache','org.apache.jasper.compiler.TldLocationsCache@4402a6ff'
  25. 2013-3-2913:22:48 org.apache.catalina.startup.HostConfig deployDirectory 
  26. 信息: Deploying web application directory E:\Program Files\MyEclipse10\apache-tomcat-7.0.23\webapps\host-manager 
  27. 2013-3-2913:22:48 org.apache.catalina.startup.HostConfig deployDirectory 
  28. 信息: Deploying web application directory E:\Program Files\MyEclipse10\apache-tomcat-7.0.23\webapps\manager 
  29. 2013-3-2913:22:48 org.apache.catalina.startup.HostConfig deployDirectory 
  30. 信息: Deploying web application directory E:\Program Files\MyEclipse10\apache-tomcat-7.0.23\webapps\ROOT 
  31. 2013-3-2913:22:48 org.apache.coyote.AbstractProtocol start 
  32. 信息: Starting ProtocolHandler ["http-apr-8080"
  33. 2013-3-2913:22:48 org.apache.coyote.AbstractProtocol start 
0 0
原创粉丝点击