Hi,
For this, go to NWA->Configuration-> Infrastructure->Application Resource->Java IDoc Adapter ->Properties. There you will see the parameter AutoNumberfromDB. This can have two values, either true or false. You may need to change this in order to avoid the error "
can't get lock to generate next idoc outbound message number".