java - Occasional exception org.hibernate.QueryException: could not resolve property -
issue: in our web application under high load sometimes, when there 2 simultaneous hibernate queries in different threads (in same millisecond), have 2 exceptions (in both threads): "org.hibernate.queryexception: not resolve property" on different entities , different properties. looks 2 queries have exchanged property mappings reason abstractpropertymapping class can't find required property in mappings of other query's entity , raises queryexception. each entity used in 1 thread.
environment:
- apache tomcat 7
- spring 4.0.6
- hibernate 4.3.6.final
configuration:
<!-- configuration --> ... <bean id="transactionmanager" class="org.springframework.orm.hibernate4.hibernatetransactionmanager"> <property name="sessionfactory" ref="sessionfactory" /> <property name="nestedtransactionallowed" value="true" /> </bean> <bean id="transactiontemplate" class="org.springframework.transaction.support.transactiontemplate"> <property name="transactionmanager" ref="transactionmanager"/> </bean> <bean id="sessionfactory" class="org.springframework.orm.hibernate4.localsessionfactorybean"> <property name="datasource" ref="datasource" /> <property name="packagestoscan"> <list> <value>com.delta.invest.domain</value> </list> </property> <property name="hibernateproperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.postgresqldialect</prop> <prop key="hibernate.connection.charset">utf-8</prop> <!-- debuging purposes --> <prop key="hibernate.show_sql">false</prop> <prop key="hibernate.format_sql">true</prop> <prop key="hibernate.use_sql_comments">true</prop> <!-- @see: http://community.jboss.org/wiki/hibernatecoremigrationguide36 --> <prop key="hibernate.jdbc.use_streams_for_binary">false</prop> <!-- batch inserts --> <prop key="hibernate.jdbc.batch_size">20</prop> <prop key="hibernate.order_inserts">true</prop> <prop key="hibernate.order_updates">true</prop> <prop key="hibernate.jdbc.batch_versioned_data">true</prop> <!-- prop key="hibernate.cache.use_second_level_cache">false</prop--> <!-- second-level cache --> <prop key="hibernate.cache.use_second_level_cache">true</prop> <prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.singletonehcacheregionfactory</prop> <prop key="hibernate.cache.provider_configuration_file_resource_path">ehcache.xml</prop> <!-- autoregister joda types --> <prop key="jadira.usertype.autoregisterusertypes">true</prop> <!-- turn off domain classes validation --> <prop key="javax.persistence.validation.mode">none</prop> <!-- set transaction_read_committed isolation level --> <prop key="hibernate.connection.isolation">2</prop> </props> </property> </bean> ...
exception in first thread:
caused by: org.hibernate.queryexception: not resolve property: accountto of: com.delta.invest.domain.entity.core.a ccountentry @ org.hibernate.persister.entity.abstractpropertymapping.propertyexception(abstractpropertymapping.java:83) @ org.hibernate.persister.entity.abstractpropertymapping.totype(abstractpropertymapping.java:77) @ org.hibernate.persister.entity.abstractentitypersister.totype(abstractentitypersister.java:1978) @ org.hibernate.loader.criteria.entitycriteriainfoprovider.gettype(entitycriteriainfoprovider.java:57) @ org.hibernate.loader.criteria.criteriaquerytranslator.getpathinfo(criteriaquerytranslator.java:245) @ org.hibernate.loader.criteria.criteriaquerytranslator.createcriteriaentitynamemap(criteriaquerytranslator.jav a:229) @ org.hibernate.loader.criteria.criteriaquerytranslator.<init>(criteriaquerytranslator.java:112) @ org.hibernate.loader.criteria.criterialoader.<init>(criterialoader.java:88) @ org.hibernate.internal.sessionimpl.list(sessionimpl.java:1663) @ org.hibernate.internal.criteriaimpl.list(criteriaimpl.java:380) @ org.hibernate.internal.criteriaimpl.uniqueresult(criteriaimpl.java:402) @ com.delta.invest.dao.kernel.selectiondaoimpl.getcount(selectiondaoimpl.java:216) @ com.delta.invest.service.selectionserviceimpl.getrowcountbycriteria(selectionserviceimpl.java:406) @ com.delta.invest.service.selectionserviceimpl.getsize(selectionserviceimpl.java:185) @ sun.reflect.generatedmethodaccessor422.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317) @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java: 190) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterce ptor.java:98) @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspec tsupport.java:262) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:95) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:207) @ com.sun.proxy.$proxy99.getsize(unknown source) @ com.delta.invest.service.pageselectionserviceimpl.getsize(pageselectionserviceimpl.java:60) @ com.delta.invest.paging.pagingcollection.size(pagingcollection.java:64) @ com.delta.invest.ws.document.documentwebserviceimpl.getdocumentshistoryforoperator(documentwebserviceimpl.jav a:344) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317) @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java: 190) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterce ptor.java:98) @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspec tsupport.java:262) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:95) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:207) @ com.sun.proxy.$proxy99.getsize(unknown source) @ com.delta.invest.service.pageselectionserviceimpl.getsize(pageselectionserviceimpl.java:60) @ com.delta.invest.paging.pagingcollection.size(pagingcollection.java:64) @ com.delta.invest.ws.document.documentwebserviceimpl.getdocumentshistoryforoperator(documentwebserviceimpl.jav a:344) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317) @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java: 190) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) @ org.springframework.validation.beanvalidation.methodvalidationinterceptor.invoke(methodvalidationinterceptor. java:122) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ net.bull.javamelody.monitoringspringinterceptor.invoke(monitoringspringinterceptor.java:73) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:207) @ com.sun.proxy.$proxy220.getdocumentshistoryforoperator(unknown source) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.apache.cxf.service.invoker.abstractinvoker.performinvocation(abstractinvoker.java:180) @ org.apache.cxf.service.invoker.abstractinvoker.invoke(abstractinvoker.java:96) ... 91 more
exception in second thread:
org.hibernate.queryexception: not resolve property: accountto of: com.delta.invest.domain.entity.core.accountentry @ org.hibernate.persister.entity.abstractpropertymapping.propertyexception(abstractpropertymapping.java:83) @ org.hibernate.persister.entity.abstractpropertymapping.totype(abstractpropertymapping.java:77) @ org.hibernate.persister.entity.abstractentitypersister.totype(abstractentitypersister.java:1978) @ org.hibernate.loader.criteria.entitycriteriainfoprovider.gettype(entitycriteriainfoprovider.java:57) @ org.hibernate.loader.criteria.criteriaquerytranslator.getpathinfo(criteriaquerytranslator.java:245) @ org.hibernate.loader.criteria.criteriaquerytranslator.createcriteriaentitynamemap(criteriaquerytranslator.jav a:229) @ org.hibernate.loader.criteria.criteriaquerytranslator.<init>(criteriaquerytranslator.java:112) @ org.hibernate.loader.criteria.criterialoader.<init>(criterialoader.java:88) @ org.hibernate.internal.sessionimpl.list(sessionimpl.java:1663) @ org.hibernate.internal.criteriaimpl.list(criteriaimpl.java:380) @ com.delta.invest.dao.kernel.selectiondaoimpl.list(selectiondaoimpl.java:159) @ com.delta.invest.service.selectionserviceimpl.getall(selectionserviceimpl.java:358) @ sun.reflect.generatedmethodaccessor524.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317) @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java: 190) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterce ptor.java:98) @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspec tsupport.java:262) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:95) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:207) @ com.sun.proxy.$proxy99.getall(unknown source) @ com.delta.invest.service.transactionserviceimpl.getlinkedaccountentries(transactionserviceimpl.java:1479) @ com.delta.invest.service.transactionserviceimpl.executetransaction(transactionserviceimpl.java:743) @ sun.reflect.generatedmethodaccessor713.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317) @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java: 190) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) @ org.springframework.security.access.intercept.aopalliance.methodsecurityinterceptor.invoke(methodsecurityinte rceptor.java:64) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterce ptor.java:98) @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspec tsupport.java:262) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:95) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:207) @ com.sun.proxy.$proxy112.executetransaction(unknown source) @ com.delta.invest.processing.operation.createtransactionoperation.committransaction(createtransactionoperation .java:82) @ com.delta.invest.processing.operation.createtransactionoperation.execute(createtransactionoperation.java:50) @ com.delta.invest.processing.documentlifecyclemanagerimpl.executedocumentaryoperations(documentlifecyclemanage rimpl.java:181) @ com.delta.invest.processing.documentlifecyclemanagerimpl.process(documentlifecyclemanagerimpl.java:110) @ com.delta.invest.processing.documentlifecyclemanagerimpl.process(documentlifecyclemanagerimpl.java:188) @ com.delta.invest.service.documentserviceimpl.process(documentserviceimpl.java:229) @ sun.reflect.generatedmethodaccessor729.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317) @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java: 190) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) @ org.springframework.security.access.intercept.aopalliance.methodsecurityinterceptor.invoke(methodsecurityinte rceptor.java:64) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterce ptor.java:98) @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspec tsupport.java:262) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:95) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:207) @ com.sun.proxy.$proxy116.process(unknown source) @ com.delta.invest.service.remote.remotesupportserviceimpl.process(remotesupportserviceimpl.ja va:367) @ sun.reflect.generatedmethodaccessor709.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317) @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java: 190) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) @ org.springframework.remoting.support.remoteinvocationtraceinterceptor.invoke(remoteinvocationtraceinterceptor .java:78) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:207) @ com.sun.proxy.$proxy260.process(unknown source) @ sun.reflect.generatedmethodaccessor709.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ com.caucho.hessian.server.hessianskeleton.invoke(hessianskeleton.java:306) @ com.caucho.hessian.server.hessianskeleton.invoke(hessianskeleton.java:221) @ org.springframework.remoting.caucho.hessianexporter.doinvoke(hessianexporter.java:223) @ org.springframework.remoting.caucho.hessianexporter.invoke(hessianexporter.java:138) @ org.springframework.remoting.caucho.hessianserviceexporter.handlerequest(hessianserviceexporter.java:66) @ org.springframework.web.servlet.mvc.httprequesthandleradapter.handle(httprequesthandleradapter.java:51) @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:938) @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:870) @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:961) @ org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:863) @ javax.servlet.http.httpservlet.service(httpservlet.java:647) @ org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:837) @ javax.servlet.http.httpservlet.service(httpservlet.java:728) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:305) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.springframework.orm.hibernate4.support.opensessioninviewfilter.dofilterinternal(opensessioninviewfilter.j ava:152) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ ch.qos.logback.access.servlet.teefilter.dofilter(teefilter.java:55) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:88) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ net.bull.javamelody.monitoringfilter.dofilter(monitoringfilter.java:202) @ net.bull.javamelody.monitoringfilter.dofilter(monitoringfilter.java:180) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor. java:118) @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityintercepto r.java:84) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:1 13) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:103) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticatio nfilter.java:113) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontexth olderawarerequestfilter.java:154) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:4 5) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.preauth.abstractpreauthenticatedprocessingfilter.dofilter(abs tractpreauthenticatedprocessingfilter.java:94) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:110) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.context.request.async.webasyncmanagerintegrationfilter.dofilterinternal(weba syncmanagerintegrationfilter.java:50) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.session.concurrentsessionfilter.dofilter(concurrentsessionfilter.java:125) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistence filter.java:87) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:192) @ org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:160) @ org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:344) @ org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:261) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:222) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:123) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:99) @ ch.qos.logback.access.tomcat.logbackvalve.invoke(logbackvalve.java:189) @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:953) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:118) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1023) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:589) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:310) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745)
source code:
@repository(value="selectiondao") public class selectiondaoimpl implements selectiondao { ... @autowired private sessionfactory sessionfactory; ... public <entity> list<entity> list( class<entity> entityclass, final detachedcriteria detachedcriteria, final int firstresult, final int maxresults ) { criteria criteria = detachedcriteria.getexecutablecriteria(sessionfactory.getcurrentsession()); if ( firstresult > 0 ) { criteria.setfirstresult( firstresult ); } if ( maxresults > 0 ) { criteria.setmaxresults( maxresults ); } return (list<entity>) criteria.list(); } public long getcount( final detachedcriteria detachedcriteria ) { return (long) detachedcriteria.getexecutablecriteria(sessionfactory.getcurrentsession()).setprojection( projections.rowcount() ).uniqueresult(); } ... }
how can prevent exception? thank in advance.
Comments
Post a Comment