Someone had exactly your problem in an old thread here:
Error: Transaction creation failed!I'm going to summarize how they managed to solve it. You can export the private keys with those inputs into Bitcoin Core and build a raw transaction using the Console and the createrawtransaction command. You also need to get the output points of all of your inputs you're trying to send. These can be copied from the Coins tab in Electrum (click
View >
Show Coins if you don't see this tab.) An output point is formatted like
TRANSACTION_ID:VOUT. So you build the raw transaction like this:
createrawtransaction [{\"txid\":\"INPUT #1 TRANSACTION_ID\",\"vout\":INPUT #1 VOUT}, {\"txid\":\"INPUT #2 TRANSACTION_ID\",\"vout\":INPUT #2 VOUT}, PUT_MORE_INPUTS_HERE ], {\"DESTINATION_ADDRESS\":RECEIVE_AMOUNT_BTC}
You replace TRANSACTION_ID and VOUT with the corresponding values of each output point. DESTINATION_ADDRESS is the address you want to send it to, and RECEIVE_AMOUNT_BTC is the amount of
BTC you're trying to send. The transaction fee will be RECEIVE_AMOUNT_BTC - the sum of your inputs.
Also an important thing to note is that
you'll have to spend only a few inputs at a time so the transaction doesn't become too large. That means you have to create several spending transactions.
It's going to return another transaction ID that's unsigned. Then you have to sign the it using signrawtransaction:
signrawtransaction UNSIGNED_TRANSACTION_ID
According to DannyHamilton the output of that is going to look like this:
You should receive a response of:
{
"hex" :
"signed_raw_transaction_in_byte_form",
"complete" : true
}
And the signed transaction ID is going to be in the signed_raw_transaction_in_byte_form field.
Finally you have to broadcast the signed transaction using sendrawtransaction. The transaction will also be synchronized to your electrum wallet.
sendrawtransaction SIGNED_TRANSACTION
If the fee is large enough, a miner should include your transaction in a block fairly quickly. Otherwise you can reach out to this guy at Poolin for help:
https://bitcointalk.org/index.php?topic=5181601.0 , he's mined stuck transactions before.