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,720 points

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,170 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,720 points
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,310 points
0 votes
1 answer
+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,720 points
0 votes
1 answer