Hyperledger Composer Error Object with ID assetID 0138 in collection with ID Asset org acme mynetwork Sensor

0 votes

my model is this:

namespace org.acme.mynetwork
asset Sensor identified by assetID {
    o String assetID
    o String Frequency
    o String longitude
    o String latutide
    o String name
    --> Spectrum range
}
participant Spectrum identified by SpectrumId {
    o String SpectrumId
    o String Spectrumval
}

transaction SpectrumChange {
    --> Sensor sensor 
    --> Spectrum newrange
}

My sample.js file contains:

/**
 * Track the trade of a commodity from one trader to another
 * @param {org.acme.mynetwork.SpectrumChange} Change - the spectrum to be processed
 * @transaction
 */
function Spectrumupdate(spectrumChange) {
    spectrumChange.sensor.range = spectrumChange.newrange;
    return getAssetRegistry('org.acme.mynetwork.Sensor')
        .then(function (assetRegistry) {
            return assetRegistry.update(spectrumChange.sensor);
        });
}

When I test is I am getting this error: Error: Object with ID 'assetID:0138' in collection with ID 'Asset:org.acme.mynetwork.Sensor' does not exist 

How can I solve this?

Nov 14, 2018 in Blockchain by digger
• 26,740 points
997 views

1 answer to this question.

0 votes
Remove 'assetID:' from your test string.

For example,

'org.acme.mynetwork#assetID:0138' becomes 'org.acme.mynetwork#0138'
answered Nov 14, 2018 by Omkar
• 69,220 points

Related Questions In Blockchain

0 votes
1 answer

How to solve EACCES:permission denied error in Hyperledger Composer?

It seems like there is no required ...READ MORE

answered Jul 11, 2018 in Blockchain by digger
• 26,740 points
2,469 views
0 votes
1 answer

How to solve "error trying install composer runtime" in Hyperledger composer?

I think the docker-compose tool is not ...READ MORE

answered Jul 17, 2018 in Blockchain by slayer
• 29,370 points
908 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,468 views
+1 vote
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
1,035 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP