Tomcat Can't load AMD 64-bit .dll on a IA 32

旧巷老猫 提交于 2019-12-12 10:45:43

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

 在eclipse中启动tomcat,出现如下错误:

java.lang.UnsatisfiedLinkError: E:\Program Files\MyEclipse 10\apache-tomcat-7.0.23\bin\tcnative-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform  
  
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)  
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)  
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)  
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)  
    at java.lang.System.loadLibrary(System.java:1030)  
    at org.apache.tomcat.jni.Library.<init>(Library.java:42)  
    at org.apache.tomcat.jni.Library.initialize(Library.java:174)  
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
  
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
    at java.lang.reflect.Method.invoke(Method.java:597)  
    at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:179)  
    at org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:84)  
    at org.apache.catalina.connector.Connector.setProtocol(Connector.java:567)  
    at org.apache.catalina.connector.Connector.<init>(Connector.java:69)  
    at org.apache.catalina.startup.ConnectorCreateRule.begin(ConnectorCreateRule.java:62)  
    at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)  
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)  
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)  
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)  
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)  
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)  
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)  
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)  
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)  
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)  
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)  
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)  
    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)  
  
    at org.apache.catalina.startup.Catalina.load(Catalina.java:555)  
    at org.apache.catalina.startup.Catalina.load(Catalina.java:598)  
  
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
    at java.lang.reflect.Method.invoke(Method.java:597)  
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)  
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:449)  

错误信息:“Tomcat Can't load AMD 64-bit .dll on a IA 32”

错误信息提示很明显,也就是tomcat启动时加载的jvm是32位的版本,加载错了,因为我本地还有个64位的版本。所以要切换下,如下图:

myeclipse里面Windows-》preferrence-》tomcat,

由于我部署的是tomcat7,所以在tomcat7的JDK配置中,选用64位的版本1.7(我本地装了32位版本1.6),

切换好后,再次启动就OK了~

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!