Hi All, while running daml-on-fabric project am facing issue as java/lang/NullPointer as localhost/Blocks url are empt
can anyone help me to run daml-on-fabric, please
Hi @masool can you copy and paste the error messages you’re seeing and let us know the commands you ran in order?
@anthony am using currently ubuntu 18, and i followed https://github.com/digital-asset/daml-on-fabric.git repo Below are the commands and error i faced
-
cd ~/daml-on-fabric/src/test/fixture/
./gen.sh
./restart_fabric.sh -
cd
daml new quickstart quickstart-java -
cd quickstart
daml build -
cd ~/daml-on-fabric/
sbt “run --port 6865 --role provision,time,ledger,explorer …/quickstart/.daml/dist/quickstart-0.0.1.dar”
after this commands i found the below error
[info] welcome to sbt 1.4.7 (Ubuntu Java 11.0.10)
^[[D[info] loading settings for project daml-on-fabric-build from assembly.sbt,plugins.sbt ...
[info] loading project definition from /DAML-HLF/my-app/daml-on-fabric/project
[info] loading settings for project root from build.sbt ...
[info] set current project to DAML-on-Fabric (in build file:/DAML-HLF/my-app/daml-on-fabric/)
[info] running com.daml.DamlOnFabricServer --port 6865 --role provision,time,ledger,explorer ../my-app/.daml/dist/my -app-0.1.0.dar
Mar 08, 2021 2:14:39 PM org.hyperledger.fabric.sdk.helper.Config <init>
WARNING: Failed to load any configuration from: config.properties. Using toolkit defaults
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Admin@org2.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv_sk
Admin@org2.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem
Constructing channel mainchannel
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Created channel mainchannel
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Mar 08, 2021 2:14:43 PM org.hyperledger.fabric.sdk.Channel joinPeer
INFO: Channel{id: 9, name: mainchannel} joining Peer{ id: 2, name: peer0, channelName: null, url: grpcs://localhost:10051}.
Mar 08, 2021 2:14:43 PM org.hyperledger.fabric.sdk.Channel joinPeer
INFO: Peer Peer{ id: 2, name: peer0, channelName: mainchannel, url: grpcs://localhost:10051} joined into channel Channel{id: 9, name: mainchannel}
Peer peer0 grpcs://localhost:10051 joined channel mainchannel
Admin@org2.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv_sk
Admin@org2.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem
Mar 08, 2021 2:14:43 PM org.hyperledger.fabric.sdk.Channel joinPeer
INFO: Channel{id: 9, name: mainchannel} joining Peer{ id: 5, name: peer0, channelName: null, url: grpcs://localhost:10056}.
Mar 08, 2021 2:14:43 PM org.hyperledger.fabric.sdk.Channel joinPeer
INFO: Peer Peer{ id: 5, name: peer0, channelName: mainchannel, url: grpcs://localhost:10056} joined into channel Channel{id: 9, name: mainchannel}
Peer peer0 grpcs://localhost:10056 joined channel mainchannel
Joined peers to channel mainchannel
Mar 08, 2021 2:14:43 PM org.hyperledger.fabric.sdk.Channel initialize
INFO: Channel Channel{id: 9, name: mainchannel} eventThread started shutdown: false thread: null
No META-INF folder detected. Starting chaincode without any custom indexes
Orgs installs the chaincode on its peers.
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Caught an exception running Channel mainchannel
org.hyperledger.fabric.sdk.exception.ProposalException: Status of install proposal did not ret ok for Peer{ id: 2, name: peer0, channelName: mainchannel, url: grpcs://localhost:10051}, FAILURE
at org.hyperledger.fabric.sdk.LifecycleInstallChaincodeProposalResponse.getPackageId(LifecycleInstallChaincodeProposalResponse.java:36)
at com.daml.FabricContext.lifecycleInstallChaincode(FabricContext.java:319)
at com.daml.FabricContext.runChannel(FabricContext.java:244)
at com.daml.FabricContext.initNetworkConfiguration(FabricContext.java:169)
at com.daml.FabricContext.<init>(FabricContext.java:103)
at com.daml.DAMLKVConnector.<init>(DAMLKVConnector.java:74)
at com.daml.DAMLKVConnector.get(DAMLKVConnector.java:30)
at com.daml.DamlOnFabricServer$.delayedEndpoint$com$daml$DamlOnFabricServer$1(DamlOnFabricServer.scala:65)
at com.daml.DamlOnFabricServer$delayedInit$body.apply(DamlOnFabricServer.scala:48)
at scala.Function0.apply$mcV$sp(Function0.scala:39)
at scala.Function0.apply$mcV$sp$(Function0.scala:39)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
at scala.App.$anonfun$main$1$adapted(App.scala:80)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.App.main(App.scala:80)
at scala.App.main$(App.scala:78)
at com.daml.DamlOnFabricServer$.main(DamlOnFabricServer.scala:48)
at com.daml.DamlOnFabricServer.main(DamlOnFabricServer.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at sbt.Run.invokeMain(Run.scala:133)
at sbt.Run.execute$1(Run.scala:82)
at sbt.Run.$anonfun$runWithLoader$5(Run.scala:110)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:17)
at sbt.TrapExit$App.run(TrapExit.scala:258)
at java.base/java.lang.Thread.run(Thread.java:834)
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Admin@org2.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv_sk
Admin@org2.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem
That's all folks!
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
[error] (run-main-0) com.daml.FabricContextException: response {
[error] status: 500
[error] message: "make sure the chaincode daml_on_fabric has been successfully defined on channel mainchannel and try again: chaincode daml_on_fabric not found"
[error] }
REST: Listening on port 8080 (try to query http://127.0.0.1:8080/blocks)
REST: Initializing background thread...
REST: Blocks reader: Starting...
[error] com.daml.FabricContextException: response {
[error] status: 500
[error] message: "make sure the chaincode daml_on_fabric has been successfully defined on channel mainchannel and try again: chaincode daml_on_fabric not found"
[error] }
[error]
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:578)
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:558)
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:554)
[error] at com.daml.DAMLKVConnector.getLedgerId(DAMLKVConnector.java:316)
[error] at com.daml.DAMLKVConnector.<init>(DAMLKVConnector.java:90)
[error] at com.daml.DAMLKVConnector.get(DAMLKVConnector.java:30)
[error] at com.daml.DamlOnFabricServer$.delayedEndpoint$com$daml$DamlOnFabricServer$1(DamlOnFabricServer.scala:65)
[error] at com.daml.DamlOnFabricServer$delayedInit$body.apply(DamlOnFabricServer.scala:48)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:392)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at com.daml.DamlOnFabricServer$.main(DamlOnFabricServer.scala:48)
[error] at com.daml.DamlOnFabricServer.main(DamlOnFabricServer.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
[error] stack trace is suppressed; run last Compile / bgRun for the full output
Admin@org2.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv_sk
Admin@org2.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem
Constructing channel mainchannel
Created channel mainchannel
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Peer peer0 grpcs://localhost:10051 joined channel mainchannel
Admin@org2.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv_sk
Admin@org2.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem
Peer peer0 grpcs://localhost:10056 joined channel mainchannel
Added peers to channel mainchannel
Mar 08, 2021 2:14:47 PM org.hyperledger.fabric.sdk.Channel initialize
INFO: Channel Channel{id: 25, name: mainchannel} eventThread started shutdown: false thread: null
No META-INF folder detected. Starting chaincode without any custom indexes
That's all folks!
Admin@org1.example.com private key: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /DAML-HLF/my-app/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
REST: Blocks reader: Started.
even i tried with the solution of previous topics who faced the same errors till i land on same error
Latest Error i found for command
sbt "run --port 6865 --role provision,time,ledger,explorer ../quickstart/.daml/dist/quickstart-0.0.1.dar"
[error] (run-main-0) com.daml.FabricContextException: response {
[error] status: 500
[error] message: "make sure the chaincode daml_on_fabric has been successfully defined on channel mainchannel and try again: chaincode daml_on_fabric not found"
[error] }
REST: Listening on port 8080 (try to query http://127.0.0.1:8080/blocks)
REST: Initializing background thread...
[error] com.daml.FabricContextException: response {
[error] status: 500
[error] message: "make sure the chaincode daml_on_fabric has been successfully defined on channel mainchannel and try again: chaincode daml_on_fabric not found"
[error] }
[error]
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:578)
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:558)
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:554)
[error] at com.daml.DAMLKVConnector.getLedgerId(DAMLKVConnector.java:316)
[error] at com.daml.DAMLKVConnector.<init>(DAMLKVConnector.java:90)
[error] at com.daml.DAMLKVConnector.get(DAMLKVConnector.java:30)
[error] at com.daml.DamlOnFabricServer$.delayedEndpoint$com$daml$DamlOnFabricServer$1(DamlOnFabricServer.scala:65)
[error] at com.daml.DamlOnFabricServer$delayedInit$body.apply(DamlOnFabricServer.scala:48)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:392)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at com.daml.DamlOnFabricServer$.main(DamlOnFabricServer.scala:48)
[error] at com.daml.DamlOnFabricServer.main(DamlOnFabricServer.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] stack trace is suppressed; run last Compile / bgRun for the full output
REST: Blocks reader: Starting...
Admin@org1.example.com private key: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Admin@org1.example.com private key: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Admin@org2.example.com private key: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv_sk
Admin@org2.example.com sign cert: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem
Constructing channel mainchannel
Created channel mainchannel
Admin@org1.example.com private key: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
Peer peer0 grpcs://localhost:10051 joined channel mainchannel
Admin@org2.example.com private key: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv_sk
Admin@org2.example.com sign cert: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem
Peer peer0 grpcs://localhost:10056 joined channel mainchannel
Added peers to channel mainchannel
Jun 01, 2021 7:45:04 PM org.hyperledger.fabric.sdk.Channel initialize
INFO: Channel Channel{id: 25, name: mainchannel} eventThread started shutdown: false thread: null
No META-INF folder detected. Starting chaincode without any custom indexes
That's all folks!
Admin@org1.example.com private key: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /home/neosoft/Desktop/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
REST: Blocks reader: Started.
I've run another command as well
daml ledger allocate-parties --host localhost --port 6865 Alice Bob Carol USD_Bank EUR_Bank
and the error i found is below
Checking party allocation at localhost:6865
daml-helper: GRPCIOTimeout
Seems we might need to fix that README as I’m also getting a different error when trying to deploy a DAR with the sbt command. SBT starts our Daml Driver for Fabric so what we can do is start SBT separately and then deploy our DAR:
- Start Fabric as you have
cd ~/daml-on-fabric/src/test/fixture
./gen.sh
./restart_fabric.sh
- Start the Daml Driver (sbt) without a DAR file
cd ~/daml-on-fabric
sbt "run --port 6865 --role provision,time,ledger" -J-DfabricConfigFile=config-local.yaml
- Get quickstart and edit
daml.yaml
so that sdk-version is set to1.11.0
(the driver doesn’t yet support newer version of Daml)
cd ~
daml new quickstart quickstart-java
Opendaml.yaml
, change sdk-version to read1.11.0
- Build quickstart
daml build
cd ~/quickstart
- Deploy quickstart to your Daml on Fabric ledger. This will also automatically allocate parties for you so you don’t need to run
daml ledger allocate-parties
.
daml deploy --host localhost --port 6865
- Then start Navigator
cd ~/quickstart/
daml navigator server localhost 6865 --port 4000
Also if you want to try out a full stack application with a custom UI you can refer to the deployment guide in that repo or try it out on daml.com/learn.
@anthony yes it’s worked for me… Thank you