严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoSuchMethodError: org.springframework.core.CollectionFactory.createConcurrentMapIfPossible(I)Ljava/util/Map;
at org.springframework.web.context.ContextLoader.(ContextLoader.java:153)
at org.springframework.web.context.ContextLoaderListener.createContextLoader(ContextLoaderListener.java:53)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:44)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5017)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5531)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
2017-2-4 18:09:19 com.sun.faces.config.ConfigureListener contextInitialized
信息: 初始化上下文 '/njyl' 的 Mojarra 2.0.3 (FCS b03)
2017-2-4 18:09:19 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
2017-2-4 18:09:19 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
2017-2-4 18:09:19 org.apache.catalina.core.StandardContext startInternal
严重: Context [/njyl] startup failed due to previous errors
2017-2-4 18:09:19 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/njyl] created a ThreadLocal with key of type com.sun.faces.util.Util$1 and a value of type java.util.HashMap 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.
2017-2-4 18:09:19 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\apache-tomcat-7.0.63\webapps\njyl has finished in 2,469 ms
2017-2-4 18:09:19 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\apache-tomcat-7.0.63\webapps\ROOT
2017-2-4 18:09:19 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\apache-tomcat-7.0.63\webapps\ROOT has finished in 26 ms
2017-2-4 18:09:19 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
2017-2-4 18:09:19 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
2017-2-4 18:09:19 org.apache.catalina.startup.Catalina start
信息: Server startup in 3030 ms
applicationContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url" value="jdbc:sqlserver://localhost:1433;databasename=myWeb" />
<property name="username" value="sa" />
<property name="password" value="zl1110" />
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mappingLocations">
<list>
<value>com/cnstrong/entity/Users.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<!-- spring的三块 -->
<!-- 将sessionFactory纳入管理 -->
<bean name="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- 设置监控位置,借口包位置 -->
<aop:config>
<aop:pointcut expression="execution(public * com.cnstrong.dao.*.*(..))" id="bussinessService"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="bussinessService"/>
</aop:config>
<!-- 设置4个东西,并添加hibernate的方法 -->
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="add*" read-only="true" propagation="REQUIRED" isolation="DEFAULT"/>
<tx:method name="update*" read-only="true" propagation="REQUIRED"/>
<tx:method name="delete*" read-only="true" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<!-- 自定义类注入 -->
<bean id="userDaoImp" class="com.cnstrong.daoImp.UserDaoImp">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="loginAction" class="com.cnstrong.action.LoginAction"><!-- 这个id给了strutsxml中了 -->
</bean>
struts.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<package name="login" extends="struts-default" namespace="/login">
<action name="loginAction" class="loginAction" method="checkLogin">
<result name="success">/main.jsp</result>
<result name="login">/login.jsp</result>
</action>
</package>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
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">
struts2
org.apache.struts2.dispatcher.FilterDispatcher
struts2
/*
<!-- spring监听器 -->
org.springframework.web.context.ContextLoaderListener
contextConfigLocation
classpath:applicationContext.xml
login.jsp