I'm creating a sample app that has a BPEL component [1].
[DEBUG] - GeronimoLog.debug(66) | >>> Payload: <?xml version="1.0"
encoding="UTF-8"?>
<Authorize xmlns="http://www.example.org/CreditCardPayment/" xmlns:ccp="
http://www.example.org/CreditCardPayment/">
<ccp:CreditCard>
<ccp:CreditCardType>Visa</ccp:CreditCardType>
<ccp:CreditCardNumber>12345678</ccp:CreditCardNumber>
<ccp:ExpMonth>2</ccp:ExpMonth>
<ccp:ExpYear>2010</ccp:ExpYear>
<ccp:CardOwner>
<ccp:Name>Fred</ccp:Name>
<ccp:Address>
<ccp:Street>1 The Road</ccp:Street>
<ccp:City>Winchester</ccp:City>
<ccp:State>Hampshire</ccp:State>
<ccp:ZipCode>AB1 2CD</ccp:ZipCode>
<ccp:HomePhone>12345678</ccp:HomePhone>
</ccp:Address>
</ccp:CardOwner>
</ccp:CreditCard>
<ccp:Amount>100.0</ccp:Amount>
</Authorize>
[ERROR] - GeronimoLog.error(108) | Error sending message
(mex={PartnerRoleMex#hqejbhcnphr3rx2u9wt9hq [PID {
http://www.example.org/PaymentProcess}PaymentProcess-1] calling
null.authorize(...)}): Unable to register synchronizer.
org.apache.ode.bpel.iapi.ContextException: Unable to register synchronizer.
at
org.apache.ode.scheduler.simple.SimpleScheduler.registerSynchronizer(SimpleScheduler.java:206)
at
org.apache.ode.scheduler.simple.SimpleScheduler.addTodoOnCommit(SimpleScheduler.java:364)
at
org.apache.ode.scheduler.simple.SimpleScheduler.schedulePersistedJob(SimpleScheduler.java:232)
at
org.apache.ode.bpel.engine.PartnerRoleMessageExchangeImpl.continueAsync(PartnerRoleMessageExchangeImpl.java:126)
at
org.apache.ode.bpel.engine.PartnerRoleMessageExchangeImpl.replyWithFailure(PartnerRoleMessageExchangeImpl.java:97)
at
org.apache.tuscany.sca.implementation.bpel.ode.ODEExternalService$1$1.call(ODEExternalService.java:132)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at
org.apache.ode.scheduler.simple.SimpleScheduler.registerSynchronizer(SimpleScheduler.java:194)
... 10 more
Anyone seen this before? It comes from [2]
try {
tx.registerSynchronization(new Synchronization() {
public void afterCompletion(int status) {
if (status == Status.STATUS_COMMITTED) {
_todo.enqueue(job);
}
}
public void beforeCompletion() {
}
});
} catch (Exception e) {
String errmsg = "Unable to registrer synchronizer. ";
__log.error(errmsg, e);
throw new ContextException(errmsg, e);
}
So would seem to be associated with the way the transaction context is set
up in ODE. Anyone know how the component configuration could affect this? On
the face of it my sample is very similar to the bpel-helloworld itests
(which run fine) except that the target interfaces have more complicated
types. Other than that I'm not doing anything particularly complicated
although I have to say the number of files you have to set up to get this
working does leave a large element of doubt that they are all correct.
Simon
[1]
http://svn.apache.org/repos/asf/tuscany/sandbox/travelsample/paymentprocess-contribution/
[2]
http://svn.apache.org/repos/asf/ode/trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SimpleScheduler.java