PathwayCommons / cpath2

Biological pathway data integration and access platform (Pathway Commons)
http://www.pathwaycommons.org/pc2/
MIT License
6 stars 5 forks source link

Inconsistent behavior: a 'get' pathway query may fail or return the result. #221

Closed IgorRodchenkov closed 8 years ago

IgorRodchenkov commented 8 years ago

For e.g. PID's "Insulin-mediated glucose transport" and "Signaling events mediated by HDAC Class III", queries that fail are:

http://www.pathwaycommons.org/pc2/get?uri=http://purl.org/pc2/7/Pathway_77c3c09f184ff60709d0b46b143ee493' http://www.pathwaycommons.org/pc2/get?uri=http://purl.org/pc2/7/Pathway_cd8843f123ed619ed1c4e8a5ad7e9c3e

Note: the "same ID" object reported in the detailed error message can be not the same every time one executes the query. Or, there is sometimes no error at all, and the BioPAX result is returned! Looks like sort of multi-thread concurrency issue...

(Reported by Dexter, NDEx, via pc-info mailing list; but they also used format=BINARY_SIF parameter and got 460 error)

Stack trace: ... Internal Server Error; Internal Server Error - org.biopax.paxtools.util.IllegalBioPAXArgumentException: I already have an object with the same ID: http://purl.org/pc2/7/RelationshipXref_go_GO%3A0002821. Try removing it first; [org.biopax.paxtools.impl.ModelImpl.add(ModelImpl.java:154), org.biopax.paxtools.impl.ModelImpl.addNew(ModelImpl.java:119), org.biopax.paxtools.controller.Cloner.clone(Cloner.java:49), cpath.service.CPathServiceImpl.fetch(CPathServiceImpl.java:220), cpath.webservice.BiopaxModelController.elementById(BiopaxModelController.java:153), sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:606), org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215), org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132), ...

IgorRodchenkov commented 8 years ago

Ah, this bug was mentioned in issue #219 . This is seems due to the Cloner (not thread safe due to internal mutable member set of biopax objects) instance was shared by several graph and fetch query methods in the CPathServiceImpl, which in the Tomcat/web environment cause that error...

This must have been already fixed in the latest cpath2 sources (PC2v8 should be ok).