Invoice error

Hi we are using version 2012 pu3

we have a custom application who create invoice sometime we have the following error.

APIBS Explicit compositions are required.(1307 APIBS1.c)