fix: resolve Java CouchDB index deployment and add ledger-queries Java implementation#1406
Open
SurbhiAgarwal1 wants to merge 6 commits intohyperledger:mainfrom
Open
fix: resolve Java CouchDB index deployment and add ledger-queries Java implementation#1406SurbhiAgarwal1 wants to merge 6 commits intohyperledger:mainfrom
SurbhiAgarwal1 wants to merge 6 commits intohyperledger:mainfrom
Conversation
…ncode Signed-off-by: SurbhiAgarwal1 <agarwalsurbhi1807@gmail.com>
…code - Update packageCC.sh to correctly copy META-INF to the distribution directory. - Port asset-transfer-ledger-queries to Java to provide a sample with rich query support. - Ensure all Java chaincodes use src/main/resources/META-INF for standard index placement. Signed-off-by: SurbhiAgarwal1 <agarwalsurbhi1807@gmail.com>
- Add TransferAssetByColor using composite keys. - Add range query methods (GetAssetsByRange, GetAssetsByRangeWithPagination). - Ensure composite key management in Create/Update/Delete methods. Signed-off-by: SurbhiAgarwal1 <agarwalsurbhi1807@gmail.com>
…edger-queries Java/TS
…ledger-queries Java/TS support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This Pull Request addresses several critical issues in the
test-networkscripts and completes theasset-transfer-ledger-queriessample by adding the missing Java implementation.Key Improvements
1. Fix for Issue #1148 (CouchDB Index Deployment)
Previously, Java chaincode failed to deploy CouchDB indexes because the
packageCC.shscript did not include theMETA-INFdirectory in the package.packageCC.shto explicitly copyMETA-INFfrom the source resources into the distribution directory before packaging.2. Resolved Package ID Logic Error
The
packageCC.shscript failed to calculate thePACKAGE_IDwhen the--package-only(-cco) flag was enabled.calculatepackageidto look in the correct versioned subdirectory (packagedChaincode/) when the package-only flag is set.3. New Java Smart Contract for Ledger Queries
Added a full, Gradle-based Java implementation for the
asset-transfer-ledger-queriessample.4. Script Robustness
verifyResult) after Java and TypeScript compilation to prevent the creation of broken packages when a build fails.README.mdto officially list the new language support.##How to Test
./network.sh packageCC -ccn ledger -ccp ../asset-transfer-ledger-queries/chaincode-java -ccl java -cco true.packagedChaincode/and thePackage IDis correctly displayed.##Mentorship Highlights
ContractInterfacenaming conventions..gitignoreto keep the branch clean).