java - Initialization of an object via @Query request -
i have statearchivedto
class field collection<statepropertyentity> stateproperties
.
now i'm trying create page of objects statearchivedto
mysql database. can't deal collection.
public interface statearchiverepository extends jparepository<statearchiveentity,long>{ @query(value = "select new com.myproject.endpoints.dto.statearchivedto(statearchive.id, statearchive.type, statearchive.created, statearchive.updated, statearchive.version, statearchive.stateproperties) " + "from statearchiveentity statearchive " ) page<statearchivedto> getstatearchive(pageable pageable); }
response controller:
{ "timestamp": 1478599659554, "status": 500, "error": "internal server error", "exception": "org.springframework.dao.invaliddataaccessresourceusageexception", "message": "could not extract resultset; sql [n/a]; nested exception org.hibernate.exception.sqlgrammarexception: not extract resultset", "path": "/statistics/states-history" }
when initialize fields except collection<statepropertyentity>
works fine:
public interface statearchiverepository extends jparepository<statearchiveentity,long>{ @query(value = "select new com.myproject.endpoints.dto.statearchivedto(statearchive.id, statearchive.type, statearchive.created, statearchive.updated, statearchive.version) " + "from statearchiveentity statearchive " ) page<statearchivedto> getstatearchive(pageable pageable); }
how initialize fields of statearchivedto
in @query
?
statearchivedto
public class statearchivedto { private long id; private statetype type; private date created; private date updated; private long version; private collection<statepropertyentity> stateproperties; public statearchivedto(long id, statetype type, date created, date updated, long version, collection<statepropertyentity> stateproperties) { this.id = id; this.type = type; this.created = created; this.updated = updated; this.version = version; this.stateproperties = stateproperties; } public statearchivedto(long id, statetype type, date created, date updated, long version) { this.id = id; this.type = type; this.created = created; this.updated = updated; this.version = version; } <getters, setters> }
statearchiveentity
@entity public class statearchiveentity { @id private long id; @enumerated(enumtype.string) private statetype type; @onetomany(cascade=cascadetype.all) private collection<statepropertyentity> stateproperties; private date created; private date updated; private long version; protected statearchiveentity() {} public statearchiveentity (stateentity state){ this.id = state.getid(); this.type = state.gettype(); this.stateproperties = state.getstateproperties(); this.created = state.getcreated(); this.updated = state.getupdated(); } <getters, setters> }
statepropertyentity
@entity public class statepropertyentity extends versioningentity { @id @generatedvalue(generator = "increment") @genericgenerator(name = "increment", strategy = "increment") private long id; @enumerated(enumtype.string) private stateproperties propertykey; private string propertyvalue; <getters, setters> }
logs:
com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: have error in sql syntax; check manual corresponds mysql server version right syntax use near 'as col_5_0_ state_archive_entity statearchi0_ inner join state_archive_enti' @ line 1 @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) ~[na:1.8.0_91] @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:62) ~[na:1.8.0_91] @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45) ~[na:1.8.0_91] @ java.lang.reflect.constructor.newinstance(constructor.java:423) ~[na:1.8.0_91] @ com.mysql.jdbc.util.handlenewinstance(util.java:404) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.util.getinstance(util.java:387) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.sqlerror.createsqlexception(sqlerror.java:942) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio.java:3966) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio.java:3902) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.mysqlio.sendcommand(mysqlio.java:2526) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.mysqlio.sqlquerydirect(mysqlio.java:2673) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.connectionimpl.execsql(connectionimpl.java:2549) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.preparedstatement.executeinternal(preparedstatement.java:1861) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ com.mysql.jdbc.preparedstatement.executequery(preparedstatement.java:1962) ~[mysql-connector-java-5.1.39.jar:5.1.39] @ org.hibernate.engine.jdbc.internal.resultsetreturnimpl.extract(resultsetreturnimpl.java:70) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.getresultset(loader.java:2117) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.executequerystatement(loader.java:1900) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.executequerystatement(loader.java:1876) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.doquery(loader.java:919) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.doqueryandinitializenonlazycollections(loader.java:336) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.dolist(loader.java:2617) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.dolist(loader.java:2600) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.listignorequerycache(loader.java:2429) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.loader.list(loader.java:2424) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.loader.hql.queryloader.list(queryloader.java:501) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.hql.internal.ast.querytranslatorimpl.list(querytranslatorimpl.java:371) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.engine.query.spi.hqlqueryplan.performlist(hqlqueryplan.java:216) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.internal.sessionimpl.list(sessionimpl.java:1326) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.internal.queryimpl.list(queryimpl.java:87) ~[hibernate-core-5.0.9.final.jar:5.0.9.final] @ org.hibernate.jpa.internal.queryimpl.list(queryimpl.java:606) ~[hibernate-entitymanager-5.0.9.final.jar:5.0.9.final] @ org.hibernate.jpa.internal.queryimpl.getresultlist(queryimpl.java:483) ~[hibernate-entitymanager-5.0.9.final.jar:5.0.9.final] @ org.springframework.data.jpa.repository.query.jpaqueryexecution$pagedexecution.doexecute(jpaqueryexecution.java:191) ~[spring-data-jpa-1.10.2.release.jar:na] @ org.springframework.data.jpa.repository.query.jpaqueryexecution.execute(jpaqueryexecution.java:78) ~[spring-data-jpa-1.10.2.release.jar:na] @ org.springframework.data.jpa.repository.query.abstractjpaquery.doexecute(abstractjpaquery.java:102) ~[spring-data-jpa-1.10.2.release.jar:na] @ org.springframework.data.jpa.repository.query.abstractjpaquery.execute(abstractjpaquery.java:92) ~[spring-data-jpa-1.10.2.release.jar:na] @ org.springframework.data.repository.core.support.repositoryfactorysupport$queryexecutormethodinterceptor.doinvoke(repositoryfactorysupport.java:482) ~[spring-data-commons-1.12.2.release.jar:na] @ org.springframework.data.repository.core.support.repositoryfactorysupport$queryexecutormethodinterceptor.invoke(repositoryfactorysupport.java:460) ~[spring-data-commons-1.12.2.release.jar:na] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.2.release.jar:4.3.2.release] @ org.springframework.data.projection.defaultmethodinvokingmethodinterceptor.invoke(defaultmethodinvokingmethodinterceptor.java:61) ~[spring-data-commons-1.12.2.release.jar:na] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.2.release.jar:4.3.2.release] @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterceptor.java:99) ~[spring-tx-4.3.2.release.jar:4.3.2.release] @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspectsupport.java:280) ~[spring-tx-4.3.2.release.jar:4.3.2.release] @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:96) ~[spring-tx-4.3.2.release.jar:4.3.2.release] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.2.release.jar:4.3.2.release] @ org.springframework.dao.support.persistenceexceptiontranslationinterceptor.invoke(persistenceexceptiontranslationinterceptor.java:136) ~[spring-tx-4.3.2.release.jar:4.3.2.release] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.2.release.jar:4.3.2.release] @ org.springframework.data.jpa.repository.support.crudmethodmetadatapostprocessor$crudmethodmetadatapopulatingmethodinterceptor.invoke(crudmethodmetadatapostprocessor.java:133) ~[spring-data-jpa-1.10.2.release.jar:na] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.2.release.jar:4.3.2.release] @ org.springframework.aop.interceptor.exposeinvocationinterceptor.invoke(exposeinvocationinterceptor.java:92) ~[spring-aop-4.3.2.release.jar:4.3.2.release] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.2.release.jar:4.3.2.release] @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:213) ~[spring-aop-4.3.2.release.jar:4.3.2.release] @ com.sun.proxy.$proxy136.getstatearchive(unknown source) ~[na:na] @ com.instinctools.mailtracker.services.statistics.impl.statisticsdataserviceimpl.getstatearchivestatistics(statisticsdataserviceimpl.java:115) ~[classes/:na] @ com.instinctools.mailtracker.endpoints.rest.statistics.statisticcontroller.getstateshistory(statisticcontroller.java:297) ~[classes/:na] @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) ~[na:1.8.0_91] @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) ~[na:1.8.0_91] @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) ~[na:1.8.0_91] @ java.lang.reflect.method.invoke(method.java:498) ~[na:1.8.0_91] @ org.springframework.web.method.support.invocablehandlermethod.doinvoke(invocablehandlermethod.java:221) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.method.support.invocablehandlermethod.invokeforrequest(invocablehandlermethod.java:136) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.servlet.mvc.method.annotation.servletinvocablehandlermethod.invokeandhandle(servletinvocablehandlermethod.java:114) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.invokehandlermethod(requestmappinghandleradapter.java:827) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.handleinternal(requestmappinghandleradapter.java:738) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.servlet.mvc.method.abstracthandlermethodadapter.handle(abstracthandlermethodadapter.java:85) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:963) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:897) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:970) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:872) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ javax.servlet.http.httpservlet.service(httpservlet.java:648) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:846) ~[spring-webmvc-4.3.2.release.jar:4.3.2.release] @ javax.servlet.http.httpservlet.service(httpservlet.java:729) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:230) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52) ~[tomcat-embed-websocket-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.boot.web.filter.applicationcontextheaderfilter.dofilterinternal(applicationcontextheaderfilter.java:55) ~[spring-boot-1.4.0.release.jar:1.4.0.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.boot.actuate.trace.webrequesttracefilter.dofilterinternal(webrequesttracefilter.java:105) ~[spring-boot-actuator-1.4.0.release.jar:1.4.0.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:317) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:127) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:91) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:115) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:137) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:111) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:169) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:63) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.authentication.www.basicauthenticationfilter.dofilterinternal(basicauthenticationfilter.java:158) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:121) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.header.headerwriterfilter.dofilterinternal(headerwriterfilter.java:66) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:105) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.context.request.async.webasyncmanagerintegrationfilter.dofilterinternal(webasyncmanagerintegrationfilter.java:56) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:214) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:177) ~[spring-security-web-4.1.1.release.jar:4.1.1.release] @ org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:346) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:262) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.web.filter.requestcontextfilter.dofilterinternal(requestcontextfilter.java:99) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.web.filter.httpputformcontentfilter.dofilterinternal(httpputformcontentfilter.java:87) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.web.filter.hiddenhttpmethodfilter.dofilterinternal(hiddenhttpmethodfilter.java:77) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:197) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.springframework.boot.actuate.autoconfigure.metricsfilter.dofilterinternal(metricsfilter.java:107) ~[spring-boot-actuator-1.4.0.release.jar:1.4.0.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) ~[spring-web-4.3.2.release.jar:4.3.2.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:192) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:165) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:198) ~[tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:108) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:522) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:140) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:79) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:87) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:349) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.coyote.http11.http11processor.service(http11processor.java:1110) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.coyote.abstractprocessorlight.process(abstractprocessorlight.java:66) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.coyote.abstractprotocol$connectionhandler.process(abstractprotocol.java:785) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun(nioendpoint.java:1425) [tomcat-embed-core-8.5.4.jar:8.5.4] @ org.apache.tomcat.util.net.socketprocessorbase.run(socketprocessorbase.java:49) [tomcat-embed-core-8.5.4.jar:8.5.4] @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) [na:1.8.0_91] @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) [na:1.8.0_91] @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61) [tomcat-embed-core-8.5.4.jar:8.5.4] @ java.lang.thread.run(thread.java:745) [na:1.8.0_91]
you need add default constructors dto
class because trying create new instance dto in repository query
.
the below applicable entity class
(statearchiveentity
), have.
the default constructor exists sake of jpa. won’t use directly, designated protected.
you can @ here
Comments
Post a Comment