【急】tomcat启动不报错,但是不加载Spring的配置文件!!

Ethan_LiYan
博客专家认证
2016-12-30 02:32:16
十二月 30, 2016 2:24:46 下午 org.apache.catalina.core.AprLifecycleListener init
信息: 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.8.0_77\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.8.0_77\jre\bin;C:/Program Files/Java/jre1.8.0_77/bin/server;C:/Program Files/Java/jre1.8.0_77/bin;C:/Program Files/Java/jre1.8.0_77/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_77\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;E:\mysql\bin;C:\Program Files (x86)\VanDyke Software\Clients\;G:\迅雷下载\UltraCompare;E:\;estination\bin;E:\Subversion\bin;E:\apache-maven-3.3.9\bin;E:\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\OpenVPN\bin;C:\Program Files (x86)\VanDyke Software\Clients\;E:\dshlEclipse\eclipse;;.
十二月 30, 2016 2:24:47 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:numen' did not find a matching property.
十二月 30, 2016 2:24:47 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-80"]
十二月 30, 2016 2:24:47 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
十二月 30, 2016 2:24:47 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 453 ms
十二月 30, 2016 2:24:47 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
十二月 30, 2016 2:24:47 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.52
十二月 30, 2016 2:24:50 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.
log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by
log4j:ERROR [org.apache.catalina.loader.StandardClassLoader@6cc4c815] whereas object of type
log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [WebappClassLoader
context: /numen
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@6cc4c815
].
log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
十二月 30, 2016 2:24:51 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
try to load 'net/contentobjects/jnotify/lib/jnotify_win_64.dll' from classpath
load finished!



下面是web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>elf</display-name>
<description>elf System</description>


<!-- 设置Spring容器加载配置文件路径 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:core.xml</param-value>
</context-param>

<!-- 加载Spring容器配置 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>

<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>

<listener>
<listener-class>com.netease.numen.core.web.listener.InitListener</listener-class>
</listener>


<!-- 配置Spring核心控制-->
<servlet>
<servlet-name>numenPlatform</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:views.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>numenPlatform</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<!-- 替换memcached session-->
<filter>
<filter-name>MemcachedSessionFilter</filter-name>
<filter-class>com.netease.numen.base.web.filter.MemcachedSessionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MemcachedSessionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- 解决工程编码过滤-->
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>VisitFilter</filter-name>
<filter-class>com.netease.numen.base.web.filter.VisitFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>VisitFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>VisitFilter</filter-name>
<url-pattern>*.p</url-pattern>
</filter-mapping>

<!-- 判断用户是否登录 ,过滤.do的请你也可以(*.jsp) ,(*.html),(/*)全局,) -->
<filter>
<filter-name>SessionTimeoutFilter</filter-name>
<filter-class>com.netease.numen.base.web.filter.SessionTimeoutFilter</filter-class>
<init-param>
<!-- 排除过滤uri集合,可使用通配符,多个用号 -->
<param-name>excludeUri</param-name>
<param-value>/api/*</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>SessionTimeoutFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SessionTimeoutFilter</filter-name>
<url-pattern>*.p</url-pattern>
</filter-mapping>

<!-- 进行ip白名单过滤的请求 -->
<filter>
<filter-name>PrivateApiFilter</filter-name>
<filter-class>com.netease.numen.base.web.filter.PrivateApiFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrivateApiFilter</filter-name>
<url-pattern>/api/private/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>Log4jMDCFilter</filter-name>
<filter-class>com.netease.numen.base.web.filter.Log4jMDCFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Log4jMDCFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.xml</param-value>
</context-param>

<context-param>
<param-name>webAppRootKey</param-name>
<param-value>elf</param-value>
</context-param>


<!-- 组件路径配置,默认为classpath*:/pillow/conf/pillow.xml -->
<context-param>
<param-name>pillowConfigLocation</param-name>
<param-value>
classpath*:com/netease/numen/*/pillow-*.xml
</param-value>
</context-param>
<listener>
<listener-class>com.netease.pillow.listener.DefaultLoaderListener</listener-class>
</listener>
<!-- 配置组件化用控制-->
<servlet>
<servlet-name>dispatcherController</servlet-name>
<servlet-class>com.netease.pillow.dispatcher.PillowDispatchController</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:pillow-views.xml</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherController</servlet-name>
<url-pattern>*.p</url-pattern>
</servlet-mapping>


<session-config>
<session-timeout>120</session-timeout>
</session-config>

<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>

<error-page>
<error-code>404</error-code>
<location>/error/404.do</location>
</error-page>

<error-page>
<error-code>500</error-code>
<location>/500.do</location>
</error-page>

</web-app>


什么原因???
...全文
2945 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_41558309 2017-12-29
  • 打赏
  • 举报
回复
把tomcat 删除 文件包 重新解压
  • 打赏
  • 举报
回复
解决了我的问题跟你的类似加载完 ContextLoaderListener,后tomcat自动关闭了也不报错感觉没法加载DispatcherServlet
JE_GE 2017-01-14
  • 打赏
  • 举报
回复
确认classes是否有 <param-value>classpath*:views.xml</param-value>
alex350 2017-01-14
  • 打赏
  • 举报
回复
spring 的配置是不是有问题? 好像没有看到spring监听器的配置 servlet这样的形式好像是SpringMVC的
Ethan_LiYan 2017-01-14
  • 打赏
  • 举报
回复
引用 5 楼 qwe885167759 的回复:
后台有没有报错,从楼主发的来看,是log4包有问题
报错的log4包是缺少一些没必要的参数,不是这个问题。
Ethan_LiYan 2017-01-03
  • 打赏
  • 举报
回复
引用 2 楼 qwe885167759 的回复:
把tomcat下的项目删除,重新加载
试过了,这些简单的处理都不行
Ethan_LiYan 2017-01-03
  • 打赏
  • 举报
回复
引用 1 楼 qq_26400953 的回复:
重导一下tomcat
试了不行
岑如花 2017-01-03
  • 打赏
  • 举报
回复
后台有没有报错,从楼主发的来看,是log4包有问题
岑如花 2017-01-02
  • 打赏
  • 举报
回复
把tomcat下的项目删除,重新加载
游语 2016-12-31
  • 打赏
  • 举报
回复
重导一下tomcat

67,515

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