[Swift-devel] User script gets null pointer exception

Michael Wilde wilde at mcs.anl.gov
Thu Mar 19 10:43:55 CDT 2009


Ooops, sorry.  Thanks for both explanations :)

On 3/19/09 10:12 AM, Ben Clifford wrote:
> Note that this is a different error to the original message which 
> Yue posted (and which I just answered) on swift-user.
> 
> The log that you show below is 9 days old and is not a log for the error 
> that Yue reported.
> 
> On Thu, 19 Mar 2009, Michael Wilde wrote:
> 
>> Yue, I should have clarified: this is a Swift bug.
>>
>> Its perhaps caused by some error in your program, but Swift should never get a
>> null pointer exception.
>>
>> Ben, Mihael - The log is in:
>>
>> /home/yuechen/PTMapZhao/PTMap/PTMap-20090310-1746-zszi94b6.log
>>
>> The error seems to be related to some boundary condition on the array "texts"
>> which maps Yue's 375 fasta files, fast01 .. fasta375
>>
>> This message is in the log:
>>
>> 2009-03-10 17:46:36,188-0500 INFO  AbstractDataNode Found data
>> org.griphyn.vdl.mapping.RootDataNode identifier
>> tag:benc at ci.uchicago.edu,2008:swift:dataset:20090310-1746-f12dnzdd:720000000382
>> \
>> type Inputfile with no value at dataset=parameter (closed).$
>> 2009-03-10 17:46:36,188-0500 INFO  New NEW
>> id=tag:benc at ci.uchicago.edu,2008:swift:dataset:20090310-1746-f12dnzdd:720000000382
>> 2009-03-10 17:46:36,190-0500 DEBUG VDL2ExecutionContext Getting value for
>> array texts.$[]/375 which is not permitted.
>> Getting value for array texts.$[]/375 which is not permitted.
>>         vdl:getfieldvalue @ PTMap.kml, line: 124
>>         sys:parallelfor @ PTMap.kml, line: 124
>>         sys:sequential @ PTMap.kml, line: 123
>>         doall @ PTMap.kml, line: 170
>>         sys:sequential @ PTMap.kml, line: 169
>>         vdl:mainp @ PTMap.kml, line: 168
>>         mainp @ vdl.k, line: 165
>>         vdl:mains @ PTMap.kml, line: 166
>>         vdl:mains @ PTMap.kml, line: 166
>>         rlog:restartlog @ PTMap.kml, line: 164
>>         kernel:project @ PTMap.kml, line: 2
>>         PTMap-20090310-1746-zszi94b6
>> Caused by: java.lang.RuntimeException: Getting value for array texts.$[]/375
>> which is not permitted.
>>         at
>> org.griphyn.vdl.karajan.lib.GetFieldValue.function(GetFieldValue.java:53)
>>         at org.griphyn.vdl.karajan.lib.VDLFunction.post(VDLFunction.java:67)
>>         at
>> org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments.childCompleted(AbstractSequentialWithArguments.java:192)
>>         at
>> org.globus.cog.karajan.workflow.nodes.Sequential.notificationEvent(Sequential.java:33)
>>         at
>> org.globus.cog.karajan.workflow.nodes.FlowNode.event(FlowNode.java:335)
>>         at
>> org.globus.cog.karajan.workflow.events.EventBus.send(EventBus.java:125)
>>
>>
>>
>> -------- Original Message --------
>> Subject: Re: [Swift-user] swift execution problem
>> Date: Thu, 19 Mar 2009 08:27:02 -0500
>> From: Michael Wilde <wilde at mcs.anl.gov>
>> To: Yue, Chen - BMD <yuechen at bsd.uchicago.edu>
>> CC: swift-user at ci.uchicago.edu
>> References:
>> <AD1FA15416EEBC49A0FE4F8B0C8AD7C5158C28 at ADM-EXCHVS04.bsdad.uchicago.edu>
>>
>> Yue, what version of Swift are you using?
>>
>> Please send the first few lines of your output file, where it says
>> something like:
>>
>> Swift svn swift-r2701 cog-r2332
>>
>> RunID: 20090319-0820-19zttiq9
>>
>> (in fact please send the whole output file, stdout/err)
>>
>> Ive tried to run your code in a near-identical test and I cant reproduce
>> the failure. Ive tried with both swift0.8 and the latest svn rev, and
>> both seem to work.
>>
>> Also please can you post the pathname of the directory in which you are
>> testing (I assume you are running this on a CI machine?) so that I can
>> look at your logfile? And make it publicly accessible?
>>
>> Thanks,
>>
>> - Mike
>>
>>
>> On 3/18/09 6:32 PM, Yue, Chen - BMD wrote:
>>> Hi,
>>>  I'm new to Swift programming. I was able to run a swift script before, but
>>> I couldn't run it now. I'm wondering if someone can help me figure out why.
>>> The swift script, sites.xml, tc.data, and all the error messages are copied
>>> in this email. Thank you!
>>>  Regards,
>>>  Chen, Yue
>>>  *********************
>>> Swift script
>>> *********************
>>> type Fasta {}
>>> type PTMapOut {}
>>> type Solution {}
>>> type Inputfile {}
>>> app (PTMapOut ofile) PTMap (Solution sfile, Fasta fastafile, Inputfile
>>> input, Inputfile parameter)
>>> {
>>>    PTMap  @filename(sfile) @filename(fastafile) @filename(input)
>>> @filename(parameter) stdout=@filename(ofile
>>> <mailto:stdout=@filename(ofile>);
>>> }
>>> Fasta texts[] <filesys_mapper;prefix="fasta">;
>>>
>>> doall(Fasta texts[])
>>> {
>>>   Solution sfile <"BSASolution.mzXML">;
>>>   Inputfile input <"inputs.txt">;
>>>   Inputfile parameter <"parameters.txt">;
>>>   foreach p in texts {
>>>     PTMapOut r <regexp_mapper;
>>>              source=@p <mailto:source=@p>,
>>>              match="fasta(.*)",
>>>              transform="\\1.out <file://\\1.out>"
>>>     >;
>>>    r = PTMap(sfile, p, input, parameter);
>>>   }
>>> }
>>> // Main
>>> doall(texts);
>>> **************
>>> sites.xml
>>> **************
>>> <pool handle="localhost">
>>>   <gridftp  url="local://localhost" />
>>>   <execution provider="local" />
>>>   <workdirectory >/var/tmp</workdirectory>
>>>   <profile namespace="karajan" key="jobThrottle">0</profile>
>>> </pool>
>>> **************
>>> tc.data
>>> **************
>>> localhost       echo            /bin/echo       INSTALLED
>>> INTEL32::LINUX  null
>>> localhost       cat             /bin/cat        INSTALLED
>>> INTEL32::LINUX  null
>>> localhost       ls              /bin/ls         INSTALLED
>>> INTEL32::LINUX  null
>>> localhost       grep            /bin/grep       INSTALLED
>>> INTEL32::LINUX  null
>>> localhost       sort            /bin/sort       INSTALLED
>>> INTEL32::LINUX  null
>>> localhost       paste           /bin/paste      INSTALLED
>>> INTEL32::LINUX  null
>>> localhost       PTMap   /home/yuechen/PTMap/PTMap       INSTALLED
>>> INTEL32::LINUX  null
>>> **************
>>> Error messages
>>> **************
>>> [yuechen at communicado PTMap]$ swift PTMap.swift
>>> Execution failed:
>>>         java.lang.NullPointerException
>>>         at
>>> org.globus.cog.abstraction.impl.common.task.ServiceImpl.toString(ServiceImpl.java:156)
>>>         at java.lang.String.valueOf(String.java:2577)
>>>         at java.lang.StringBuffer.append(StringBuffer.java:220)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.grid.GridNode.function(GridNode.java:31)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.functions.AbstractFunction.post(AbstractFunction.java:45)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments.childCompleted(AbstractSequentialWithArguments.java:192)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.notificationEvent(Sequential.java:33)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.event(FlowNode.java:335)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.send(EventBus.java:125)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.sendHooked(EventBus.java:99)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.fireNotificationEvent(FlowNode.java:173)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.complete(FlowNode.java:299)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.ExecuteFile.notificationEvent(ExecuteFile.java:163)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.event(FlowNode.java:335)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.send(EventBus.java:125)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.sendHooked(EventBus.java:99)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.fireNotificationEvent(FlowNode.java:173)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.complete(FlowNode.java:299)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowContainer.post(FlowContainer.java:58)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.startNext(Sequential.java:51)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.childCompleted(Sequential.java:45)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.notificationEvent(Sequential.java:33)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.event(FlowNode.java:335)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.send(EventBus.java:125)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.sendHooked(EventBus.java:99)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.fireNotificationEvent(FlowNode.java:173)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.complete(FlowNode.java:299)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowContainer.post(FlowContainer.java:58)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments.childCompleted(AbstractSequentialWithArguments.java:192)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.user.UserDefinedElement.childCompleted(UserDefinedElement.java:283)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.user.SequentialImplicitExecutionUDE.childCompleted(SequentialImplicitExecutionUDE.java:85)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.notificationEvent(Sequential.java:33)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.event(FlowNode.java:335)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.send(EventBus.java:125)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.sendHooked(EventBus.java:99)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.fireNotificationEvent(FlowNode.java:173)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.complete(FlowNode.java:299)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.If.childCompleted(If.java:30)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.notificationEvent(Sequential.java:33)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.event(FlowNode.java:335)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.send(EventBus.java:125)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.sendHooked(EventBus.java:99)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.fireNotificationEvent(FlowNode.java:173)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.complete(FlowNode.java:299)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowContainer.post(FlowContainer.java:58)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.functions.AbstractFunction.post(AbstractFunction.java:46)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments.childCompleted(AbstractSequentialWithArguments.java:192)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.notificationEvent(Sequential.java:33)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.event(FlowNode.java:335)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.send(EventBus.java:125)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.sendHooked(EventBus.java:99)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.fireNotificationEvent(FlowNode.java:173)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.complete(FlowNode.java:299)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowContainer.post(FlowContainer.java:58)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.functions.AbstractFunction.post(AbstractFunction.java:46)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.startNext(Sequential.java:51)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.Sequential.executeChildren(Sequential.java:27)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.functions.AbstractFunction.executeChildren(AbstractFunction.java:40)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowContainer.execute(FlowContainer.java:63)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.restart(FlowNode.java:240)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.start(FlowNode.java:281)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.controlEvent(FlowNode.java:393)
>>>         at
>>> org.globus.cog.karajan.workflow.nodes.FlowNode.event(FlowNode.java:332)
>>>         at
>>> org.globus.cog.karajan.workflow.FlowElementWrapper.event(FlowElementWrapper.java:227)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.send(EventBus.java:125)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventBus.sendHooked(EventBus.java:99)
>>>         at
>>> org.globus.cog.karajan.workflow.events.EventWorker.run(EventWorker.java:69)
>>>    
>>>
>>> This email is intended only for the use of the individual or entity to which
>>> it is addressed and may contain information that is privileged and
>>> confidential. If the reader of this email message is not the intended
>>> recipient, you are hereby notified that any dissemination, distribution, or
>>> copying of this communication is prohibited. If you have received this email
>>> in error, please notify the sender and destroy/delete all copies of the
>>> transmittal. Thank you.
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Swift-user mailing list
>>> Swift-user at ci.uchicago.edu
>>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
>> _______________________________________________
>> Swift-user mailing list
>> Swift-user at ci.uchicago.edu
>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
>> _______________________________________________
>> Swift-devel mailing list
>> Swift-devel at ci.uchicago.edu
>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>>
>>



More information about the Swift-devel mailing list