How can I create a raw transaction in hex format with Bitcoinj?
Don't build the entire parent transaction, just build the outpoint, which is all that is relevant for encoding a transaction to hex. Specifically use this constructor

EDIT: More specifically, cannot recreate the parent transaction unless you have ALL relevant information for that transaction (inputs, locktime, outputs etc..). To use the constructor I linked below you will need to also provide the output index of the output you are spending on your parent transaction.