Opened 15 years ago

Closed 15 years ago

#765 closed defect (fixed)

Deleting an Affymetrix raw bioassay from trashcan generates NullPointerException

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: critical Milestone: BASE 2.4.2
Component: core Version:
Keywords: Cc:

Description

Dominic Oyeniran wrote:

I am experiencing the problem with deletion of items. See the exception below. Description: When you start deleting from the trash can either with delete permanently or empty trash, the process dialog comes up but never finishes and throws the exception below

The db control is also not closed once an excpetion occurs

I have noticed that it only occurs with raw bio assay.

Any clue on how to solve this. It stops me from re-using a file for example since I could delete an already linked file, ad same with other items.

I think this problem only happens for Affymetrix data. I am not able to reproduce it for any other raw data types. I think the source of the problem is that when deleting a raw bioassay, BASE also tries to delete the raw data associated with it. Since Affymetrix data isn't stored in the database this will of course fail. After that I really don't know what is happening. The NullPointerException? is coming from the cleanup code that is cleaning up after the first error, thus the DbControl? fails to be closed and the "Found unclosed DbControl?" is warning is logged. I will have to investigate more before I know why the error in the cleanup code happens.

In any case, there is an easy workaround. Edit the raw bioassay and select 'none' as the CEL file. Save the changes and then retry deleting it from the trashcan again.

java.lang.NullPointerException
        at net.sf.basedb.core.RawDataBatcher.onBeforeClose(RawDataBatcher.java:3
07)
        at net.sf.basedb.core.AbstractBatcher.close(AbstractBatcher.java:120)
        at net.sf.basedb.core.DbControl.rollback(DbControl.java:269)
        at net.sf.basedb.core.DbControl.close(DbControl.java:237)
        at net.sf.basedb.core.Trashcan.delete(Trashcan.java:233)
        at org.apache.jsp.views.trashcan.index_jsp._jspService(index_jsp.java:26
9)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
15)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
        at net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(Ch
aracterEncodingFilter.java:72)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:685)
        at java.lang.Thread.run(Thread.java:595)
13:40:36,156  WARN DbControl:1074 - Found unclosed DbControl during finalize; is
LoggedIn = true; clientId = 4; userId = 3
java.lang.Throwable: Please check the code to make sure that DbControl.close() i
s always called. Stacktrace of code that created this DbControl:
        at net.sf.basedb.core.DbControl.<init>(DbControl.java:142)
        at net.sf.basedb.core.SessionControl.newDbControl(SessionControl.java:26
1)
        at net.sf.basedb.core.Trashcan.delete(Trashcan.java:184)
        at org.apache.jsp.views.trashcan.index_jsp._jspService(index_jsp.java:26
9)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
15)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
        at net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(Ch
aracterEncodingFilter.java:72)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:685)
        at java.lang.Thread.run(Thread.java:595) 

Change History (3)

comment:1 Changed 15 years ago by Nicklas Nordborg

Component: webcore
Milestone: BASE 2.4.2
Priority: majorcritical

comment:2 Changed 15 years ago by Nicklas Nordborg

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

See ticket #766 for more info about what is going on here.

comment:3 Changed 15 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [3748]) Fixes #765: Deleting an Affymetrix raw bioassay from trashcan generates NullPointerException?

Note: See TracTickets for help on using tickets.