0

我想在Windows中用netbeans生成的.war文件来部署它,我的项目是一个web应用程序,我想在LINUX(LUBUNTU)中运行,但我无法启动它。我正在使用manager-gui。

请帮我解决这个错误。我是linux新手。

Sep 18, 2013 12:01:45 AM 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: /usr/java/packages/lib/i386:/lib:/usr/lib

Sep 18, 2013 12:01:46 AM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["http-bio-8080"]

Sep 18, 2013 12:01:47 AM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["ajp-bio-8009"]

Sep 18, 2013 12:01:47 AM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 3021 ms

Sep 18, 2013 12:01:47 AM org.apache.catalina.core.StandardService startInternal

INFO: Starting service Catalina

Sep 18, 2013 12:01:47 AM org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet Engine: Apache Tomcat/7.0.42

Sep 18, 2013 12:01:47 AM org.apache.catalina.startup.HostConfig deployWAR

INFO: Deploying web application archive /usr/tomcat/apache-tomcat-7.0.42/webapps/Healthlink.war

Sep 18, 2013 12:01:52 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart

Sep 18, 2013 12:01:52 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [147] milliseconds.
Sep 18, 2013 12:01:52 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Healthlink] startup failed due to previous errors
Sep 18, 2013 12:01:52 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Healthlink] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 18, 2013 12:01:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/host-manager
Sep 18, 2013 12:01:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/ROOT
Sep 18, 2013 12:01:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/examples
Sep 18, 2013 12:01:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/docs
Sep 18, 2013 12:01:54 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/manager
Sep 18, 2013 12:01:54 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:01:54 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:01:54 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7183 ms
Sep 18, 2013 12:03:32 AM 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: /usr/java/packages/lib/i386:/lib:/usr/lib
Sep 18, 2013 12:03:34 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:03:34 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:03:34 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4193 ms
Sep 18, 2013 12:03:35 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 18, 2013 12:03:35 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Sep 18, 2013 12:03:35 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/tomcat/apache-tomcat-7.0.42/webapps/Healthlink.war
Sep 18, 2013 12:03:40 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 18, 2013 12:03:51 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [10,839] milliseconds.
Sep 18, 2013 12:03:51 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Healthlink] startup failed due to previous errors
Sep 18, 2013 12:03:51 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Healthlink] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 18, 2013 12:03:51 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/host-manager
Sep 18, 2013 12:03:51 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/ROOT
Sep 18, 2013 12:03:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/examples
Sep 18, 2013 12:03:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/docs
Sep 18, 2013 12:03:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/manager
Sep 18, 2013 12:03:52 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:03:52 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:03:52 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17665 ms
Sep 18, 2013 12:04:09 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 18, 2013 12:04:09 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Healthlink] startup failed due to previous errors
Sep 18, 2013 12:04:09 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Healthlink] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 18, 2013 12:06:33 AM 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: /usr/java/packages/lib/i386:/lib:/usr/lib
Sep 18, 2013 12:06:36 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:06:36 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:06:36 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5065 ms
Sep 18, 2013 12:06:36 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 18, 2013 12:06:36 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Sep 18, 2013 12:06:36 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/tomcat/apache-tomcat-7.0.42/webapps/Healthlink.war
Sep 18, 2013 12:06:42 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 18, 2013 12:06:42 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Healthlink] startup failed due to previous errors
Sep 18, 2013 12:06:42 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Healthlink] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 18, 2013 12:06:42 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/host-manager
Sep 18, 2013 12:06:42 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/ROOT
Sep 18, 2013 12:06:43 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/examples
Sep 18, 2013 12:06:43 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/docs
Sep 18, 2013 12:06:43 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/manager
Sep 18, 2013 12:06:43 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:06:43 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:06:43 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7305 ms
4

1 回答 1

2

这是您过分冗长(且重复)的日志中最重要的一行:

严重:错误 listenerStart

这基本上意味着由类上的注释或条目ServletContextListener注册的实现在方法内引发了未处理的异常。这通常是由开发人员的错误(错误)引起的,需要修复。例如,一个.@WebListener<listener>web.xmlcontextInitialized()NullPointerException

如果您无法通过仅盯着或对contextInitialized()方法内的代码进行单元测试来找出原因,那么您需要logging.properties在项目的src文件夹中创建一个文件(那里有您的 Java 类;它至少最终应该在/WEB-INF/classes构建的 WAR 的文件夹),其中包含以下内容:

org.apache.catalina.core.ContainerBase.[Catalina].level = 信息
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler

这将告诉 Tomcat 在启动侦听器(和过滤器)到控制台期间记录异常。

于 2013-09-17T16:35:45.130 回答