Tomcat无法在Host Context server.xml中设置“source”属性集

时间:2017-01-12 18:37:34

标签: java eclipse tomcat netbeans

我们有一个从Netbeans在Tomcat下运行的Web应用程序,我试图让它在eclipse的Tomcat下运行。

我在eclipse中创建了一个服务器,在我的机器上指定了用于从Netbeans运行的相同tomcat 7安装。我理解,当这样做时,eclipse将catalina.base服务器文件复制到它自己的临时目录,以使它们分开。

它显然也对它使用的server.xml进行了一些更改。在tomcat目录的server.xml中,Host标记为:

  <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

但在日食环境中,它是

  <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
            <Valve className="org.apache.catalina.authenticator.SingleSignOn"/>
    <Context docBase="myApp-war" path="/myApp" reloadable="true" source="org.eclipse.jst.jee.server:myApp-war"/>
   </Host>
删除空白和评论后

我们的问题(显然)运行时没有source属性,可以在Context标记中分配值。我们在Tomcat 7.0文档中找不到“Host / Context”中记录的source,并且在运行时我们在控制台中有以下内容:

Jan 12, 2017 1:23:21 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:salespoint-war' did not find a matching property.
Jan 12, 2017 1:23:21 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
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\Java\jdk1.7.0_07\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.7.0_07\jre\bin;C:/Program Files/Java/jre1.8.0_91/bin/server;C:/Program Files/Java/jre1.8.0_91/bin;C:/Program Files/Java/jre1.8.0_91/lib/amd64;C:\ProgramData\Oracle\Java\javapath;c:\local;c:\devTools\apache-maven\bin;C:\Perl64\site\bin;C:\Perl64\bin;c:\Program Files\Java\jdk1.7.0_07\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\WinMerge;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;c:\Program Files\Apache\apache-cxf-3.1.6\bin;C:\Windows\system32;;.
Jan 12, 2017 1:23:21 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 12, 2017 1:23:21 PM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8443]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8443]]

我们认为它无法处理SSL连接,因为它无法初始化连接器。我们也不知道为什么它无法找到APR库,因为这是Netbeans使用的Tomcat的相同安装,并且它没有给出这样的错误消息。

任何人都可以帮助我们了解这里出了什么问题吗?我们认为有一些我们错过的配置。

如果它有相关性 - 以前在我们的连接器配置中发现了类似的其他几个特定于APR的属性的SetPropertyRule警告。我们将protocol="org.apache.coyote.http11.Http11AprProtocol"添加到连接器以使APR协议显式,显然Netbeans推断它或将其作为默认值或其他东西。这消除了APR特定属性的警告,但让我们留下了这个警告。

===编辑

以下是server.xml中的两个连接器:

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>

<!-- SSL Connector Configuration-->
<Connector 
protocol="org.apache.coyote.http11.Http11AprProtocol"
SSLCertificateFile="${catalina.base}\conf\ssl_crt\mycert\server.crt" 
SSLCertificateKeyFile="${catalina.base}\conf\ssl_crt\mycert\server.key" 
SSLCipherSuite="RC4-SHA:HIGH:!ADH:!SSLv2:@STRENGTH" 
SSLEnabled="true" 
SSLPassword="webapps.accesspointinc.com" 
SSLProtocol="all" 
acceptCount="100" 
compression="on" 
compressionMinSize="2048" 
disableUploadTimeout="true" 
enableLookups="false" 
executor="tomcatThreadPool" 
maxHttpHeaderSize="8192" 
maxThreads="200" 
port="8443" 
scheme="https" 
secure="true"/>

整个日志文件,包括错误消息:

Jan 12, 2017 1:23:21 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:salespoint-war' did not find a matching property.
Jan 12, 2017 1:23:21 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
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\Java\jdk1.7.0_07\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.7.0_07\jre\bin;C:/Program Files/Java/jre1.8.0_91/bin/server;C:/Program Files/Java/jre1.8.0_91/bin;C:/Program Files/Java/jre1.8.0_91/lib/amd64;C:\ProgramData\Oracle\Java\javapath;c:\local;c:\devTools\apache-maven\bin;C:\Perl64\site\bin;C:\Perl64\bin;c:\Program Files\Java\jdk1.7.0_07\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\WinMerge;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;c:\Program Files\Apache\apache-cxf-3.1.6\bin;C:\Windows\system32;;.
Jan 12, 2017 1:23:21 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 12, 2017 1:23:21 PM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8443]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8443]]
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:821)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Caused by: org.apache.catalina.LifecycleException: The configured protocol [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native library which is not available
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:972)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    ... 12 more

