Symptoms
With C++ SDK upgraded to version 7.2, an atempt to build a plug-in with C++ SDK fails. The error description is similar to the following:
Error: ../LISA/project.cc:157JAVA type must has Packer suffix. JAVA Type is Object. attribute type is INT
Waf: Leaving directory `/root/DomainPlugins/SOMEPLUGIN/.build'
Build failed: LISA compiler exit code '1' is non-zero. CMD is '['--info', '--server', '--amt', '--postgre'] /root/DomainPlugins/SOMEPLUGIN/SOMEPLUGIN.lsa'
Possible causes
1) A new JAVA attribute was introduced for LISA types, and the Domain Plug-in SDK for C++ was not reconfigured so that it should not build Java wrappers for public methods.
2) The file LOCKHINT.lsa
is missing
Resolution
In the first case, try this solution first:
Change the current working directory to the plug-in source directory.
Run grep -r 'LISA.new_task_gen' | grep wscript
For every match found, after line
features = 'lsaprogram',
add the following line:install_java_dir = None,
Alternatively, in diff format, the change should look like:
--- a/wscript +++ b/wscript @@ -79,6 +79,7 @@ def build(bld): cnttask = LISA.new_task_gen(bld, features = 'lsaprogram', + install_java_dir= None, source = '@@PROJECT@.lsa', bodies = [ 'bodies.cc' ], internals = [ 'internals.cc', 'plugin.cpp' ],
If the above solution does not work, try this solution:
Generate a new plug-in code sample using the script shipped with the SDK package as described in OA Premium Domain Plug-in SDK.
- Copy the file
PLUGINBASE.type
from the newly generated plug-in folder and replace with it the file with the same name in your original plug-in folder.
In the second case, if the file LOCKHINT.lsa
is missing:
Make sure file /root/EcommercePlugins//BM/lockHints/LOCKHINT.lsa exists with the following content:
Virtual Class LockHint "LockHints" { Attributes { Virtual STR HintResult; } Methods { const OrderStatusChangeLockHint(SalesOrder.OrderID, SalesOrder.OrderStatusID) return LockHint.HintResult; const ETransactionCaptureLockHint(Payment) return LockHint.HintResult; const CreateServiceLockHint(OItem.OIID) return LockHint.HintResult; const OnServiceCreatedLockHint(OItem.OIID, Subscription.ExecStatus, SubscriptionServStatusHist.Comment, SubscriptionServStatusHist.LongComment, Subscription.vGateID) return LockHint.HintResult; const AccountPropagateLockHint(Account.AccountID) return LockHint.HintResult; const CheckCreditHoldAccountLockHint(Account.AccountID) return LockHint.HintResult; const SubscriptionResetUsageLockHint(Subscription) return LockHint.HintResult; } }
- If there is no such file, create it with the above content.
After you perform the above actions, try to build the plug-in again.