当前位置: 代码迷 >> HibernateException的解决方案
 
  • 利用hibernate查询语句查询信息,默认当日,不然往前推

    利用hibernate查询语句查询信息,默认当日,否则往前推 publicList<AhemcQualityAir>selectcheckQualityAir(finalStringtime){ finalStringhql="selectairfromAhemcQualityAirairwhereair.isDelete=0andair.strtes1=1andair.repor...

    327
    热度
  • Hibernate中buildSessionFactory过时怎么解决

    Hibernate中buildSessionFactory过时如何解决 当我们在使用Hibernate的时候,发现下面的方法已经过时了,经过查询相关资料,了解了如何使用新的方法。 //此方法已经过时 Configurationcfg=newConfiguration(); SessionFactorysf=cfg.configure().buildSessionFactory(); S...

    417
    热度
  • (%%%%%)struts+hibernate+oracle9i在删除程序中删除不了记录,请教是那的错(@@@@@@)

    (%%%%%)struts+hibernate+oracle9i在删除程序中删除不了记录,请问是那的错(@@@@@@)以下这样写对吗?我的StudentDAOImp.java是这样写的----------------------------------publicbooleandeleteStudentByID(Stringid){//TODOAuto-generatedmethodstubtry...

    9
    热度
  • 为嘛static块中try catch必须抛呢解决思路

    为嘛static块中trycatch必须抛呢publicclassTestHibernate{ privatestaticfinalSessionFactorysessionFactory; static{ try{ sessionFactory=newConfiguration().configure().buildSessionFactory(); }catch(Hibern...

    347
    热度
  • hibernate实例有关问题

    hibernate实例问题SLF4J:Failedtoloadclass"org.slf4j.impl.StaticLoggerBinder".SLF4J:Defaultingtono-operation(NOP)loggerimplementationSLF4J:Seehttp://www.slf4j.org/codes.html#StaticLoggerBinderforfurtherdeta...

    34
    热度
  • 关于hibernate list 的list-index无值写入有关问题

    关于hibernatelist的list-index无值写入问题我项目里用hibernate的list建立一对多的关系,建好之后可以将数据写入数据库,但list的索引这项没有数据写入,从而无法读出记录,读记录时报错:org.hibernate.HibernateException:nullindexcolumnforcollection:tnmg.flbm.model.Bmgz.gzmdsator...

    5492
    热度
  • 刚接触Hibernate 运行报错 帮忙看下解决办法

    刚接触Hibernate运行报错帮忙看下错误信息Exceptioninthread"main"java.lang.ExceptionInInitializerError atcsh.Basic.addUser(Basic.java:32) atcsh.Basic.main(Basic.java:23)Causedby:HibernateException'>org.hibern...

    244
    热度
  • 怎么使用HibernateTemplate实现分页并且有条件查询

    如何使用HibernateTemplate实现分页并且有条件查询这是我的代码,目的是想通过Topic查询topic下的Reply这样虽然实现了分页,可是无法按Topic条件查询了,不知道有没有别的方法既可以实现分页,又能够添加条件约束publicList<Reply>query(Topictopic,finalintbegin,finalintmax){ finalStringsql...

    161
    热度
  • 用jUnit测试正确可是 用main方法测试就为空指针解决方法

    用jUnit测试正确可是用main方法测试就为空指针JavacodepublicclassTest{publicstaticvoidmain(String[]args){ClazzDaocd=newClazzDaoImpl();StringhqlQuery="fromClazz";StringhqlCount="selectcount(*)fromClazz"...

    181
    热度
  • Spring注解形式的事务配置,事务不起作用

    Spring注解方式的事务配置,事务不起作用我使用了注解方式进行事务配置,但是当初错的时候,并没有rollback,这是怎么回事?具体代码如下:配置文件:<beanid="transactionManager"class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <propertyname...

    466
    热度
  • eclipse+strust+hibernate一个奇怪的有关问题!

    eclipse+strust+hibernate一个奇怪的问题!在线等!eclipse+strust+hibernate,做一个小demo主要的功能是讲表单中的数据持久化的数据库中,在单独调用hibernate的情况下是可以写入数据库的,然后,写一个test代码如下packagecom.hibmapping;importorg.hibernate.*;importorg.hibernate.cfg...

    72
    热度
  • ssh2配置有关问题

    ssh2配置问题log4j:WARNPleaseinitializethelog4jsystemproperly.2011-12-1320:09:06org.apache.catalina.core.StandardContextlistenerStart严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.s...

    53
    热度
  • HQL语句 有关问题 各位大哥帮帮忙Not supported for DML operations

    HQL语句问题各位大哥帮帮忙NotsupportedforDMLoperations//dao方法:publicSpareupdateSpare(Integeramount,Integerid){ Stringsql="UpdateSparesetspare_amout=spare_amout+"+amount+"wheredevice_id="+id...

    663
    热度
  • 来看看啊

    高手进来看看啊代码如下publicclassSpringBaseBeanActionextendsActionSupport{ StringbeanName=""; publicSpringBaseBeanAction(){ } publicSpringBaseBeanAction(StringbeanName){ this.beanName=beanName; } ...

    28
    热度
  • 问一下Spring分页的有关问题

    问一下Spring分页的问题谁能给个例子呢,最好有源码?谢谢,在网上找不到一个全的急用,不够分再加color='#e78608'>------解决方案--------------------Spring只是个轻量级的框架,随便上网上找个分页的代码应用在上面都可以,其实你是不是找不到代码,而是不知道怎么用,所以建议你还是好好的学习下Spring吧..color='#e78608'>------解决方...

    18
    热度
  • SessionFactory 怎么共享一个实例.

    SessionFactory如何共享一个实例...书上说一个应用可以的话,尽量共享一个SessionFactory实例我知道用static的方法来共享,但是怎么确保SessionFactory实例在第一次被调用前一定会执行一次呢?举个例子,下面是网上看到的方法:Javacodeimportorg.hibernate.*;importorg.hibernate.cfg.*;publicclassCo...

    8817
    热度
  • 求解决啊 郁闷死了 一下午都没弄好 急

    求解决啊郁闷死了一下午都没弄好在线等急!!!!Javacode15:44:02,718ERRORContextLoader:215-Contextinitializationfailedorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'sessionFactory'definedinf...

    5551
    热度
  • HibernateTemplate施行普通sql语句

    HibernateTemplate执行普通sql语句@OverridepublicList<ViewRecord>getViewRecordByUserAndRandom6(intuserId){ finalintuserIdf=userId; List<ViewRecord>viewRecordList=this.getHibernateTemplate().execut...

    42
    热度
  • hibernate实施sql语句

    hibernate执行sql语句hibernate的管理下,执行sql语句?????//执行查询?????Sessionsession=hibernateTemplate.getSessionFactory().openSession();?????Listresult=session.createQuery("fromNews").list();?????System.out.println(r...

    7
    热度
  • Hibernate顶用纯SQL查询,并通过hibernate分页返回List<对象>

    Hibernate中用纯SQL查询,并通过hibernate分页返回List<对象>@SuppressWarnings("unchecked") publicList<Article>getPageQueryList(finalintpageNo,finalintpageSize){ returngetHibernateTemplate().executeFind(new...

    243
    热度