
搭建SSH(Struts2、Spring3、Hibernate4)遇到的问题
诗景莫
一个搬运代码的民工!!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
java.lang.NoClassDefFoundError: Lorg/hibernate/cache/CacheProvider;问题解决
[b]搭建SSH(Struts2、Spring3、Hibernate4)遇到的问题[/b]原因是:在hibernate4已经将hibernate3的一些功能改掉了,在hibernate4已经不使用CacheProvider了。解决方法如下:<!-- 将Hibernate中的事务交给Spring进行接管 -->将<bean id="sessionFactory" class=...原创 2018-12-24 15:38:13 · 1103 阅读 · 0 评论 -
ApplicationEventMulticaster not initialized和LifecycleProcessor not initialized解决
错误描述:java.lang.IllegalStateException: ApplicationEventMulticaster not initializedjava.lang.IllegalStateException: LifecycleProcessor not initialized解决办法:1、首先确认工程中spring的jar包是否引好了;2、clean工程和tomcat...原创 2018-12-24 15:31:17 · 586 阅读 · 0 评论 -
自定义404错误页面
为了让程序具有更好的友好型,这是一个应该实现的细节。配置起来很简单,在项目的web.xml文件中配置如下信息:<error-page> <error-code>404</error-code> <!--指定404.jsp页面文件在WebContent根目录下--> <location>/404.jsp</loc...原创 2018-12-24 15:35:02 · 1043 阅读 · 0 评论 -
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized
[11-15 11:34:44][localhost-startStop-1][WARN ][AbstractApplicationContext.java-1052]-Exception thrown from ApplicationListener handling ContextClosedEvent java.lang.IllegalStateException: Applicati...原创 2018-12-24 15:35:19 · 11634 阅读 · 0 评论 -
No result defined for action xxx.EmployeeAction and result xxx
警告: Could not find action or resultNo result defined for action com.study.persistent.services.EmployeeAction and result list at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(Default...原创 2018-12-24 15:35:32 · 408 阅读 · 0 评论 -
spring注解@Autowired、@Resource的区别
1、@Autowired与@Resource都可以用来注入bean.都可以写在字段(成员变量)上,或写在setter方法上。2、@Autowired默认按照类型注入(这个注解是属业spring的),默认情况下必须要求依赖对象必须存在,如果要允许null值,可以设置它的required属性为false,如:@Autowired(required=false),如果我们想使用名称注入可以结合@Qua...原创 2018-12-24 15:35:50 · 216 阅读 · 0 评论 -
spring注解@Component、@Repository、@Service、@Controller的区别
现在Web应用程序绝大多数都是采用了经典的三层分层结构,因此最好在持久层、业务层和控制层分别采用 @Repository、@Service 和@Controller 对分层中的类进行注解,而用@Component对那些比较中立的类进行注解。在一个稍大点的项目中,通常会有上百个组件,如果这些组件采用xml方式的bean定义来配置话,显然会增加applicationContext.xml配置文件的体积...原创 2018-12-24 15:36:02 · 277 阅读 · 0 评论 -
spring注解@Service注解的使用
要说明@Service注解的使用,就得说一下我们经常在spring配置文件applicationContext.xml中看到如下图中的配置:<!-- 采用扫描 + 注解的方式进行开发 可以提高开发效率,后期维护变的困难了,可读性变差了 --><context:component-scan base-package="com.study.persistent" />...原创 2018-12-24 15:36:16 · 56341 阅读 · 9 评论 -
Struts2中Action由Struts2自己管理与由Spring管理的区别(转自别人)
struts2单独使用时,Action实例由struts2自己负责创建;struts2与spring集成时,Action实例由spring负责创建。这会导致在这两种情况下在对struts.xml配置文件进行配置时会有略微的差异。Struts2默认的实现是Prototype模式(23种设计模式中的原型模式),也就是说每个请求都会新生成一个Action实例,因此不存在线程是否安全的问题。特别需要注意的...原创 2018-12-24 15:36:28 · 387 阅读 · 0 评论 -
Disabling contextual LOB creation as createClob() method threw error
问题描述(红色java.lang.reflect.InvocationTargetException):一月 23, 2018 10:36:28 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting...原创 2018-12-24 15:36:55 · 766 阅读 · 0 评论 -
Unable to load configuration. - [unknown location]
问题描述:严重: Dispatcher initialization failedUnable to load configuration. - [unknown location]at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)at o...原创 2018-12-24 15:37:12 · 1458 阅读 · 0 评论 -
未找到类: org/apache/commons/io/FileUtils和org.apache.commons.lang3.StringUtils
问题描述:警告: Could not create JarEntryRevision for [jar:file:/D:/jbpmworkspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh/WEB-INF/lib/struts2-core-2.3.15.jar]!java.lang.NoClassD...原创 2018-12-24 15:37:23 · 1653 阅读 · 0 评论 -
在搭建过程中需要注意的一些小细节梳理
我是在Eclipse的Mars版本中进行搭建的,针对整合过程中自己遇到问题,做如下总结:先在开发环境中针对要引用的框架的不同创建不同的Libraries,然后在自己的工程中选配自己在开发环境中创建的Libraries。在开发环境中创建Libraries,Window->Preferences,如下图:[img]http://dl2.iteye.com/upload/attachment/...原创 2018-12-24 15:37:35 · 443 阅读 · 0 评论 -
java.lang.NoClassDefFoundError: org/hibernate/engine/SessionFactoryImplementor
问题描述:严重: Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txManager' defined in class path resource [applicationContext.xml]: Invo...原创 2018-12-24 15:37:48 · 1038 阅读 · 0 评论 -
Bean property 'lobHandler' is not writable or has an invalid setter method.
错误描述严重: Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: ...原创 2018-12-24 15:38:01 · 964 阅读 · 0 评论 -
ClassNotFoundException: org.springframework.web.context.ContextLoaderListener解决
在搭建的时候,运行Tomcat就如下错误。错误描述:严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListenerjava.lang.ClassNotFoundException: org.springframework.web.context....原创 2018-12-24 15:30:52 · 559 阅读 · 0 评论