Open spring-projects-issues opened 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)
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
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
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?
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 theAgencyRepository
.Affects: 2.1.1 (Dijkstra SR1)
Attachments: