[InterMine Dev] Error load XML data: Error during unmarshalling

Pengcheng Yang yangpc at biols.ac.cn
Fri Jul 31 06:43:50 BST 2015


Dear Justin,

I am sorry to hear the information and hope you all InterMiner 
developers healthy.

Thank you for your detailed explanation. I am checking all these items 
now and will notice you if any progress be made.

Best,

Pengcheng Yang


On 2015/7/29 19:28, Justin Clark-Casey wrote:
> Hi Pengcheng.  Again, please forgive any inaccuracies in the 
> following. Hopefully others can correct me if I'm wrong (some folk are 
> out sick temporarily).
>
> The *_keys.properties file governs the fields that InterMine uses to 
> integrate the objects loaded by that source.  By specifying
>
> Gene.key_primaryidentifier=primaryIdentifier
>
> you're saying that for any Gene item loaded, InterMine should look in 
> its existing Genes for any with the same primary identifier. If an 
> existing object is found then the two objects need to be integrated 
> into a single database item.
>
> Where there is a clash between non-blank fields being integrated (in 
> your case two genes referring to different datasets) then you have to 
> specify the the data source that should take priority. This is done in 
> the <mine>/dbmodel/resources/genomic_priorities.properties file [1].
>
> However, in your case I don't think this is the immediate problem 
> (though it might be an issue after that).  I would guess there is 
> actually some issue with the item XML that you are generating, as it 
> looks like the code is finding a collection (Set) where it expects 
> just a reference.
>
> Perhaps you could try loading the problematic source on its own? I 
> also think it might be possible to improve the error message to say 
> what field is causing the problem.  If you're comfortable with 
> patching InterMine source code you might want to try adding the field 
> info to the exception message generated at FullParser.java:217, e.g.
>
> throw new IllegalArgumentException("Looking for a reference, but found 
> a " + refClass.getName() + " for field " + refName);
>
> An XML line number would be even more helpful but I don't think that's 
> available at that point.
>
> Regards,
>
> Justin Clark-Casey
>
> [1] 
> http://intermine.readthedocs.org/en/stable/database/database-building/priority-config/
>
> On 28/07/15 01:01, Pengcheng Yang wrote:
>> Hi,
>>
>> I guess this problem was caused by the more than one XML data loading
>> with the same keys. In the two xml files, I have both used "add_item"
>> function to add gene item with primaryidentifier, but with different
>> reference id in the two data sets. When loading these XML files, there
>> will be two entries in the Gene table with the same primaryidentifier,
>> which is the key for Gene table. Will this be a problem?
>>
>> So, the question is when loading XML data, how InterMine dealing with
>> the items which has stored in the database with the same 
>> primaryidentifier?
>>
>> Any suggestions will be very helpful and be appreciated.
>>
>> Best,
>> Pengcheng Yang
>>
>> On 2015/7/24 16:53, Pengcheng Yang wrote:
>>> Hi InterMiners,
>>>
>>> I want to load the generated xml file, but failed with the following
>>> error message [1], I have also checked the email archive and found
>>> this thread,
>>> http://gmod.827538.n3.nabble.com/Error-integrating-XML-files-td1973714.html, 
>>>
>>> which is similar to my error message. But after I setting the keys in
>>> the sources/type/resources/*_keys.properties file. the error message
>>> remain.  Part of the XML file looks like this [2]
>>>
>>> Many thanks!
>>>
>>> Best,
>>> Pengcheng Yang
>>>
>>>
>>>
>>> [1] error message:
>>>
>>> BUILD FAILED
>>> /home/pengchy/Soft/05.SystemBiology/intermine/imbuild/integrate.xml:54: 
>>> The
>>> following error occurred while executing this line:
>>> /home/pengchy/Soft/05.SystemBiology/intermine/imbuild/source.xml:201:
>>> Exception while reading from:
>>> /home/pengchy/Project/LocustMine/locust-expression-xml/Merged_rpkm.xls.xml 
>>>
>>>
>>>         at
>>> org.intermine.dataloader.XmlDataLoaderTask.execute(XmlDataLoaderTask.java:170) 
>>>
>>>
>>>         at
>>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
>>>         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>>>         at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
>>>
>>>
>>>         at java.lang.reflect.Method.invoke(Method.java:497)
>>>         at
>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
>>>
>>>
>>>         at org.apache.tools.ant.Task.perform(Task.java:348)
>>>         at org.apache.tools.ant.Target.execute(Target.java:435)
>>>         at org.apache.tools.ant.Target.performTasks(Target.java:456)
>>>         at
>>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
>>>         at
>>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) 
>>>
>>>
>>>         at 
>>> org.apache.tools.ant.Project.executeTargets(Project.java:1260)
>>>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
>>>         at 
>>> org.intermine.task.Integrate.performAction(Integrate.java:223)
>>>         at 
>>> org.intermine.task.Integrate.performAction(Integrate.java:135)
>>>         at org.intermine.task.Integrate.execute(Integrate.java:127)
>>>         at
>>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
>>>         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>>>         at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
>>>
>>>
>>>         at java.lang.reflect.Method.invoke(Method.java:497)
>>>         at
>>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
>>>
>>>
>>>         at org.apache.tools.ant.Task.perform(Task.java:348)
>>>         at org.apache.tools.ant.Target.execute(Target.java:435)
>>>         at org.apache.tools.ant.Target.performTasks(Target.java:456)
>>>         at
>>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
>>>         at 
>>> org.apache.tools.ant.Project.executeTarget(Project.java:1376)
>>>         at
>>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 
>>>
>>>
>>>         at 
>>> org.apache.tools.ant.Project.executeTargets(Project.java:1260)
>>>         at org.apache.tools.ant.Main.runBuild(Main.java:853)
>>>         at org.apache.tools.ant.Main.startAnt(Main.java:235)
>>>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
>>>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
>>> Caused by: org.intermine.InterMineException: Error during unmarshalling
>>>         at org.intermine.util.XmlBinding.unmarshal(XmlBinding.java:64)
>>>         at
>>> org.intermine.dataloader.XmlDataLoader.processXml(XmlDataLoader.java:68) 
>>>
>>>         at
>>> org.intermine.dataloader.XmlDataLoaderTask.execute(XmlDataLoaderTask.java:160) 
>>>
>>>
>>>         ... 31 more
>>> Caused by: java.lang.IllegalArgumentException: Looking for a
>>> reference, but found a java.util.Set
>>>         at
>>> org.intermine.xml.full.FullParser.populateObject(FullParser.java:217)
>>>         at
>>> org.intermine.xml.full.FullParser.realiseObjects(FullParser.java:136)
>>>         at
>>> org.intermine.xml.full.FullParser.realiseObjects(FullParser.java:79)
>>>         at org.intermine.util.XmlBinding.unmarshal(XmlBinding.java:62)
>>>         ... 33 more
>>>
>>> Total time: 41 seconds
>>>
>>>
>>>
>>> [2] part of the XML file
>>>
>>>    <item id="0_2" class="Samples" implements="">
>>>       <attribute name="primaryIdentifier" value="b-C" />
>>>       <attribute name="DevStag" value="4" />
>>>       <reference name="species" ref_id="0_1" />
>>>       <attribute name="Tissue" value="Brain" />
>>>       <attribute name="phase" value="S" />
>>>       <attribute name="year" value="2011" />
>>>    </item>
>>>
>>>    <item id="0_144" class="Expression" implements="">
>>>       <reference name="gene" ref_id="0_131" />
>>>       <attribute name="Expr" value="1.42226640578148" />
>>>       <reference name="sample" ref_id="0_93" />
>>>    </item>
>>>
>>>
>>> _______________________________________________
>>> dev mailing list
>>> dev at intermine.org
>>> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>>>
>>
>>
>>
>> _______________________________________________
>> dev mailing list
>> dev at intermine.org
>> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>





More information about the dev mailing list