易截截图软件、单文件、免安装、纯绿色、仅160KB

java程序调用hibernate时延迟加载的问题

利用spring定时器quart,写了一个定时任务,该任务需要调用hibernate dao层,每次调用,出现如下错误:

ERROR - 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:53)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:84)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:134)
at com.vco.data.bo.Users$$EnhancerByCGLIB$$1938cc4.getNickName( <generated>)
at com.vco.schedule.AutoAdopt.doAutoAdopt(AutoAdopt.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:248)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.Simp


相关问答:

linux下java调用C++库中函数的问题

不知道是什么原因,我该如何处理,请大虾们指教了,小弟在此谢过。。。。
错误信息如下:
The program being debugged was signaled while in a function called from GDB.
GDB has restored the context t ......

mapxtreme for java 如何在图层画线?

查API,看到FeatrueFactory有这个方法
public Feature createPolyLine(double[][] thePoints,
                              R ......

Java Lucene 中import的问题

我想使用Lucene的代码,发现要import一批文件:
============
import org.apache.lucene.analysis.standard.StandardAnalyzer;

import org.apache.lucene.document.Document;
………………
===== ......

java的问题 急急!!

我在eclipse中写了一个播放音乐的类,并把音乐文件和类文件放在了一起,结果运行时,出现错误,说是音乐文件那个是空的,但是在jcreator用同样的方法结果是可以运行的,请求高说指教,告诉为什么?急
你若是在Windo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号