spring-projects / spring-data-rest

Simplifies building hypermedia-driven REST web services on top of Spring Data repositories
https://spring.io/projects/spring-data-rest
Apache License 2.0
920 stars 563 forks source link

Cannot create self link for class [Ljava.lang.Object;! No persistent entity found! [DATAREST-425] #805

Open spring-projects-issues opened 9 years ago

spring-projects-issues commented 9 years ago

chetan kokil opened DATAREST-425 and commented

I am getting above error when trying to get retrieving information. I am using the following URL: http://localhost:9000/agency/search/findAgencyByZip?zip=02019. And the table structure is attached in the issue, database used is oracle. Query is as below in the AgencyRepository.

interface AgencyRepository … {

  @Query("SELECT DISTINCT a, l.contactInfo.address.city, l.contactInfo.address.street, l.contactInfo.phone from Agency a, Location l INNER JOIN  l.zips z where a.ceID = l.agencyCode and z.zipCode = :zip")
  public List<Agency> findAgencyByZip(@Param("zip") String zip);
}
java.lang.IllegalArgumentException: Cannot create self link for class [Ljava.lang.Object;! No persistent entity found!
    at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.getSelfLinkFor(PersistentEntityResourceAssembler.java:81) ~[spring-data-rest-webmvc-2.1.4.RELEASE.jar:na]
    at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.toResource(PersistentEntityResourceAssembler.java:64) ~[spring-data-rest-webmvc-2.1.4.RELEASE.jar:na]
    at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.entitiesToResources(AbstractRepositoryRestController.java:223) ~[spring-data-rest-webmvc-2.1.4.RELEASE.jar:na]
    at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.resultToResources(AbstractRepositoryRestController.java:203) ~[spring-data-rest-webmvc-2.1.4.RELEASE.jar:na]
    at org.springframework.data.rest.webmvc.RepositorySearchController.executeQueryMethod(RepositorySearchController.java:242) ~[spring-data-rest-webmvc-2.1.4.RELEASE.jar:na]
    at org.springframework.data.rest.webmvc.RepositorySearchController.executeSearch(RepositorySearchController.java:146) ~[spring-data-rest-webmvc-2.1.4.RELEASE.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_71]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_71]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_71]
    at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_71]
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) ~[spring-web-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) ~[spring-web-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) ~[spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) ~[spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) ~[spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938) ~[spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) ~[spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) [spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) [spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) [javax.servlet-api-3.0.1.jar:3.0.1]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) [spring-webmvc-4.0.8.RELEASE.jar:4.0.8.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) [javax.servlet-api-3.0.1.jar:3.0.1]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-7.0.57.jar:7.0.57]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]

Affects: 2.1.1 (Dijkstra SR1)

Attachments:

spring-projects-issues commented 9 years ago

Oliver Drotbohm commented

Do you still see this issue when using a more recent version (2.2.1.RELEASE is the latest release version, 2.3.0.M1 the latest development release)? Do the latest SNAPSHOTS work (i.e. 2.3.0.BUILD-SNAPSHOT)

spring-projects-issues commented 9 years ago

chetan kokil commented

HI Oliver,

I have not tried with the latest one since I was using the 1.1.9 Release earlier and when got stuck with the issue moved on to 2.2.1 release. Will try and get back to you one this

spring-projects-issues commented 9 years ago

chetan kokil commented

Hi Oliver, Still finding the issue, but this time the error message is different. Please find the below stack trace for the same.

