PathwayCommons / cpath2

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

stepProcess property range errors when /get query is used #204

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A query "get by uri" (e.g., for a BiochemicalPathwayStep):
http://purl.org/pc2/7/BiochemicalPathwayStep_9305bd0b01984d9094e5ec23e14016ea
(which is equivalent to 
http://www.pathwaycommons.org/pc2/get?uri=http://purl.org/pc2/7/BiochemicalPathw
ayStep_9305bd0b01984d9094e5ec23e14016ea)
seems to return proper BioPAX sub-model (no data loss at a glance), however, 
the following ERRORs in the cpath2.log (three errors because in this example, 
there are three BPSs, each having a reaction as stepConversion):

2015-03-09 20:53:09,825 ERROR o.b.p.c.AbstractPropertyEditor - Failed to set 
value: 
http://purl.org/pc2/7/BiochemicalReaction_bfbd81d7b687a3da6a847b9c0e4a5621 to 
bean 
http://purl.org/pc2/7/BiochemicalPathwayStep_9305bd0b01984d9094e5ec23e14016ea; 
bean class: BiochemicalPathwayStepImpl; primary set method: public abstract 
void 
org.biopax.paxtools.model.level3.PathwayStep.addStepProcess(org.biopax.paxtools.
model.level3.Process); value class: BiochemicalReactionImpl. Error: 
org.biopax.paxtools.util.IllegalBioPAXArgumentException: The range restriction 
is violated; property: stepProcess, bean: 
http://purl.org/pc2/7/BiochemicalPathwayStep_9305bd0b01984d9094e5ec23e14016ea-->
 value: 
http://purl.org/pc2/7/BiochemicalReaction_bfbd81d7b687a3da6a847b9c0e4a5621, 
Cause: null
2015-03-09 20:53:09,828 ERROR o.b.p.c.AbstractPropertyEditor - Failed to set 
value: 
http://purl.org/pc2/7/BiochemicalReaction_72904612d98e13d48730b9771dffce6a to 
bean 
http://purl.org/pc2/7/BiochemicalPathwayStep_3a25881e85fbde20e2a27aeca5e4b2e9; 
bean class: BiochemicalPathwayStepImpl; primary set method: public abstract 
void 
org.biopax.paxtools.model.level3.PathwayStep.addStepProcess(org.biopax.paxtools.
model.level3.Process); value class: BiochemicalReactionImpl. Error: 
org.biopax.paxtools.util.IllegalBioPAXArgumentException: The range restriction 
is violated; property: stepProcess, bean: 
http://purl.org/pc2/7/BiochemicalPathwayStep_3a25881e85fbde20e2a27aeca5e4b2e9-->
 value: 
http://purl.org/pc2/7/BiochemicalReaction_72904612d98e13d48730b9771dffce6a, 
Cause: null
2015-03-09 20:53:09,833 ERROR o.b.p.c.AbstractPropertyEditor - Failed to set 
value: 
http://purl.org/pc2/7/BiochemicalReaction_b8404ab34b262ec8d21d1b8c74fc825c to 
bean 
http://purl.org/pc2/7/BiochemicalPathwayStep_899c3350312c3afdca87e7282040321a; 
bean class: BiochemicalPathwayStepImpl; primary set method: public abstract 
void 
org.biopax.paxtools.model.level3.PathwayStep.addStepProcess(org.biopax.paxtools.
model.level3.Process); value class: BiochemicalReactionImpl. Error: 
org.biopax.paxtools.util.IllegalBioPAXArgumentException: The range restriction 
is violated; property: stepProcess, bean: 
http://purl.org/pc2/7/BiochemicalPathwayStep_899c3350312c3afdca87e7282040321a-->
 value: 
http://purl.org/pc2/7/BiochemicalReaction_b8404ab34b262ec8d21d1b8c74fc825c, 
Cause: null

I think, the problem starts in the CPathServiceImpl.fetch method, line 
https://code.google.com/p/pathway-commons/source/browse/cpath-impl/src/main/java
/cpath/service/CPathServiceImpl.java#212; i.e.,  actually happens in the Cloner 
class (where unnecessary setter is called via the stepProcess property 
accessor).

Model m = cloner.clone(paxtoolsModel, elements);
...

Original issue reported on code.google.com by rod...@gmail.com on 10 Mar 2015 at 1:09

GoogleCodeExporter commented 9 years ago
Just fixed it in paxtools-code by using 
AbstractPropertyEditor.checkRestrictions.set(false) in
the Cloner (also in ShallowCopy) classes. 
Will re-deploy the pc.war (PC2v7) later. 
Closing this ticket now...

Original comment by rod...@gmail.com on 11 Mar 2015 at 10:10