对于网上的种种 抄来抄去 转来转去 鸟解决办法 导致我发怒了 下面是我的解决办法 可以单元测试 不用改web.xml
在dao层 不管你 lazy false 还是 true 全部无敌解决
r=(objec) ht.executeFind(new HibernateCallback(){
public List<Role> doInHibernate(Session s)throws HibernateException, SQLException {
List<objec> l=new ArrayList<objec>();
Transaction tran=s.beginTransaction();
Role q=(objec) s.load(objec.class,id);
q.getMenu().size();
l.add(q);
tran.commit();
s.close();
return l;
}
}).get(0);
分享到:
相关推荐
NULL 博文链接:https://smartgwt.iteye.com/blog/1252268
主要介绍了Plsql Developer连接Oracle时出现Could not initialize oci.dll解决方案,需要的朋友可以参考下
解决:oracle_plsql连服务端时 Initialization error could initialize错误处理方法
监听COM口启动程序报错 Could not initialize class gnu.io.RXTXCommDriver异常 是因为需要在%JAVA_HOME%/jre/bin目录中添加rxtxParallel.dll、rxtxSerial.dll文件
内涵jacob_1.14.3-x64.dll;jacob_1.14.3-64.jdk(maven地址);解决方法:Could not initialize class com.jacob.com.ComThread
解决org.hibernate.LazyInitializationException: could not initialize proxy - no Session...
Could not initialize "D:\app\Happy\product\11.2.0\dbhome_1\bin\oci.dll" Make sure you have the 32 bits Oracle Client installed. OracleHomeKey: OracleHomeDir: D:\app\Happy\product\11.2.0\dbhome_1 ...
使用javacpp技术,在32位linux系统上实现视频截图功能,注意so文件放在liberary_path里面
java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.AutoloadedDriver40 导致的原因: 在azkaban的server和executor中缺少一个叫derby.jar的包
instantclient-basic-windows.x64-11.2.0.4.0
解决hbase client在windows环境下报Could not initialize class org.fusesource.jansi.internal.Kernel32的问题,把jar包放入hbase client的lib包下,重新运行hbase.cmd shell即可
IDA6.4中支持pin的动态二进制插桩功能,这是其中的描述文档
Win7 x64 PL/SQL 连接 Oralce 提示 Could not initialize "%ORACLE_HOME%\bin\oci.dll" 缺少oci文件
unable to initialize windows sockets interface error code 0 WINSOCK坏了
并且对Dao和Service进行了封装,内含.jar包,并且解决了一对多双向关联的could not initialize proxy - no Session错误,同时解决了……invoked on net.sf.json.JSONException: There is a cycle in the hierarchy!...
JSONArray.fromObject(map)报错:Could not initialize class net.sf.json.JsonConfig。ireport 需要高于2.1版本的包。于是就找了这些包。最后2.2.2适合
7.注册如果发送邮件激活的方式出错(返回页面错误org.hibernate.LazyInitializationException: could not initialize proxy - no Session) 8.禁止用户后不允许登录、发帖、回帖等 9.后台会员搜索中文名搜索乱码 ...
Concurrent Manager Fails to Start With Error Could not initialize the Service Manager FNDSM_{HOSTNAME}_{SID}(Doc ID 735148.1)
背景: windows 7 64位操作系统,安装数据库:win64_11gR2_database_1of... Could not initialize C:oracleproduct10.2.0client_1inoci.dll Make sure you have the 32 bits Oracle Client installed. OCIDLL forc