Jan 12, 2017 1:23:21 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 12, 2017 1:23:21 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 789 ms
Jan 12, 2017 1:23:21 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 12, 2017 1:23:21 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.63
Jan 12, 2017 1:23:22 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jan 12, 2017 1:23:27 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jan 12, 2017 1:23:27 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Jan 12, 2017 1:23:27 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "/salespoint" "read")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
    at java.security.AccessController.checkPermission(AccessController.java:555)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302)
    at java.lang.System.getProperty(System.java:706)
    at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:146)
    at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:117)
    at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5017)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5531)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Jan 12, 2017 1:23:27 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.ExceptionInInitializerError
    at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:88)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:269)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5017)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5531)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "c:\Program Files\apache\apache-tomcat-7.0.63\logs\applications\salespoint.log" "write")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
    at java.security.AccessController.checkPermission(AccessController.java:555)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at java.lang.SecurityManager.checkWrite(SecurityManager.java:979)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:203)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:136)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
    at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
    at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
    at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
    ... 17 more

Jan 12, 2017 1:23:27 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Jan 12, 2017 1:23:27 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/salespoint] startup failed due to previous errors
Jan 12, 2017 1:23:27 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Jan 12, 2017 1:23:27 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: Could not initialize class org.apache.log4j.LogManager
    at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:88)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
    at org.springframework.web.context.ContextCleanupListener.<clinit>(ContextCleanupListener.java:43)
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:144)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5064)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5726)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Jan 12, 2017 1:23:27 PM org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
Jan 12, 2017 1:23:27 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.util.Log4jConfigListener
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "*" "read,write")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
    at java.security.AccessController.checkPermission(AccessController.java:555)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1269)
    at java.lang.System.getProperties(System.java:622)
    at org.springframework.web.util.WebUtils.removeWebAppRootSystemProperty(WebUtils.java:167)
    at org.springframework.web.util.Log4jWebConfigurer.shutdownLogging(Log4jWebConfigurer.java:174)
    at org.springframework.web.util.Log4jConfigListener.contextDestroyed(Log4jConfigListener.java:49)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5064)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5726)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Jan 12, 2017 1:23:27 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 12, 2017 1:23:27 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 12, 2017 1:23:27 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6175 ms

1 个答案:

答案 0 :(得分:1)

您告诉Tomcat使用APR连接器,无法找到APR库。您的java.library.path系统属性中包含大量路径:

  • C:\Program Files\Java\jdk1.7.0_07\bin
  • C:\Windows\Sun\Java\bin
  • C:\Windows\system32
  • C:\Windows
  • C:\Program Files\Java\jdk1.7.0_07\jre\bin
  • C:/Program Files/Java/jre1.8.0_91/bin/server
  • C:/Program Files/Java/jre1.8.0_91/bin
  • C:/Program Files/Java/jre1.8.0_91/lib/amd64
  • C:\ProgramData\Oracle\Java\javapath
  • c:\local
  • c:\devTools\apache-maven\bin
  • C:\Perl64\site\bin
  • C:\Perl64\bin
  • c:\Program Files\Java\jdk1.7.0_07\bin
  • C:\Windows\system32
  • C:\Windows
  • C:\Windows\System32\Wbem
  • C:\Windows\System32\WindowsPowerShell\v1.0\
  • C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86
  • C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
  • C:\Program Files\Microsoft SQL Server\120\DTS\Binn\
  • C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\
  • C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\
  • C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\
  • C:\Program Files\Microsoft SQL Server\120\Tools\Binn\
  • C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\
  • C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
  • C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\
  • C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\
  • C:\Program Files\Microsoft SQL Server\100\Tools\Binn\
  • C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\
  • C:\Program Files\TortoiseSVN\bin
  • C:\Program Files (x86)\WinMerge
  • C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\
  • c:\Program Files\Apache\apache-cxf-3.1.6\bin
  • C:\Windows\system32
  • .(流程的当前工作目录)

如果这在Netbeans&#34;中有效,那么我怀疑以下其中一个是问题:

  1. NetBeans在启动Tomcat时指定了不同的java.library.path系统属性
  2. NetBeans在启动Tomcat时使用不同的当前工作目录
  3. 在任何一种情况下,tcnative库必须位于Tomcat可以找到它的位置。您需要将tcnativeapropenssl库全部放在java.library.path系统属性中的位置。

    我建议将它们放在可预测的目录(例如%CATALINA_HOME%/bin)中,然后在启动Tomcat时将java.library.path显式设置为%CATALINA_HOME%/bin