spring加载很久No Spring WebApplicationInitializer types detected on classpath

J2EE 码拜 9年前 (2015-05-10) 4330次浏览 0个评论
 
2014-04-29 11:24:03.400:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
2014-04-29 11:25:12.857:INFO:/:No Spring WebApplicationInitializer types detected on classpath
2014-04-29 11:25:14.582:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/E:/workspace/guida

请问这个是什么原因引起?

10分
No Transaction manager found

你没有配置 Transaction  吗?

    <bean id="transactionManager"
		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
		<property name="dataSource" ref="dataSource" />
	</bean>

	<!-- 使用annotation定义事务 -->

	<tx:annotation-driven transaction-manager="transactionManager" />

有这个东西在咯

5分
spring  文档没有加载到。
引用 3 楼 rui888 的回复:

spring  文档没有加载到。

是 spring 的配置文件么?

5分
恩, 是的。是的。
但 我工程可以启动噢
Spring WebApplicationInitializer 这个东西是做什么的》?
2014-04-30 11:43:29.756:INFO:oejs.Server:jetty-8.1.0.v20120127
2014-04-30 11:43:32.440:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
2014-04-30 11:44:38.323:INFO:/:No Spring WebApplicationInitializer types detected on classpath
2014-04-30 11:44:39.362:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/E:/workspace/guidance-code/guidance-admin/src/main/webapp/},file:/E:/workspace/guidance-code/guidance-admin/src/main/webapp/
2014-04-30 11:44:39.362:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/E:/workspace/guidance-code/guidance-admin/src/main/webapp/},file:/E:/workspace/guidance-code/guidance-admin/src/main/webapp/
2014-04-30 11:44:39.362:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/E:/workspace/guidance-code/guidance-admin/src/main/webapp/},file:/E:/workspace/guidance-code/guidance-admin/src/main/webapp/
[INFO] Started Jetty Server
2014-04-30 11:44:39.745:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:80

我将 web.xml 所有配置的东西 屏蔽了, 但还是 要启动很久。。。。。

/:No Spring WebApplicationInitializer types detected on classpath


oejpw.PlusConfiguration:No Transaction manager found – if your webapp requires one, please configure one.

这里 停留了 很久。。。。

5分
你好,请问你的这个问题解决了吗?我遇到了同样的问题No Spring WebApplicationInitializer types detected on classpath。如果解决了,求拉一把
5分
引用 8 楼 u011761806 的回复:

你好,请问你的这个问题解决了吗?我遇到了同样的问题No Spring WebApplicationInitializer types detected on classpath。如果解决了,求拉一把

你用的Spring版本是多少?从3.1.0开始在加载前就会先扫描,查找WebApplicationInitializer实现类。可以通过配置关闭这个功能:
<web-app version=”3.0″ xmlns=”http://java.sun.com/xml/ns/javaee”
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
    xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd”
    metadata-complete=”true”>

5分
和楼主同样的问题,Spring 2.5,但是无论怎么在借鉴网上的办法,终究还是“No Spring WebApplicationInitializer types detected on classpath”
5分
你好 我好想也遇到了同样的问题,急用求教!
2015-4-21 9:35:23 org.apache.tomcat.websocket.server.WsSci onStartup
信息: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocketJARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 
2015-4-21 9:35:26 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
2015-4-21 9:35:26 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class com.mhy.action.IndexAction
javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.ResourceEnvFactory.getObjectInstance(ResourceEnvFactory.java:117)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
更换CPU 和主板 升级到 I5 快了许多,唉

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明spring加载很久No Spring WebApplicationInitializer types detected on classpath
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!