-
org.hibernate.LazyInitializationException,该怎么解决
org.hibernate.LazyInitializationExceptionorg.hibernate.LazyInitializationException:failedtolazilyinitializeacollectionofrole:cd.itcast.pss.domain.User.roles,nosessionorsessionwasclosed atorg.hibernate...
185
热度 -
J2EE调整三大框架后采用中文查询报错
J2EE整合三大框架后采用中文查询报错HTTPStatus500---------------------------------------------------------------------------------typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatprevented...
4134
热度 -
"main " org.hibernate.StaleStateException:
高分求救Hibernate中不能更新数据的问题(100)错误内容如下:Hibernate:updatetest.dbo.userinfosetusername=?,password=?whereid=?Exceptioninthread"main"org.hibernate.StaleStateException:Unexpectedrowcount:0expected:1 a...
61
热度 -
org.hibernate.exception.ConstraintViolationException: Could
这个东西怎么回事?一提交就这样typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.exceptionorg.hibernate.exception.ConstraintViolationException:Couldnot...
46
热度 -
寻大神帮小弟我看下SQL转成HQL的异常
寻大神帮我看下SQL转成HQL的错误这是SQLSELECTgoods.*FROM(SELECT*FROMyxgl_huodongjiangpinAShdjpWHEREhdjp.HDJL_ID='712e452e-075d-43288981-62804c8cc615')ASjp,kcgl_goodsASgoodsWHEREjp.GOODS_ID=goods.GOODS_ID;这是HQLselectg...
261
热度 -
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation:
添加的时候出错,什么原因?[framework]2011-10-1111:18:49,703-org.hibernate.util.JDBCExceptionReporter-0[http-8080-2]WARNorg.hibernate.util.JDBCExceptionReporter-SQLError:1364,SQLState:HY000[framework]2011-10-1111:1...
174
热度 -
hibernate使用HQL语句查询有关问题
hibernate使用HQL语句查询问题hibernate使用关键字in进行条件查询时能否按in里面出现的顺序进行排序,比如一条查询"selectofromObjectowhereidin(5,2,8,6)"我进行查询后以list返回,hibernate返回的对象总是按排好顺序的对象来返回,也就是返回的对象是以2,5,6,8的顺序出现的,有没有办法让返回的对象还是以in里的ID...
36
热度 -
hql 总出错 帮小弟我看看
hql总出错帮我看看selectsum(loan.l_money)fromloan,mainInfowhereloan.l_ID_number=mainInfo.m_ID_numberandmainInfo.m_addrlike'1155______'groupbyloan.l_ID_number这个东西老错java.lang.IllegalStateException:Nodatatypefor...
299
热度 -
org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
hibernate+spring+struts启动tomcat时出错严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreation...
1036
热度 -
寻宗师:SSH中,页面传值给action中,查询结果报错
寻大师:SSH中,页面传值给action中,查询结果报错:页面代码:<scripttype="text/javascript">functionselectSid(){varsid=document.getElementById("sid").value;window.location.href="findBySidStudent?sid="+sid;}</script>&...
100
热度 -
生手求解。HQL占位符出错
新手求解。。HQL占位符出错正确代码,没用占位符 publicStringexecute(){ Stringhql="selectdistinctYEAR(w.date)fromWwwhereyear(w.date)=2015orderbyyear(w.date)"; List<Object>ws=this.getHibernateTemplate().find(hql}); f...
73
热度 -
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation
ssh框架SqlServer数据库,当注册时候,插如数据库时提示一下错误。不知道时数据库版本有问题还是其他的错误?请知情者给予帮助。Hibernate:insertintoshare.dbo.user(name,password,telephone,email,question,answer,noticedtimes)values(?,?,?,?,?,?,?)selectscope_identit...
114
热度 -
hibernate HQL语句有关问题 麻烦各位帮忙
hibernateHQL语句问题麻烦各位帮忙fromContractwhere1=1andto_char(signdate,'YYYY')='2008'是这样的我传入2008这个String类型的年份想查出2008年的项目。signdate在数据库里是date类型的,里面存的是YYYY-MM-DD。对象中是java.util.Date类型的但是这样查不出来的不知道正确的HQL怎么写还是要把2008...
269
热度 -
Hibernate hql 去除重复的对象,该怎么解决
Hibernatehql去除重复的对象hql语句fromtable,但是这个表中可能会有一些重复的数据。如果用distinct的话,返回的就不是对象.这样的写法可以吗?fromtablewhere用户IDin(selectdistinct用户IDfromtable)还有没更好一点的写法。color='#e78608'>------解决方案--------------------定义pojo的时候重...
108
热度 -
求hibernate大神,hql分页求总和的,看似简单难入登天
求hibernate大神,hql分页求总数的,看似简单难入登天现状说明:公司之前已经封装好了,传入一个hql,执行分页查询。这块没问题。有个求数量的,对同样的hql,进行去orderby等,然后用hibernate工具转sql,再一些select方面的处理,增加count(*)。也没啥问题。现在准备做saas,每个表都增加了1个租户ID,为了减少后台不必要的代码,我决定使用hibernate的en...
4353
热度 -
org.hibernate.HibernateException: /hibernate.cfg.xml not found
测试类运行出现如下警告!请问怎么解决?测试类源码:packagech03.hibernate;importorg.hibernate.*;importorg.hibernate.cfg.*;publicclassTest{ publicstaticvoidmain(String[]args){ try{ SessionFactorysf=newConfiguration().configur...
110
热度 -
org.hibernate.exception.SQLGrammarException: could not execute query
Hibernate查询报错问题,请高手解决哈fromOrderDetailowhereo.order.orderNumber='1150168467203'表字段orderNumber是varchar类型的这条HQL语句中查询时报这样的错误08:47:30,484ERRORJDBCExceptionReporter:72-转换varchar值'1150168467203'时溢出了整数列。超过了其中...
112
热度 -
* org.hibernate.impl.QueryImpl * 错误
**********org.hibernate.impl.QueryImpl'>org.hibernate.impl.QueryImpl*********异常!查询的时候出现异常如下:javax.servlet.ServletException:org.hibernate.impl.QueryImpl org.apache.struts.action.RequestProcessor.proces...
681
热度 -
org.hibernate.MappingException: Error reading resource: com/benben/hibernate/
hibernate3.0的一个问题,研究好几天了??????高手进,技术一般的回答不了所有的方法在main测试没有问题,可以正常输出数据库的结果,可是在jsp里就报如下错误,困扰我好久了,帮忙看看,谢谢%%%%ErrorCreatingSessionFactory%%%%org.hibernate.MappingException:Errorreadingresource:com/benben/h...
526
热度 -
hibernate的hql查询语句有关问题
hibernate的hql查询语句问题两个对象publicclassManager{privateIntegerid;//管理员ID号privateStringname;//管理员名称privateStringpwd;//管理员密码privatePurviewpurview;省略set和get方法}publicclassPurview{privateIntegerid;privateintsyss...
41
热度