2014-12-22 09:50:19,003 DEBUG [http-nio-9000-exec-1] o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver [AbstractHandlerExceptionResolver.java:134] Resolving exception from handler [public org.springframework.http.ResponseEntity<java.lang.Object> org.springframework.data.rest.webmvc.RepositorySearchController.executeSearch(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.web.context.request.WebRequest,java.lang.String,org.springframework.data.rest.webmvc.support.DefaultedPageable,org.springframework.data.domain.Sort,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler)]: java.lang.IllegalArgumentException: PersistentEntity must not be null!
2014-12-22 09:50:18,737 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractAutowireCapableBeanFactory.java:449] Creating instance of bean 'org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator'
2014-12-22 09:50:18,737 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2014-12-22 09:50:18,739 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2014-12-22 09:50:18,739 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2014-12-22 09:50:18,746 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractAutowireCapableBeanFactory.java:477] Finished creating instance of bean 'org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator'
2014-12-22 09:50:18,746 DEBUG [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [DispatcherServlet.java:665] Unable to locate RequestToViewNameTranslator with name 'viewNameTranslator': using default [org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator@16ebdfb]
2014-12-22 09:50:18,747 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'beanNameViewResolver'
2014-12-22 09:50:18,748 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractAutowireCapableBeanFactory.java:449] Creating instance of bean 'org.springframework.web.servlet.support.SessionFlashMapManager'
2014-12-22 09:50:18,748 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2014-12-22 09:50:18,751 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2014-12-22 09:50:18,751 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2014-12-22 09:50:18,752 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractAutowireCapableBeanFactory.java:477] Finished creating instance of bean 'org.springframework.web.servlet.support.SessionFlashMapManager'
2014-12-22 09:50:18,752 DEBUG [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [DispatcherServlet.java:727] Unable to locate FlashMapManager with name 'flashMapManager': using default [org.springframework.web.servlet.support.SessionFlashMapManager@2a3f5b]
2014-12-22 09:50:18,752 DEBUG [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [FrameworkServlet.java:558] Published WebApplicationContext of servlet 'dispatcherServlet' as ServletContext attribute with name [org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcherServlet]
2014-12-22 09:50:18,752 INFO [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [FrameworkServlet.java:498] FrameworkServlet 'dispatcherServlet': initialization completed in 24 ms
2014-12-22 09:50:18,752 DEBUG [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [HttpServletBean.java:139] Servlet 'dispatcherServlet' configured successfully
2014-12-22 09:50:18,763 DEBUG [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [DispatcherServlet.java:838] DispatcherServlet with name 'dispatcherServlet' processing GET request for [/agency/search/findAgencyByZip]
2014-12-22 09:50:18,765 DEBUG [http-nio-9000-exec-1] o.s.w.s.m.m.a.RequestMappingHandlerMapping [AbstractHandlerMethodMapping.java:246] Looking up handler method for path /agency/search/findAgencyByZip
2014-12-22 09:50:18,766 DEBUG [http-nio-9000-exec-1] o.s.w.a.FixedContentNegotiationStrategy [FixedContentNegotiationStrategy.java:49] Requested media types is application/json (based on default MediaType)
2014-12-22 09:50:18,766 DEBUG [http-nio-9000-exec-1] o.s.w.a.FixedContentNegotiationStrategy [FixedContentNegotiationStrategy.java:49] Requested media types is application/json (based on default MediaType)
2014-12-22 09:50:18,767 DEBUG [http-nio-9000-exec-1] o.s.w.a.FixedContentNegotiationStrategy [FixedContentNegotiationStrategy.java:49] Requested media types is application/json (based on default MediaType)
2014-12-22 09:50:18,767 DEBUG [http-nio-9000-exec-1] o.s.w.s.m.m.a.RequestMappingHandlerMapping [AbstractHandlerMethodMapping.java:254] Did not find handler method for [/agency/search/findAgencyByZip]
2014-12-22 09:50:18,767 DEBUG [http-nio-9000-exec-1] o.s.d.r.w.BaseUriAwareHandlerMapping [AbstractHandlerMethodMapping.java:246] Looking up handler method for path /agency/search/findAgencyByZip
2014-12-22 09:50:18,769 DEBUG [http-nio-9000-exec-1] o.s.d.r.w.BaseUriAwareHandlerMapping [AbstractHandlerMethodMapping.java:254] Did not find handler method for [/agency/search/findAgencyByZip]
2014-12-22 09:50:18,769 DEBUG [http-nio-9000-exec-1] o.s.d.r.w.RepositoryRestHandlerMapping [AbstractHandlerMethodMapping.java:246] Looking up handler method for path /agency/search/findAgencyByZip
2014-12-22 09:50:18,774 DEBUG [http-nio-9000-exec-1] o.s.d.r.w.RepositoryRestHandlerMapping [AbstractHandlerMethodMapping.java:251] Returning handler method [public org.springframework.http.ResponseEntity<java.lang.Object> org.springframework.data.rest.webmvc.RepositorySearchController.executeSearch(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.web.context.request.WebRequest,java.lang.String,org.springframework.data.rest.webmvc.support.DefaultedPageable,org.springframework.data.domain.Sort,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler)]
2014-12-22 09:50:18,774 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'repositorySearchController'
2014-12-22 09:50:18,774 DEBUG [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [DispatcherServlet.java:925] Last-Modified value for [/agency/search/findAgencyByZip] is: -1
2014-12-22 09:50:18,775 DEBUG [http-nio-9000-exec-1] o.s.o.j.s.OpenEntityManagerInViewInterceptor [OpenEntityManagerInViewInterceptor.java:87] Opening JPA EntityManager in OpenEntityManagerInViewInterceptor
2014-12-22 09:50:18,791 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'agencyRepository'
2014-12-22 09:50:18,791 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2014-12-22 09:50:18,791 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2014-12-22 09:50:18,815 DEBUG [http-nio-9000-exec-1] o.h.SQL [SqlStatementLogger.java:109] select distinct agency0_.agency_cd as col_0_0_, locations1_.city as col_1_0_, locations1_.street as col_2_0_, locations1_.phone as col_3_0_, agency0_.agency_cd as agency_c1_0_, agency0_.addedBy as addedBy2_0_, agency0_.addedDate as addedDat3_0_, agency0_.city as city4_0_, agency0_.state as state5_0_, agency0_.street as street6_0_, agency0_.zip as zip7_0_, agency0_.email as email8_0_, agency0_.lastActivityDate as lastActi9_0_, agency0_.name as name10_0_, agency0_.platform as platfor11_0_, agency0_.status as status12_0_, agency0_.updatedBy as updated13_0_ from AGENCY agency0_, LOCATION locations1_, LOCATION_ZIP zips2_, ZIP zip3_ where agency0_.agency_cd=locations1_.agency_cd and locations1_.loc_code=zips2_.LOCATION_LOC_CODE and zips2_.ZIPS_ZIPCODE=zip3_.zipCode and zip3_.zipCode=?
2014-12-22 09:50:18,816 DEBUG [http-nio-9000-exec-1] o.h.e.j.i.LogicalConnectionImpl [LogicalConnectionImpl.java:226] Obtaining JDBC connection
2014-12-22 09:50:18,816 DEBUG [http-nio-9000-exec-1] o.s.j.d.DriverManagerDataSource [DriverManagerDataSource.java:142] Creating new JDBC DriverManager Connection to [jdbc:oracle:thin:@aixdev5:1521:MMAD25]
2014-12-22 09:50:18,965 DEBUG [http-nio-9000-exec-1] o.h.e.j.i.LogicalConnectionImpl [LogicalConnectionImpl.java:232] Obtained JDBC connection
2014-12-22 09:50:18,982 DEBUG [http-nio-9000-exec-1] o.h.l.Loader [Loader.java:952] Result set row: 0
2014-12-22 09:50:18,984 DEBUG [http-nio-9000-exec-1] o.h.l.Loader [Loader.java:1486] Result row: EntityKey[com.mapfre.model.Agency#D030]
2014-12-22 09:50:18,991 DEBUG [http-nio-9000-exec-1] o.h.l.Loader [Loader.java:952] Result set row: 1
2014-12-22 09:50:18,992 DEBUG [http-nio-9000-exec-1] o.h.l.Loader [Loader.java:1486] Result row: EntityKey[com.mapfre.model.Agency#C285]
2014-12-22 09:50:18,992 DEBUG [http-nio-9000-exec-1] o.h.l.Loader [Loader.java:952] Result set row: 2
2014-12-22 09:50:18,992 DEBUG [http-nio-9000-exec-1] o.h.l.Loader [Loader.java:1486] Result row: EntityKey[com.mapfre.model.Agency#B270]
2014-12-22 09:50:18,993 DEBUG [http-nio-9000-exec-1] o.h.e.i.TwoPhaseLoad [TwoPhaseLoad.java:160] Resolving associations for [com.mapfre.model.Agency#D030]
2014-12-22 09:50:19,000 DEBUG [http-nio-9000-exec-1] o.h.e.i.TwoPhaseLoad [TwoPhaseLoad.java:286] Done materializing entity [com.mapfre.model.Agency#D030]
2014-12-22 09:50:19,000 DEBUG [http-nio-9000-exec-1] o.h.e.i.TwoPhaseLoad [TwoPhaseLoad.java:160] Resolving associations for [com.mapfre.model.Agency#C285]
2014-12-22 09:50:19,000 DEBUG [http-nio-9000-exec-1] o.h.e.i.TwoPhaseLoad [TwoPhaseLoad.java:286] Done materializing entity [com.mapfre.model.Agency#C285]
2014-12-22 09:50:19,001 DEBUG [http-nio-9000-exec-1] o.h.e.i.TwoPhaseLoad [TwoPhaseLoad.java:160] Resolving associations for [com.mapfre.model.Agency#B270]
2014-12-22 09:50:19,001 DEBUG [http-nio-9000-exec-1] o.h.e.i.TwoPhaseLoad [TwoPhaseLoad.java:286] Done materializing entity [com.mapfre.model.Agency#B270]
2014-12-22 09:50:19,003 DEBUG [http-nio-9000-exec-1] o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver [AbstractHandlerExceptionResolver.java:134] Resolving exception from handler [public org.springframework.http.ResponseEntity<java.lang.Object> org.springframework.data.rest.webmvc.RepositorySearchController.executeSearch(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.web.context.request.WebRequest,java.lang.String,org.springframework.data.rest.webmvc.support.DefaultedPageable,org.springframework.data.domain.Sort,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler)]: java.lang.IllegalArgumentException: PersistentEntity must not be null!
2014-12-22 09:50:19,004 DEBUG [http-nio-9000-exec-1] o.s.b.f.s.DefaultListableBeanFactory [AbstractBeanFactory.java:247] Returning cached instance of singleton bean 'repositoryRestExceptionHandler'
2014-12-22 09:50:19,004 DEBUG [http-nio-9000-exec-1] o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver [ExceptionHandlerExceptionResolver.java:337] Invoking @ExceptionHandler method: org.springframework.http.ResponseEntity<org.springframework.data.rest.webmvc.support.ExceptionMessage> org.springframework.data.rest.webmvc.RepositoryRestExceptionHandler.handleMiscFailures(java.lang.Exception)
2014-12-22 09:50:19,007 DEBUG [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [DispatcherServlet.java:1012] Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2014-12-22 09:50:19,007 DEBUG [http-nio-9000-exec-1] o.s.o.j.s.OpenEntityManagerInViewInterceptor [OpenEntityManagerInViewInterceptor.java:112] Closing JPA EntityManager in OpenEntityManagerInViewInterceptor
2014-12-22 09:50:19,007 DEBUG [http-nio-9000-exec-1] o.s.o.j.EntityManagerFactoryUtils [EntityManagerFactoryUtils.java:432] Closing JPA EntityManager
2014-12-22 09:50:19,007 DEBUG [http-nio-9000-exec-1] o.h.e.j.i.LogicalConnectionImpl [LogicalConnectionImpl.java:246] Releasing JDBC connection
2014-12-22 09:50:19,012 DEBUG [http-nio-9000-exec-1] o.h.e.j.i.LogicalConnectionImpl [LogicalConnectionImpl.java:264] Released JDBC connection
2014-12-22 09:50:19,013 DEBUG [http-nio-9000-exec-1] o.s.w.s.DispatcherServlet [FrameworkServlet.java:991] Successfully completed request
spring-projects-issues commented 9 years ago

Oliver Drotbohm commented

Your query does not seem to return a List<Agency> but an Object-array. What's the reason you explicitly list the additional attributes besides a in the select-clause?