请教一下:tomcat部署webservice服务,用到JAX-WS 的问题

一个不正经的程序员 发布于 2018/09/09 19:19
阅读 2K+
收藏 0

大家好,请教一下,tomcat部署webservice服务,用到了JAX-WS。在eclipse中用tomcat服务器发布可以正常部署,访问,但是如果是单独tomcat部署就会有个奇怪的启动行为。大家看图,求大神解惑!!

图1,eclipse中用tomcat启动

九月 09, 2018 7:21:25 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 09, 2018 7:21:25 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 550 ms
九月 09, 2018 7:21:25 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
九月 09, 2018 7:21:25 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.53
九月 09, 2018 7:21:27 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: 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.
九月 09, 2018 7:21:28 下午 com.sun.xml.ws.transport.http.servlet.WSServletDelegate <init>
信息: WSSERVLET14: JAX-WS servlet 正在初始化
九月 09, 2018 7:21:28 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
success
九月 09, 2018 7:21:28 下午 org.apache.catalina.core.ApplicationContext log
信息: Set web app root system property: 'webapp.root' = [D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ad.auth\]
九月 09, 2018 7:21:28 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing log4j from [classpath:config/log4j.properties]
九月 09, 2018 7:21:28 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2018-09-09 19:21:28[org.springframework.web.context.ContextLoader] INFO-[Root WebApplicationContext: initialization started]
2018-09-09 19:21:29[org.springframework.web.context.support.XmlWebApplicationContext] INFO-[Refreshing Root WebApplicationContext: startup date [Sun Sep 09 19:21:29 CST 2018]; root of context hierarchy]
2018-09-09 19:21:29[org.springframework.web.context.ContextLoader] INFO-[Root WebApplicationContext: initialization completed in 808 ms]
九月 09, 2018 7:21:29 下午 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
信息: WSSERVLET12: JAX-WS 上下文监听程序正在初始化
九月 09, 2018 7:21:29 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'SpringMVC'
2018-09-09 19:21:29[org.springframework.web.servlet.DispatcherServlet] INFO-[FrameworkServlet 'SpringMVC': initialization started]

图2,单独tomcat启动服务

09-Sep-2018 19:13:17.663 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.17 using APR version 1.6.3.
09-Sep-2018 19:13:17.663 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
09-Sep-2018 19:13:18.213 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2o  27 Mar 2018)
09-Sep-2018 19:13:18.310 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
09-Sep-2018 19:13:18.321 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
09-Sep-2018 19:13:18.322 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 959 ms
09-Sep-2018 19:13:18.345 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
09-Sep-2018 19:13:18.347 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.53
09-Sep-2018 19:13:18.356 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\ad.auth
09-Sep-2018 19:13:21.073 信息 [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 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.
09-Sep-2018 19:13:22.238 信息 [localhost-startStop-1] com.sun.xml.ws.transport.http.servlet.WSServletDelegate.<init> WSSERVLET14: JAX-WS servlet 正在初始化
2018-09-09 19:13:22[org.springframework.web.context.ContextLoader] INFO-[Root WebApplicationContext: initialization started]
2018-09-09 19:13:22[org.springframework.web.context.support.XmlWebApplicationContext] INFO-[Refreshing Root WebApplicationContext: startup date [Sun Sep 09 19:13:22 CST 2018]; root of context hierarchy]
2018-09-09 19:13:23[org.springframework.web.context.ContextLoader] INFO-[Root WebApplicationContext: initialization completed in 770 ms]
09-Sep-2018 19:13:23.208 信息 [localhost-startStop-1] com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized WSSERVLET12: JAX-WS 上下文监听程序正在初始化
09-Sep-2018 19:13:23.209 严重 [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
09-Sep-2018 19:13:23.287 严重 [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/ad.auth] startup failed due to previous errors
09-Sep-2018 19:13:23.289 信息 [localhost-startStop-1] com.sun.xml.ws.transport.http.servlet.WSServletDelegate.destroy WSSERVLET15: JAX-WS servlet 已销毁
09-Sep-2018 19:13:23.293 信息 [localhost-startStop-1] com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextDestroyed WSSERVLET13: JAX-WS 上下文监听程序已销毁
2018-09-09 19:13:23[org.springframework.web.context.support.XmlWebApplicationContext] INFO-[Closing Root WebApplicationContext: startup date [Sun Sep 09 19:13:22 CST 2018]; root of context hierarchy]
09-Sep-2018 19:13:23.303 警告 [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ad.auth] appears to have started a thread named [FileWatchdog] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Thread.sleep(Native Method)
 org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java:104)
09-Sep-2018 19:13:23.305 严重 [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ad.auth] created a ThreadLocal with key of type [com.sun.xml.ws.api.server.ThreadLocalContainerResolver$1] (value [com.sun.xml.ws.api.server.ThreadLocalContainerResolver$1@225690a]) and a value of type [com.sun.xml.ws.api.server.Container.NoneContainer] (value [com.sun.xml.ws.api.server.Container$NoneContainer@78201ded]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
09-Sep-2018 19:13:23.310 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\ad.auth has finished in 4,953 ms
09-Sep-2018 19:13:23.310 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\docs
09-Sep-2018 19:13:23.338 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\docs has finished in 28 ms
09-Sep-2018 19:13:23.338 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\examples
09-Sep-2018 19:13:23.548 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\examples has finished in 210 ms
09-Sep-2018 19:13:23.549 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\host-manager
09-Sep-2018 19:13:23.576 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\host-manager has finished in 26 ms
09-Sep-2018 19:13:23.576 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\manager
09-Sep-2018 19:13:23.600 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\manager has finished in 24 ms
09-Sep-2018 19:13:23.601 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Users\Administrator\Desktop\apache-tomcat-8.0.53\webapps\ROOT

 

单独启动的时候就会提示自动销毁了那个jax-ws服务。

还请帮忙解惑,谢谢啦~

加载中
0
zzuqiang
zzuqiang
看看你tomcat的其他日志,应该不只是这么多。
0
超超无敌203
超超无敌203

这种情况一般都是少jar包,把jar勾上

0
一个不正经的程序员
一个不正经的程序员

引用来自“超超无敌203”的评论

这种情况一般都是少jar包,把jar勾上

最后我用cxf实现了。。尴尬

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部