Project

General

Profile

bug #7896

NPE, NullPointerException in RelationshipTermBase

Added by Andreas Kohlbecker 6 months ago. Updated 5 days ago.

Status:
Closed
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
11/08/2018
Due date:
% Done:

100%

Severity:
normal
Found in Version:

Description

[flora-malesiana] 2018-11-08 12:24:42,410 INFO [qtp1207140081-129] [eu.etaxonomy.cdm.remote.controller.TaxonPortalController] - doGetSynonymy() GET: /flora-malesiana/portal/taxon/09d427ff-a520-413e-b86b-e39abac29f52/synonymy
2018-11-08 12:24:42,491 WARN [qtp1207140081-129] [org.eclipse.jetty.servlet.ServletHandler] - 
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is net.sf.json.JSONException: java.lang.NullPointerException
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:981)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:176)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:497)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
Caused by: net.sf.json.JSONException: java.lang.NullPointerException
        at net.sf.json.JSONObject._fromBean(JSONObject.java:692)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:172)
        at net.sf.json.AbstractJSON._processValue(AbstractJSON.java:274)
        at net.sf.json.JSONObject._processValue(JSONObject.java:2655)
        at net.sf.json.JSONObject.processValue(JSONObject.java:2721)
        at net.sf.json.JSONObject.element(JSONObject.java:1786)
        at eu.etaxonomy.cdm.remote.json.processor.bean.AbstractBeanProcessor.processBean(AbstractBeanProcessor.java:149)
        at net.sf.json.JSONObject._fromBean(JSONObject.java:676)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:172)
        at net.sf.json.AbstractJSON._processValue(AbstractJSON.java:274)
        at net.sf.json.JSONArray._processValue(JSONArray.java:2513)
        at net.sf.json.JSONArray.processValue(JSONArray.java:2538)
        at net.sf.json.JSONArray.addValue(JSONArray.java:2525)
        at net.sf.json.JSONArray._fromCollection(JSONArray.java:1056)
        at net.sf.json.JSONArray.fromObject(JSONArray.java:123)
        at net.sf.json.AbstractJSON._processValue(AbstractJSON.java:240)
        at net.sf.json.JSONObject._processValue(JSONObject.java:2655)
        at net.sf.json.JSONObject.processValue(JSONObject.java:2721)
        at net.sf.json.JSONObject.setInternal(JSONObject.java:2736)
        at net.sf.json.JSONObject.setValue(JSONObject.java:1424)
        at net.sf.json.JSONObject._fromMap(JSONObject.java:1168)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:163)
        at eu.etaxonomy.cdm.remote.view.JsonView.render(JsonView.java:128)
        at eu.etaxonomy.cdm.remote.view.JsonView.render(JsonView.java:188)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1243)
        at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
        ... 61 more
Caused by: java.lang.NullPointerException
        at eu.etaxonomy.cdm.model.common.RelationshipTermBase.getInverseRepresentation(RelationshipTermBase.java:154)
        at eu.etaxonomy.cdm.model.common.RelationshipTermBase.getPreferredInverseRepresentation(RelationshipTermBase.java:181)
        at eu.etaxonomy.cdm.remote.l10n.TermRepresentation_L10n.localize(TermRepresentation_L10n.java:54)
        at eu.etaxonomy.cdm.remote.l10n.TermRepresentation_L10n.<init>(TermRepresentation_L10n.java:43)
        at eu.etaxonomy.cdm.remote.json.processor.bean.TermBaseBeanProcessor.processBeanSecondStep(TermBaseBeanProcessor.java:81)
        at eu.etaxonomy.cdm.remote.json.processor.bean.TermBaseBeanProcessor.processBeanSecondStep(TermBaseBeanProcessor.java:31)
        at eu.etaxonomy.cdm.remote.json.processor.bean.AbstractBeanProcessor.processBean(AbstractBeanProcessor.java:167)
        at net.sf.json.JSONObject._fromBean(JSONObject.java:676)
        ... 89 more

Associated revisions

Revision dbb48641 (diff)
Added by Andreas Müller 3 months ago

fix #7896 fix NPE in RelationshipTermBase.getInverseRepresentation

Revision 5751b127 (diff)
Added by Andreas Müller about 1 month ago

fix #7896 fix NPE in RelationshipTermBase.getInverseRepresentation

History

#1 Updated by Andreas Kohlbecker 4 months ago

  • Target version changed from Release 5.5 to Release 5.6

#2 Updated by Andreas Kohlbecker 3 months ago

  • Priority changed from New to Highest
  • Target version changed from Release 5.6 to Reviewed Next Major Release

#3 Updated by Andreas Müller 3 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#4 Updated by Andreas Müller 3 months ago

  • Target version changed from Reviewed Next Major Release to Release 5.6

There is not much information what data to use for reproducing error. However, I think dbb48641 should fix the problem. Though I do not understand why there can be an inverseRepresentation being null. Is this maybe related to the known hibernate bug which creates unexpected null values during merge (#8127). We should check this before closing if possible.

#5 Updated by Andreas Kohlbecker about 1 month ago

  • Target version changed from Release 5.6 to Release 5.7

#6 Updated by Andreas Müller 18 days ago

This belongs to 5.6 if fixed, otherwise should be set to Feedback. Please review.

#7 Updated by Andreas Kohlbecker 5 days ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • Target version changed from Release 5.7 to Release 5.6
  • % Done changed from 50 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)