From: SourceForge.net <no...@so...> - 2011-12-25 00:27:22
|
Bugs item #3344355, was opened at 2011-06-29 08:29 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3344355&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ui Group: None >Status: Closed Priority: 9 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: hshyket (hshyket) Summary: NULL pointer exception when deleting tree Initial Comment: When deleting the following tree (either by deleting the tree itself or deleting the parent treeblock): submission_id = 11642 study_id = 11652 treeblock_id = 14731 tree_id = 47096 I get a null pointer exception (it's probably best to test this on treebase-dev). The problem appears to result from some trees lacking a value for phylotree.study_id. It's fairly rare, but very annoying for users, as it forces them to abandon their submissions and start new ones. I have tried replicating the problem on a new submission by re-uploading exactly the same files that were previously uploaded, but I can't replicate it -- all the trees I have uploaded are properly registered with their study_id. This seems to be a rare event, which will make finding the source of the problem difficult. If we fail to find the cause of the problem, one kluge is to relax the requirement that phylotree.study_id be not null for the deletion code to work -- but I don't know that this is possible, and anyway the absence of a proper phylotree.study_id will probably cause problems elsewhere, like in our search interface. So that's not a good solution. Alternatively, how about some code that is triggered each time a submission page for a study is opened, and it then checks that all trees in the submission have study_id values -- if they don't, the problem is corrected. This query finds all cases where this is a problem: select tls.study_id, pt.phylotree_id from phylotree pt join treeblock tb using(treeblock_id) join taxonlabelset tls using (taxonlabelset_id) where pt.study_id IS NULL and tls.study_id IS NOT NULL order by tls.study_id and this query seems to solve the problem (I've run it on treebase-stage and it has fixed the problem there -- subsequently allowing deletion): UPDATE phylotree SET study_id = tls.study_id FROM phylotree pt JOIN treeblock tb USING(treeblock_id) JOIN taxonlabelset tls USING (taxonlabelset_id) WHERE pt.study_id IS NULL AND tls.study_id IS NOT NULL AND phylotree.phylotree_id = pt.phylotree_id Running this update on production will, ultimately, be needed. bp http://treebase-dev.nescent.org/treebase-web/user/deleteATreeBlock.html?treeblockid=14731 Uncaught Exception Encountered java.lang.NullPointerException at org.cipres.treebase.web.controllers.DeleteATreeBlockController.referenceData(DeleteATreeBlockController.java:160) at org.springframework.web.servlet.mvc.SimpleFormController.referenceData(SimpleFormController.java:214) at org.springframework.web.servlet.mvc.AbstractFormController.showForm(AbstractFormController.java:574) at org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:198) at org.cipres.treebase.web.controllers.BaseFormController.showForm(BaseFormController.java:171) at org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:175) at org.springframework.web.servlet.mvc.AbstractFormController.showNewForm(AbstractFormController.java:338) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:278) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Thread.java:636) Cookies: __utmz=[5099126.1305666484.1.1.utmcsr] __utmc=[5099126] __utmb=[5099126.7.10.1309355320] __utma=[5099126.226138284.1305666484.1308419192.1309355320.24] itemToHighlight=[http%3A//treebase-dev.nescent.org/treebase-web/user/treeBlockList.html] JSESSIONID=[802CD543FEEDA1CE0A74F06C94542325] __utmc=[53240375] __utma=[53240375.1924499357.1236724314.1306793973.1309304847.132] __utmz=[53240375.1306793973.131.23.utmccn] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3344355&group_id=248804 |