- 浏览: 145543 次
- 性别:
- 来自: 深圳
-
文章分类
- 全部博客 (88)
- struts (8)
- js (8)
- hibernate (11)
- spring (1)
- j2ee (1)
- ajax (1)
- oracle (21)
- mysql (4)
- tomcat (1)
- php (0)
- java设计模式 (0)
- jms (0)
- 感言 (1)
- linux (0)
- 算法 (1)
- velocity (2)
- python (0)
- prototype (2)
- axis (0)
- Test (4)
- java (5)
- 模板 (1)
- 服务器 (0)
- 移动互联网 (0)
- hadoop (0)
- impala (0)
- hive (0)
- hdfs (0)
- mongodb (0)
- storm (0)
- spark (0)
- flume (0)
- kafka (0)
- 管理知识 (9)
最新评论
-
cwftalus:
insert into 无法实现
Infobright入库 -
红级主:
问题是我就不知道sys的密码,进入其他的用户也改不了密码吧?
ORACLE 中更改用户密码的方法
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 - the owning Session was closed
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:56)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:158)
出现此错误的原因是当Session关闭的时候,在取与用户相关联的对象时候,就会出现此错误,
例如:但Session没有关闭,获得对象User ,用户User与Role之间的关系是多对一,但Session关闭时,再通过User获得Role对象,就会出现下面的错误
10-Mar-2009 10:48:20 org.hibernate.LazyInitializationException <init>
SEVERE: could not initialize proxy - the owning Session was closed
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:56)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:158)
发表评论
-
hibernate建表
2009-08-06 21:19 2346Hibernate配置文件: <hibernate-c ... -
hibernate 分页
2009-05-03 14:33 0http://www.iteye.com/topic/7636 ... -
8.4生成配置文件hibernate.cfg.xml
2009-05-02 16:08 0http://book.51cto.com/art/20080 ... -
hibernate 生成sql
2009-05-02 15:56 0[url]http://www.wikihow.com/Gen ... -
37.8 Hibernate的自动生成工具
2009-05-02 15:14 0http://book.csdn.net/bookfiles/ ... -
Hibernate注释下的自定义架构实现
2009-05-02 15:07 0Hibernate注释下的自定义架构实现 http://www ... -
hibernate 分页
2009-04-25 20:27 899三个参数, 第一个是HQL语句,如from EntryObj ... -
Could not load org.apache.xerces.util.EncodingMa
2009-04-20 22:22 3017出现此错误的原因是在hibernate 映射文件中引入了不存在 ... -
could not load an entity
2009-04-19 23:12 85811.could not load an entity (ge ... -
org.springframework.orm.hibernate3.HibernateSystem
2009-04-07 21:04 1962出现此错误的愿意是主表,附表 的关联字段问题,附表中的外键与主 ... -
org.hibernate.tuple.PojoEntityTuplizer.setProperty
2009-04-03 18:12 1249err.org.hibernate.tuple.PojoEnt ... -
using operator "."
2009-03-30 09:38 0javax.servlet.jsp.el.ELExceptio ... -
在Hibernate中使用oracle的sequence产生主键
2009-03-29 11:24 0在Hibernate中使用oracle的sequence产生主 ... -
hibernate延迟
2009-03-24 09:16 0lazy="false"的解释 Hibe ... -
Hibernate深入研究3-1
2009-03-23 20:19 0[url] http://www.blogjava.net/a ... -
浅谈对象在Hibernate中的状态
2009-03-23 19:35 848浅谈对象在Hibernate中的 ... -
第 14 章 HQL: Hibernate查询语言
2009-03-15 22:01 0http://www.redsaga.com/hibernat ... -
Hibernate 复合查询
2009-03-15 21:45 0复合查询主要是处理,具有关联关系的两个实体怎样进行关联查询,比 ... -
could not initialize proxy - Session was closed
2009-03-10 11:01 886转自 http://hi.baidu.com/k_boy/bl ... -
hibernate 异常处理
2009-03-05 16:14 1338异常:not-null property references ...
相关推荐
3. **Hibernate的Hibernate.initialize()方法**:在需要使用懒加载属性的地方,手动调用此方法初始化代理对象。但这需要在业务代码中显式处理,不够优雅。 4. **使用Hibernate的Criteria API或HQL查询**:在查询时...
本程序整合了struts-2.2.3.1+spring-framework-3.1.0+hibernate-distribution-3.6.8+JSON+MySQL+Annotation,并且对Dao和Service进行了封装,内含.jar包,并且解决了一对多双向关联的could not initialize proxy - ...
Could not initialize proxy - the owning Session was closed 这是Hibernate懒加载机制中的常见异常,当尝试访问一个已被关闭的Session中的懒加载属性时触发。例如,如果Session在使用`setFetchMode(FetchMode....
7.注册如果发送邮件激活的方式出错(返回页面错误org.hibernate.LazyInitializationException: could not initialize proxy - no Session) 8.禁止用户后不允许登录、发帖、回帖等 9.后台会员搜索中文名搜索乱码 ...
7. **Action的返回方法出错,could not initialize proxy - no Session** 这可能是在Hibernate操作中没有正确初始化Session。确保在访问数据库之前已打开Session,并在完成后关闭。 8. **查询数据出现乱码问题** ...
错误表现:在Session关闭后尝试访问懒加载属性,抛出“org.hibernate.LazyInitializationException: could not initialize proxy - no Session”异常。 解决方案:理解并合理使用Open Session in View(OSIV)模式...
Exception in thread "main" org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed ``` - **日志记录**:为了更好地诊断问题,可以使用log4j等工具进行日志...
7.注册如果发送邮件激活的方式出错(返回页面错误org.hibernate.LazyInitializationException: could not initialize proxy - no Session) 8.禁止用户后不允许登录、发帖、回帖等 9.后台会员搜索中文名搜索乱码 ...
fprintf(stderr, "Could not initialize the application.\n"); exit(1); } if (! libinverseInitialize() ) { fprintf(stderr,"Could not initialize the library.\n"); exit(1); } ``` #### 六、总结 本文...
MessageBox(_T("could not initialize the application")); } if (!addtwoInitialize()) { MessageBox(_T("could not initialiae addtwo")); } try { mwArray a(2, 2, mxDOUBLE_CLASS); // 其他代码... }...
MessageBox(_T("could not initialize the application")); } if(!addtwoInitialize()){ MessageBox(_T("could not initialiae addtwo")); } try{ mwArray a(2, 2, mxDOUBLE_CLASS); // ... 其他代码 ... }...
std::cout << "Could not set proxy blanket. Error code=0x" ; pSvc->Release(); pLoc->Release(); CoUninitialize(); return 1; // 程序失败。 } ``` #### 6. 查询WMI信息 最后一步是实际执行WMI查询。这...
directive because it is not set or is mistyped, a default value will be used. ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, ...
AfxMessageBox("Couldn't initialize transport layer!\n"); return false; } 启动事件监听线程: AfxBeginThread(sip_uac,(void *)this); 向SIP Proxy注册: eXosip_clear_authentication_info()...