![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java Web常见错误
陈建
这个作者很懒,什么都没留下…
展开
-
org.springframework.dao.InvalidDataAccessApiUsageException
在整合S2SH的时候,为了在jsp页面中使用session,在web.xml中将会配置OpenSessionInViewFilter,可是默认情况下FlushMode是NEVER,在程序运行时便会出现一下异常。org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in原创 2013-03-30 19:28:41 · 755 阅读 · 0 评论 -
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
在写一个很简单的web项目时,出现了java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space错误,开始在网上查了查,说是把内存设置大一点,添加了一个环境变量,但是还是不行,后来又看到一篇文章上说的因为tomcat和jdk的版本不一致,打开myeclipse一看,果然,Tomcat 7原创 2013-03-31 14:01:34 · 7989 阅读 · 2 评论 -
org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a
在用Spring于Hibernate整合的时,在没有配置Spring的事物管理时。使用Hibernate进行事物进行管理时可能会出现此异常org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transact原创 2013-03-31 15:57:55 · 1331 阅读 · 0 评论 -
Struts2与Spring整合时Action的创建问题
1.如果不使用Spring对Struts的Action进行注入时,在struts.xml配置文件中action的class直接配置成类的全路径名, /WEB-INF/view/msg_{2}.jsp /WEB-INF/view/msg_error.jsp 此时虽然可以使用,但是如果我们的action类中包含了其他类的对象,此时我原创 2013-04-01 09:12:22 · 698 阅读 · 0 评论 -
org.hibernate.MappingException: Could not determine type for
org.hibernate.MappingException: Could not determine type for:包名.类名 ……………………。出现这个错误,我搞了两个小时,后来我把annotation注解放在了属性上面就没有了此错误。但这样又破坏了封装。怎么办呢?这是Bug吗?我的类是一个中间表:出错的代码定义如下:修改后的代码:如果知道有其他办法,可以不用转载 2013-04-21 14:51:43 · 1167 阅读 · 1 评论 -
ognl.NoSuchPropertyException
出现此异常时因为找不到属性,有两种方法,可以先重启以服务器,看是否是因为没有reload的原因,若reload后还是报错。那就是属性的定义有问题,属性定义的前两个字符必须小写。原创 2013-04-14 15:01:30 · 1783 阅读 · 0 评论 -
hibernate配置文件错误
Referenced file contains errors (http://hibernate.sourceforge.net/hibern ... on-3.0.dtd) For more information, right click on the message and select "Show Details" replace allCode:转载 2013-04-21 14:05:34 · 999 阅读 · 0 评论 -
Hibernate Connection cannot be null when 'hibernate.dialect' not set错误
方法一 (我没有试):在src目录下添加hibernate.properties配置文件,内容如下:hibernate.connection.driver_class=com.mysql.jdbc.Driverhibernate.connection.password=634587hibernate.connection.url=jdbc:mysql://localho转载 2013-06-02 16:19:18 · 3837 阅读 · 0 评论