Re: #couchdb #fabric-chaincode #fabric-sdk-java #fabric-sdk-java #fabric-chaincode #couchdb


Marek Malik
 

I didn’t tested placing the content in the root of the project, as usually the META-INF is placed in the app resource directory (as stated in the initial email).

Remarkably, this actually worked!
I assume that the process of setting up the couch db and any configuration/ doesn’t necessary have anything to do with the actual chain code deployment, it’s just packaged in the root with the code ?

Anyway, Thanks for your suggestion 😊

Best Regards,
Marek

Od: Senthilnathan N <cendhu@...>
Data: piątek, 1 maja 2020 19:32
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Regards,

Senthil

 

 

On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:

https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. 
I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.



I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`

with the filename 
`pocServicesIdx.json` and content:

```
{
  "index": {
    "fields": [
      "projectId",
      "data_type"
    ]
  },
  "ddoc": "pocServicesDoc",
  "name": "pocServicesIdx",
  "type": "json"
}

```



I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid.
The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?

Join fabric@lists.hyperledger.org to automatically receive all group messages.