- 浏览: 145449 次
- 性别:
- 来自: 深圳
-
最新评论
-
cwftalus:
insert into 无法实现
Infobright入库 -
红级主:
问题是我就不知道sys的密码,进入其他的用户也改不了密码吧?
ORACLE 中更改用户密码的方法
文章列表
浅谈对象在Hibernate中的状态
===========================================================
作者: wqbi(http://wqbi.itpub.net)
发表于: 2006.05.31 00:07
分类: hiberante之旅
出处: http://wqbi.itpub.net/post/2966/106400
---------------------------------------------------------------
...
- 2009-03-23 19:35
- 浏览 847
- 评论(0)
出现此错误的原因是在用ajax进行数据验证是出现的错误,在执行mapping.findForward("add");之前,已经将相应结果返回客户端,由于重复提交response,
注释的部分引起的
// response.getWriter()
// .println("<?xml version='1.0' encoding='GB2312' ?>");
// response.getWriter().println("<root>");
// response.getWriter().println(&quo ...
- 2009-03-23 16:47
- 浏览 2178
- 评论(0)
转自 http://hi.baidu.com/k_boy/blog/item/6ce8f80366d784e808fa93f1.html
其实这个异常写的非常之清楚,就是会话关闭,无法对Hibernate实体进行操作。造成这样的情况有很多,什么书写错误啊,逻辑错误啊。
但就此说一下关于lazy机制:
延迟初始化错误是运用Hibernate开发项目时最常见的错误。如果对一个类或者集合配置了延迟检索策略,那么必须当代理类实例或代理集合处于持久化状态(即处于Session范围内)时,才能初始化它。如果在游离状态时才初始化它,就会产生延迟初始化错误。
下面把Customer.hbm.xml文件的 ...
- 2009-03-10 11:01
- 浏览 885
- 评论(0)
could not initialize proxy - the owning Session was closed
出现此错误的原因是当Session关闭的时候,在取与用户相关联的对象时候,就会出现此错误,
例如:但Session没有关闭,获得对象User ,用户User与Role之间的关系是多对一,但Session关闭时,再通过User获得Role对象,就会出现下面的错误
10-Mar-2009 10:48:20 org.hibernate.LazyInitializationException <init>
SEVERE: could not initialize proxy ...
- 2009-03-10 10:58
- 浏览 1296
- 评论(0)
1.理论
只要两个表的公共字段有匹配值,就将这两个表中的记录组合起来。
个人理解:以一个共同的字段求两个表中符合要求的交集,并将每个表符合要求的记录以共同的字段为牵引合并起来。
语法
FROM table1 INNER JOIN table2 ON table1 . field1 compopr table2 . field2
INNER JOIN 操作包含以下部分:
部分 说明
table1, table2 要组合其中的记录的表的名称。
field1,field2 要联接的字段的名称。如果它们不是数字,则这些字段的数据类型必须相同,并且包含同类数据,但是,它们不必具有相同的名 ...
- 2009-03-09 11:10
- 浏览 1041
- 评论(0)
异常:not-null property references a null or transient value
用户与角色之间的关系是多对一,现在添加一用户,出现此异常的原因是
1.表User中外键角色编号不为NULL,并且在User.hbm.xml 中 用户于角色之间的关系是多对一
<many-to-one
name="role"
class="com.cn.bireport.domain.Role"
>
<column name="role_id&quo ...
- 2009-03-05 16:14
- 浏览 1337
- 评论(0)
ids for this class must be manually assigned before calling save(),
User.hbm.xml 中主键生成设置是 <generator class="assigned"></generator>
hibernate 这个错误的原因可能是,表中已经有个主键(id)。 但是插入的(调用save)时那个值是null
User user_ = new User();
//user_.setUser_id(id);这一句注释才出现这个错误,id值是页面传进来的,没有给User对象 ...
- 2009-03-05 16:01
- 浏览 1278
- 评论(0)
出现此异常的原因是 struts-config.xml 文件中 forward 节点中的name的值没有save值, jsp页面中的form表单中请求的<form action="userAction.do?action=save" method="get">action的值save 在struts——config.xml 中没有找到,就会出现这样的错误。
struts-config.xml 文件内容部分如下:---------------------
<action path="/userAction"
...
- 2009-03-05 10:28
- 浏览 2920
- 评论(0)
后台 Action中为 String id =request.getParameter("id");这个id是从前台页面传进来的,如果页面中没有这个参数,就会报告这个错误。
javax.servlet.ServletException: id to load is required for loading
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.process ...
- 2009-03-04 15:30
- 浏览 907
- 评论(0)
背景音乐实现代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
td{font-size:20px;color:red;text-align:center} ...
- 2009-03-03 16:14
- 浏览 980
- 评论(0)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext-hibernate.xml]: Initialization of bean failed; nested exception is org.hibernate.MappingException: Association references unm ...
- 2009-03-03 16:11
- 浏览 1093
- 评论(0)
JAVA四种基本排序,包括冒泡法,插入法,选择法,SHELL排序法。其中选择法是冒泡法的改进,SHELL排序法是 插入法的改进。所以从根本上来说可以归纳为两种不同的排序方法:即:插入法&冒泡法
一、 插入法:
遍历 ...
- 2009-01-15 09:09
- 浏览 947
- 评论(0)
<html>
<head>
<title>tip</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<script>
if(!document.attachEvent)
{
document.attachEvent = functio ...
- 2009-01-14 17:43
- 浏览 946
- 评论(0)