Skip to content

Cannot create transaction from JSON #5

@tzclucian

Description

@tzclucian

First of all I have to mention this is my first day playing with this.

I've started by running the tests, I get the following error:

java.lang.NullPointerException
	at com.authenteq.BigchaindbTransaction.buildTransactionJson(BigchaindbTransaction.java:124)
	at com.authenteq.BigchaindbTransaction.<init>(BigchaindbTransaction.java:59)
	at com.authenteq.BigchaindbTransactionTest.transactionGenerationTest(BigchaindbTransactionTest.java:141)

Same happens when I try to create a transaction:

        byte[] publicKey = Base58.decode("where-do-i-get-this-public-key-from?");
        EdDSAParameterSpec keySpecs = EdDSANamedCurveTable.getByName("Ed25519");
        EdDSAPublicKeySpec spec = new EdDSAPublicKeySpec(publicKey, keySpecs);
        EdDSAPublicKey edDSAPublicKey = new EdDSAPublicKey(spec);

        JSONObject data = new JSONObject(aDummyHashMap);
        JSONObject metaData = new JSONObject(anotherDummyHashMap);

        BigchaindbTransaction tx = new BigchaindbTransaction(data, metadata, edDSAPublicKey);

        bigchaindbConnection.send(tx, new TransactionCallbackImpl());

I get the same error:

Exception in thread "main" java.lang.NullPointerException
	at com.authenteq.BigchaindbTransaction.buildTransactionJson(BigchaindbTransaction.java:124)
	at com.authenteq.BigchaindbTransaction.<init>(BigchaindbTransaction.java:59)

Any ideas on what's happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions