[Anthill-pro] Bug: Running a job on multiple agents in 3.5.3
Anderson, Eric
eric.anderson at wachoviasec.com
Thu Jul 24 13:19:48 CDT 2008
Hello,
I am running AH 3.5.3 Build 14464, having recently upgraded from 3.4.11.
I have encountered a bug where the same exact job with the same agent
filter script will succeed if the job is to execute on one agent, but
will fail if the job is to execute on multiple agents. This issue was
not present in 3.4.11, so it must have been introduced in between those
two versions.
This bug will cause the following error message:
2008-07-23 18:24:47,157 ERROR Workflow-1
com.urbancode.anthill3.services.jobs.Jo
bGraph - Workflow failed processing job 'reproduce_bug_job' due to
unexpected er
ror: null
2008-07-23 18:24:47,158 ERROR Workflow-1
com.urbancode.anthill3.services.excepti
on.ExceptionService - NullPointerException
2008-07-23 18:24:47,158 DEBUG Workflow-1
com.urbancode.anthill3.services.excepti
on.ExceptionService - java.lang.NullPointerException
java.lang.NullPointerException
at
com.urbancode.anthill3.services.jobs.JobGraph.runJob(JobGraph.java:54
9)
at
com.urbancode.anthill3.services.jobs.JobGraph.runJobs(JobGraph.java:1
20)
at
com.urbancode.anthill3.services.workflow.WorkflowServiceDefault$Workf
lowRunner.run(WorkflowServiceDefault.java:184)
at
com.urbancode.commons.util.ThreadPool$WorkerThread.run(ThreadPool.jav
a:208)
I have created a simple project that can reproduce this bug (attached).
I think that the condition in JobGraph, line 547 is incorrect. The
matchingJobTrace will be null since there won't be any job trace yet,
but this condition is met because the agent is defined, but only when
the number of jobs is greater than one (number of agents). Hope I have
explained that adequately, but it's a little complex to cover in
e-mail...
/* 513*/ if(numberOfJobs > 1)
{
/* 514*/ Iterator endpointItr = endpointList.iterator();
/* 515*/ ServiceEndpoint endpoint =
(ServiceEndpoint)endpointItr.
next();
/* 516*/ endpointItr.remove();
/* 517*/ agent =
AgentFactory.getInstance().restoreByEndpoint(end
point);
}
...
/* 547*/ if(matchingJobTrace != null || agent != null)
{
/* 548*/ if(profile != null)
/* 549*/ jobRequest = new
BuildLifeJobRequest(matchingJobTrac
e.getName(), this, profile, agent, new
SimpleAgentJobDelegate(jobConfig), jobCon fig, workflowCase,
(BuildLifeJobTrace)matchingJobTrace, iteration);
/* 561*/ else
/* 561*/ jobRequest = new
OperationsJobRequest(matchingJobTra
ce.getName(), this, agent, new OperationsJobDelegate(jobConfig),
jobConfig, work flowCase, (OperationsJobTrace)matchingJobTrace,
iteration);
} else
Thanks,
Eric P. Anderson
Wachovia Securities - Core Services Team
Senior Developer
314-955-0060
ATTENTION: Please be aware that the confidentiality of Internet e-mail
cannot be guaranteed. Instructions having financial consequences such
as trade orders, funds transfer, etc., should not be included in your
e-mail communications to us as we cannot act on such instructions
received by e-mail.
If you are a current Wachovia Securities client and wish to unsubscribe
from marketing e-mails from your Wachovia Securities financial advisor,
reply to one of his/her e-mails and type "Unsubscribe" in the subject
line. This action will not affect delivery of important service
messages regarding your accounts that we may need to send you or
preferences you may have previously set for other e-mail services.
If you are not a client, please go to:
https://www.wachovia.com/email/unsubscribe
For additional information regarding our electronic communication
policies please go to:
http://www.wachoviasec.com/gotoemaildisclosure
Investments in securities and insurance products are:
NOT FDIC-INSURED/NOT BANK-GUARANTEED/MAY LOSE VALUE
Wachovia Securities is the trade name used by two separate, registered
broker-dealers and nonbank affiliates of Wachovia Corporation providing
certain retail securities brokerage services: Wachovia Securities, LLC,
Member NYSE/SIPC, and Wachovia Securities Financial Network, LLC,
Member FINRA/SIPC.
Wachovia Securities, 1 North Jefferson, St. Louis, MO 63103
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reproduce_multiagent_bug.xml
Type: text/xml
Size: 13006 bytes
Desc: reproduce_multiagent_bug.xml
Url : http://lists.urbancode.com/pipermail/anthill-pro/attachments/20080724/6ba0ca06/reproduce_multiagent_bug.xml
More information about the Anthill-pro
mailing list