tcnative-1.dll 无法在 IA 32 位平台上加载 AMD 64 位.dll

2022-09-01 07:44:49

当我尝试运行tomcat时,我收到此错误:

"java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\apache-tomcat-7.0.34\bin\tcnative-1.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform".

但是,我已经下载了64位JRE,并仔细检查了我的java版本:

C:\Program Files (x86)\apache-tomcat-7.0.34\bin>java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

我以前在这里看到过这个问题,但是在一个中没有解决方案,在另一个中,这是一个Eclipse问题,但是当我直接访问tomcat时,我得到了这个错误。

如何找出正在检测的“IA 32位平台”,以及如何将Tomcat指向正确的方向?另外,这是否就是为什么我的 servlet 通过 Eclipse 收到此 404 错误的原因?

类型 状态报告

message /JSPandServlet/Controller

说明 请求的资源不可用。

原木:

C:\Program Files (x86)\apache-tomcat-7.0.34\bin>configtest.bat
Using CATALINA_BASE:   "C:\Program Files (x86)\apache-tomcat-7.0.34"
Using CATALINA_HOME:   "C:\Program Files (x86)\apache-tomcat-7.0.34"
Using CATALINA_TMPDIR: "C:\Program Files (x86)\apache-tomcat-7.0.34\temp"
Using JRE_HOME:        "C:\Program Files (x86)\Java\jre7"
Using CLASSPATH:       "C:\Program Files (x86)\apache-tomcat- 
7.0.34\bin\bootstrap.jar;C:\Program Files (x86)\apache-tomcat- 
7.0.34\bin\tomcat-juli.jar" 
java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\apache-tomcat- 
7.0.34\bin\
tcnative-1.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(Unknown Source)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:180)
    at org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:85)
    at org.apache.catalina.connector.Connector.setProtocol(Connector.java:595)
    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(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:610)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
    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.load(Bootstrap.java:281)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Dec 26, 2012 7:15:47 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre7\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\PHP\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;c:\Program Files (x86)\Microsoft SQLServer\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\10
0\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\SourceGear\Common\DiffMerge\;C:\Ruby193\bin;.
Dec 26, 2012 7:15:47 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 26, 2012 7:15:47 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 26, 2012 7:15:47 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 448 ms

答案 1

哦,伙计,我发现了问题。我在一个奇怪的地方有一个旧的JRE,JRE_HOME正在访问它。我删除了那个dir,修复了我的环境变量,这解决了它。


答案 2

我刚刚找到了解决方案。问题是我的JRE_HOME指向一个32位的JRE,而我的机器中有一个64位的机器。我安装了64位JRE并在系统变量中替换了它,服务器开始清理


推荐