only one error: No Spring WebApplicationInitializer types detected on classpath
Asked Answered
B

3

2
May 21, 2013 3:44:07 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.27 using APR version 1.4.6.
May 21, 2013 3:44:07 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
May 21, 2013 3:44:08 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1d 5 Feb 2013)
May 21, 2013 3:44:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
May 21, 2013 3:44:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
May 21, 2013 3:44:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1591 ms
May 21, 2013 3:44:08 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 21, 2013 3:44:08 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.39
May 21, 2013 3:44:08 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\docs
May 21, 2013 3:44:08 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\examples
May 21, 2013 3:44:08 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
May 21, 2013 3:44:08 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
May 21, 2013 3:44:08 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1ce3a26')
May 21, 2013 3:44:08 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\host-manager
May 21, 2013 3:44:08 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\lmsportal-admin
May 21, 2013 3:44:14 PM org.apache.catalina.core.ApplicationContext log
INFO: **No Spring WebApplicationInitializer types detected on classpath**
May 21, 2013 3:44:14 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\manager
May 21, 2013 3:44:14 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\ROOT
May 21, 2013 3:44:14 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
May 21, 2013 3:44:14 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
May 21, 2013 3:44:14 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6429 ms

when I browsed the localhost jsp files on Chrome, it showed "Directory Listing For/",sometimes it did show the file tree. I got this error when ran tomcat server on my myeclipse, some information about how this error happened would be appreciated.

here is my web.xml

http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

<welcome-file-list>
    <welcome-file>/WEB-INF/page/index.jsp</welcome-file>
</welcome-file-list>

<error-page>
    <error-code>404</error-code>
    <location>/WEB-INF/page/error/404.jsp</location>
</error-page>
<error-page>
    <error-code>500</error-code>
    <location>/WEB-INF/page/error/404.jsp</location>
</error-page>

<!-- <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext-security.xml</param-value> 
    </context-param> -->

<servlet>
    <servlet-name>lmsadmin</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:lms-admin.xml </param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet>
    <servlet-name>loadRun</servlet-name>
    <servlet-class>com.telecom.lms.portal.admin.service.LoadRunServlet</servlet-class>
    <load-on-startup>3</load-on-startup>
</servlet>

<servlet>
    <servlet-name>ctu-resource-agent</servlet-name>
    <servlet-class>com.myctu.platform.resource.agent.CTUResourceAgentServlet</servlet-class>
    <!-- &#19979;载地址 -->
    <init-param>
        <param-name>resource_proxy</param-name>
        <param-value>http://180.168.60.15:15320/resource-proxy</param-value>
    </init-param>
    <!-- &#21830;户标识 -->
    <init-param>
        <param-name>domain</param-name>
        <param-value>telecom</param-value>
    </init-param>
    <!-- &#31614;名过期时间,单位毫秒 -->
    <init-param>
        <param-name>expire</param-name>
        <param-value>86400000</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>ctu-resource-agent</servlet-name>
    <url-pattern>/ctu-resource-agent</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>lmsadmin</servlet-name>
    <url-pattern>*.html</url-pattern>
</servlet-mapping>

<filter>
    <filter-name>encoding</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>encoding</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>

<!-- 单点登录 start -->
<filter>
    <filter-name>CAS Filter</filter-name>
    <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter1</filter-class>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
        <param-value>https://cas.demo.myctu.cn/cas/login</param-value>
    </init-param>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
        <param-value>https://cas.demo.myctu.cn/cas/serviceValidate</param-value>
    </init-param>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
        <param-value>localhost:8080</param-value>
    </init-param>
    <init-param>
        <param-name>excludes</param-name>
        <param-value>*.jpg,*.png,*.js,*.css</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>CAS Filter</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>

<servlet>
    <servlet-name>LogoutServlet</servlet-name>
    <servlet-class>com.telecom.ctu.platform.cas.LogoutServlet</servlet-class>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.servlet.logout</param-name>
        <param-value> https://cas.demo.myctu.cn/cas/logout </param-value>
    </init-param>
    <init-param>
        <param-name>service</param-name>
        <param-value>http://localhost:8089/lmscore-service</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>LogoutServlet</servlet-name>
    <url-pattern>/logout</url-pattern>
</servlet-mapping>



<!-- 单点登录 end -->

<!-- wabacus start -->
<filter>
    <filter-name>Encoding</filter-name>
    <filter-class>com.wabacusdemo.util.SetCharacterEncodingFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>Encoding</filter-name>
    <url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>Encoding</filter-name>
    <url-pattern>*.wx</url-pattern>
</filter-mapping>

<listener>
    <listener-class>com.wabacus.WabacusServlet</listener-class>
</listener>

<servlet>
    <servlet-name>reportservlet</servlet-name>
    <servlet-class>com.wabacus.WabacusServlet</servlet-class>
    <init-param>
        <param-name>configpath</param-name>
        <param-value>classpath{/reportconfig}</param-value>
    </init-param>
    <load-on-startup>20</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>reportservlet</servlet-name>
    <url-pattern>/ShowReport.wx</url-pattern>
</servlet-mapping>
<jsp-config>
    <taglib>
        <taglib-uri>wabacus</taglib-uri>
        <taglib-location>/WEB-INF/wabacus.tld</taglib-location>
    </taglib>
</jsp-config>

<mime-mapping>  
    <extension>xls</extension>  
    <mime-type>application/vnd.ms-excel</mime-type>  
</mime-mapping>

<mime-mapping>  
    <extension>xlsx</extension>  
    <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>  
</mime-mapping>
<!-- wabacus end -->

<filter>
    <!-- 此名字需要在应用内保证唯一,名字作为产出的监控报表的唯一标识,每一个监控表唯一对应一个名字 -->
    <!-- 请将此fileter至于其他filter的最前面,保证监控数据的有效性 -->
    <filter-name>WebappStatistics</filter-name>
    <filter-class>com.telecom.ctu.platform.common.monitor.WebappStatistics</filter-class>
    <init-param>
        <param-name>name</param-name>
        <param-value>controller.statistics</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>WebappStatistics</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>

Blunger answered 21/5, 2013 at 7:59 Comment(1)
The WebApplicationInitializer is explained quite well in #16898806Europa
B
4

I added WebROOT file directory to the default directory, problems solved.

properties->MyEclipse->Deployment Assembly->Add

Blunger answered 27/5, 2013 at 3:19 Comment(1)
I had this error, and i was missing WebContent in Deployment AssemblyFerrous
K
0

Seems strange to me that URL http://localhost:8080/appRoot/page.jsp produces Directory Listing. Can you try your Tomcat server with another application which is working. The Spring WebApplicationInitializer should deal with web.xml file, where Spring is not initialized properly.

Krak answered 21/5, 2013 at 9:6 Comment(2)
thanks mate, sadly, it seems that other applications are not working either, I tried. For your information, I add my web.xml to this question.Blunger
Update your problem status after getting server up and running, if you wish.Krak
W
0

In Eclipse you may get more info on errors in a Problems view tab. Windows -> Show View -> Problems. You'll see a list of actual errors. I used to get the same message "INFO: No Spring WebApplicationInitializer types detected on classpath" when importing the existing Spring project into STS IDE. In my case there were the hibernate-3.2.1.ga.jar corrupted in lib folder. Replacing it have solved all compile problems.

Wizardry answered 22/5, 2013 at 14:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.