corda / cordapp-template-java Goto Github PK
View Code? Open in Web Editor NEWA Java CorDapp Template. Extend it via the Hello, World tutorial: https://docs.corda.net/hello-world-introduction.html
A Java CorDapp Template. Extend it via the Hello, World tutorial: https://docs.corda.net/hello-world-introduction.html
In the Release 4 Version of the Template in Module ‚Workflow‘ there are bin/*.class committed
Updated 15days ago
Hi Team ,
I have done the local build of this app and able to generate the cpi for the same but while trying to upload the same through POST /corda/cpi it got uploaded successfully and able to see one id is returning in response
{
"id": "84a91fc5-54fe-44c6-afe4-1f375b481d6b"
}
But while trying to run the GET method /corda/cpi/status/84a91fc5-54fe-44c6-afe4-1f375b481d6b to check the status it's returning
{
"title": "No such requestId=84a91fc5-54fe-44c6-afe4-1f375b481d6b",
"status": 400,
"details": {}
}
What can be possible reason for this, or do I missing something while deploying...Please guide me.
Also when I'm hitting GET method to listallcpi's /corda/cpi it's returning
{
"cpis": []
}
Please help me, My POC is blocked because of this.
I am trying to create a CordApp using the cordapp-template-java
as a base project. When I run the template server I get the following exception:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'controller' defined in file [/Users/jphillips/git/coastal-waste-smart-contract/cordapp/clients/build/classes/java/main/com/template/webserver/Controller.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRPCConnection': Invocation of init method failed; nested exception is ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ119031: Unable to validate user from /127.0.0.1:62172. Username: user1; SSL certificate subject DN: unavailable]
Below are the commands and output I get leading up to this:
Deploying the Nodes
./gradlew deployNodes
> Task :deployNodes
Running Cordform task
Deleting /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes
Bootstrapping local test network in /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes
Generating node directory for Notary
Generating node directory for Membership
Generating node directory for WasteRecycler
Generating node directory for WasteCollector
Waiting for all nodes to generate their node-info files...
... still waiting. If this is taking longer than usual, check the node logs.
> Task :deployNodes
Distributing all node-info files to all nodes
Loading existing network parameters... none found
Gathering notary identities
Generating contract implementations whitelist
New NetworkParameters {
minimumPlatformVersion=6
notaries=[NotaryInfo(identity=O=Notary, L=London, C=GB, validating=false)]
maxMessageSize=10485760
maxTransactionSize=524288000
whitelistedContractImplementations {
}
eventHorizon=PT720H
packageOwnership {
}
modifiedTime=2020-05-24T21:17:50.057Z
epoch=1
}
Bootstrapping complete!
BUILD SUCCESSFUL in 47s
11 actionable tasks: 4 executed, 7 up-to-date
Building the Nodes
./build/nodes/runnodes --headless
Starting nodes in /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes
Starting corda.jar in /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/WasteCollector on debug port 5005
Node will expose jolokia monitoring port on 7005
Running command: /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/bin/java -Dcapsule.jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -javaagent:drivers/jolokia-jvm-1.6.0-agent.jar=port=7005,logHandlerClass=net.corda.node.JolokiaSlf4jAdapter -Dname=WasteCollector -jar /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/WasteCollector/corda.jar
Starting corda.jar in /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/Notary on debug port 5006
Node will expose jolokia monitoring port on 7006
Running command: /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/bin/java -Dcapsule.jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006 -javaagent:drivers/jolokia-jvm-1.6.0-agent.jar=port=7006,logHandlerClass=net.corda.node.JolokiaSlf4jAdapter -Dname=Notary -jar /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/Notary/corda.jar
Starting corda.jar in /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/WasteRecycler on debug port 5007
Node will expose jolokia monitoring port on 7007
Running command: /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/bin/java -Dcapsule.jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5007 -javaagent:drivers/jolokia-jvm-1.6.0-agent.jar=port=7007,logHandlerClass=net.corda.node.JolokiaSlf4jAdapter -Dname=WasteRecycler -jar /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/WasteRecycler/corda.jar
No file corda.jar found in /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/.cache
Starting corda.jar in /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/Membership on debug port 5008
Node will expose jolokia monitoring port on 7008
Running command: /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/bin/java -Dcapsule.jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5008 -javaagent:drivers/jolokia-jvm-1.6.0-agent.jar=port=7008,logHandlerClass=net.corda.node.JolokiaSlf4jAdapter -Dname=Membership -jar /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/Membership/corda.jar
Started 4 processes
Finished starting nodes
Listening for transport dt_socket at address: 5005
➜ cordapp git:(master) ✗ Jolokia: Agent started with URL http://127.0.0.1:7005/jolokia/
______ __
/ ____/ _________/ /___ _
/ / __ / ___/ __ / __ `/ Change is inevitable, except
/ /___ /_/ / / / /_/ / /_/ / from a vending machine.
\____/ /_/ \__,_/\__,_/
--- Corda Open Source 4.4 (21e8c4f) -------------------------------------------------------------
Logs can be found in : /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/WasteCollector/logs
Listening for transport dt_socket at address: 5006
Listening for transport dt_socket at address: 5008
Listening for transport dt_socket at address: 5007
Jolokia: Agent started with URL http://127.0.0.1:7007/jolokia/
Jolokia: Agent started with URL http://127.0.0.1:7006/jolokia/
Jolokia: Agent started with URL http://127.0.0.1:7008/jolokia/
⚠️ ATTENTION: This node is running in development mode! 👩💻 This is not safe for production deployment.
______ __
/ ____/ _________/ /___ _
/ / __ / ___/ __ / __ `/ A bus stops at a bus station. A train stops at a
/ /___ /_/ / / / /_/ / /_/ / train station. What happens at a workstation?
\____/ /_/ \__,_/\__,_/
--- Corda Open Source 4.4 (21e8c4f) -------------------------------------------------------------
Logs can be found in : /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/Notary/logs
______ __
/ ____/ _________/ /___ _
/ / __ / ___/ __ / __ `/ Old bankers never die, they
/ /___ /_/ / / / /_/ / /_/ / just... pass the buck
\____/ /_/ \__,_/\__,_/
--- Corda Open Source 4.4 (21e8c4f) -------------------------------------------------------------
Logs can be found in : /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/Membership/logs
______ __
/ ____/ _________/ /___ _
/ / __ / ___/ __ / __ `/ I named my dog 'Six Miles' so I can tell
/ /___ /_/ / / / /_/ / /_/ / people I walk Six Miles every day.
\____/ /_/ \__,_/\__,_/
--- Corda Open Source 4.4 (21e8c4f) -------------------------------------------------------------
Logs can be found in : /Users/jphillips/git/coastal-waste-smart-contract/cordapp/build/nodes/WasteRecycler/logs
⚠️ ATTENTION: This node is running in development mode! 👩💻 This is not safe for production deployment.
⚠️ ATTENTION: This node is running in development mode! 👩💻 This is not safe for production deployment.
⚠️ ATTENTION: This node is running in development mode! 👩💻 This is not safe for production deployment.
Advertised P2P messaging addresses : localhost:10040
RPC connection address : localhost:10041
RPC admin connection address : localhost:10044
Advertised P2P messaging addresses : localhost:10030
RPC connection address : localhost:10031
RPC admin connection address : localhost:10043
Advertised P2P messaging addresses : localhost:10050
RPC connection address : localhost:10051
RPC admin connection address : localhost:10045
Advertised P2P messaging addresses : localhost:10020
RPC connection address : localhost:10021
RPC admin connection address : localhost:10042
Loaded 2 CorDapp(s) : Contract CorDapp: Template CorDapp version 1 by vendor Corda Open Source with licence Apache License, Version 2.0, Workflow CorDapp: Template Flows version 1 by vendor Corda Open Source with licence Apache License, Version 2.0
Node for "WasteCollector" started up and registered in 43.01 sec
Running P2PMessaging loop
Loaded 2 CorDapp(s) : Contract CorDapp: Template CorDapp version 1 by vendor Corda Open Source with licence Apache License, Version 2.0, Workflow CorDapp: Template Flows version 1 by vendor Corda Open Source with licence Apache License, Version 2.0
Node for "Membership" started up and registered in 41.84 sec
Running P2PMessaging loop
Loaded 2 CorDapp(s) : Contract CorDapp: Template CorDapp version 1 by vendor Corda Open Source with licence Apache License, Version 2.0, Workflow CorDapp: Template Flows version 1 by vendor Corda Open Source with licence Apache License, Version 2.0
Node for "WasteRecycler" started up and registered in 41.89 sec
Running P2PMessaging loop
Loaded 2 CorDapp(s) : Contract CorDapp: Template CorDapp version 1 by vendor Corda Open Source with licence Apache License, Version 2.0, Workflow CorDapp: Template Flows version 1 by vendor Corda Open Source with licence Apache License, Version 2.0
Node for "Notary" started up and registered in 42.27 sec
Running P2PMessaging loop
Running the Template Server
./gradlew -b ./clients/build.gradle runTemplateServer
> Task :clients:runTemplateServer
I 22:18:59 1 Starter.logStarting - Starting Starter on Justins-MBP-4.lan with PID 30159 (/Users/jphillips/git/coastal-waste-smart-contract/cordapp/clients/build/classes/java/main started by jphillips in /Users/jphillips/git/coastal-waste-smart-contract/cordapp/clients)
I 22:18:59 1 Starter.logStartupProfileInfo - No active profile set, falling back to default profiles: default
I 22:18:59 1 AnnotationConfigServletWebServerApplicationContext.prepareRefresh - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@4816278d: startup date [Sun May 24 22:18:59 BST 2020]; root of context hierarchy
I 22:19:00 1 TomcatWebServer.initialize - Tomcat initialized with port(s): 10050 (http)
<==I 22:19:00 1 Http11NioProtocol.log - Initializing ProtocolHandler ["http-nio-10050"]
I 22:19:00 1 StandardService.log - Starting service [Tomcat]
I 22:19:00 1 StandardEngine.log - Starting Servlet Engine: Apache Tomcat/8.5.31
I 22:19:00 14 AprLifecycleListener.log - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/jphillips/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
I 22:19:00 14 [/].log - Initializing Spring embedded WebApplicationContext
I 22:19:00 14 ContextLoader.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 1302 ms
> :I 22:19:00 14 ServletRegistrationBean.addRegistration - Servlet dispatcherServlet mapped to [/]
I 22:19:00 14 FilterRegistrationBean.configure - Mapping filter: 'characterEncodingFilter' to: [/*]
I 22:19:00 14 FilterRegistrationBean.configure - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
I 22:19:00 14 FilterRegistrationBean.configure - Mapping filter: 'httpPutFormContentFilter' to: [/*]
I 22:19:00 14 FilterRegistrationBean.configure - Mapping filter: 'requestContextFilter' to: [/*]
I 22:19:12 1 RPCClient.logElapsedTime - Failed Startup took 10941 msec
W 22:19:12 1 AnnotationConfigServletWebServerApplicationContext.refresh - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'controller' defined in file [/Users/jphillips/git/coastal-waste-smart-contract/cordapp/clients/build/classes/java/main/com/template/webserver/Controller.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRPCConnection': Invocation of init method failed; nested exception is ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ119031: Unable to validate user from /127.0.0.1:62172. Username: user1; SSL certificate subject DN: unavailable]
I 22:19:12 1 StandardService.log - Stopping service [Tomcat]
I 22:19:12 1 ConditionEvaluationReportLoggingListener.logAutoConfigurationReport -
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
E 22:19:12 1 SpringApplication.reportFailure - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'controller' defined in file [/Users/jphillips/git/coastal-waste-smart-contract/cordapp/clients/build/classes/java/main/com/template/webserver/Controller.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRPCConnection': Invocation of init method failed; nested exception is ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ119031: Unable to validate user from /127.0.0.1:62172. Username: user1; SSL certificate subject DN: unavailable]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:729) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1274) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1131) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at com.template.webserver.Starter.main(Starter.java:21) [main/:?]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRPCConnection': Invocation of init method failed; nested exception is ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ119031: Unable to validate user from /127.0.0.1:62172. Username: user1; SSL certificate subject DN: unavailable]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:138) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:815) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:721) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
... 17 more
Caused by: org.apache.activemq.artemis.api.core.ActiveMQSecurityException: AMQ119031: Unable to validate user from /127.0.0.1:62172. Username: user1; SSL certificate subject DN: unavailable
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:423) ~[artemis-core-client-2.6.2.jar:2.6.2]
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:319) ~[artemis-core-client-2.6.2.jar:2.6.2]
at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:288) ~[artemis-core-client-2.6.2.jar:2.6.2]
at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:237) ~[artemis-core-client-2.6.2.jar:2.6.2]
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionChannel(ClientSessionFactoryImpl.java:1320) ~[artemis-core-client-2.6.2.jar:2.6.2]
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:674) ~[artemis-core-client-2.6.2.jar:2.6.2]
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:299) ~[artemis-core-client-2.6.2.jar:2.6.2]
at net.corda.client.rpc.internal.RPCClientProxyHandler.initSessions(RPCClientProxyHandler.kt:574) ~[corda-rpc-4.4.jar:?]
at net.corda.client.rpc.internal.RPCClientProxyHandler.start(RPCClientProxyHandler.kt:255) ~[corda-rpc-4.4.jar:?]
at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:93) ~[corda-rpc-4.4.jar:?]
at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:32) ~[corda-rpc-4.4.jar:?]
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:223) ~[corda-core-4.4.jar:?]
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:213) ~[corda-core-4.4.jar:?]
at net.corda.client.rpc.internal.RPCClient.start(RPCClient.kt:72) ~[corda-rpc-4.4.jar:?]
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:620) ~[corda-rpc-4.4.jar:?]
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:575) ~[corda-rpc-4.4.jar:?]
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:529) ~[corda-rpc-4.4.jar:?]
at net.corda.client.rpc.CordaRPCClient.start$default(CordaRPCClient.kt:527) ~[corda-rpc-4.4.jar:?]
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt) ~[corda-rpc-4.4.jar:?]
at com.template.webserver.NodeRPCConnection.initialiseNodeRPCConnection(NodeRPCConnection.java:40) ~[main/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:308) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:815) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:721) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
... 17 more
> Task :clients:runTemplateServer FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':clients:runTemplateServer'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 18s
11 actionable tasks: 4 executed, 7 up-to-date
The only thing I have changed from the cordapp-template-java
project is I have changed the nodes in the top level build.grade
file:
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
nodeDefaults {
projectCordapp {
deploy = false
}
cordapp project(':contracts')
cordapp project(':workflows')
}
node {
name "O=Notary,L=London,C=GB"
notary = [validating : false]
p2pPort 10002
rpcSettings {
address("localhost:10003")
adminAddress("localhost:10043")
}
}
node {
name "O=PartyA,L=London,C=GB"
p2pPort 10005
rpcSettings {
address("localhost:10006")
adminAddress("localhost:10046")
}
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
node {
name "O=PartyB,L=New York,C=US"
p2pPort 10008
rpcSettings {
address("localhost:10009")
adminAddress("localhost:10049")
}
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
}
If I run the same commands in the cordapp-template-java
project I don't get the security exception, so I must have to perform another step if I am to add new nodes? Do I need to generate new SSL certificates for the new nodes?
I cloned this repo and switched to the token-template branch; when I open the project with IntelliJ and Gradle runs; it shows this:
Could not resolve: com.r3.corda.lib.tokens:tokens-contracts:1.1-SNAPSHOT
Could not resolve: com.r3.corda.lib.tokens:tokens-workflows:1.1-SNAPSHOT
Could not resolve: com.r3.corda.lib.tokens:tokens-money:1.1-SNAPSHOT
I can resolve it by switching to 1.0-RC03
inside build.gradle
:
tokens_release_version = '1.0-RC03'
Hi,
"cordapp-contracts-states" and "cordapp" are already renamed to "contracts" and "workflows" respectively. However, the document is not updated.
Thank you.
Running the command on windows 10 - .\gradlew clean deployNodes throws an error - Error: Could not find or load main class net.corda.node.Corda
Logs are shared below, I tried to find any resolution on some blogs but all get in vain.
PS C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\Corda\templates\cordapp-template-java> .
\gradlew clean deployNodes
> Task :jar
Cordapp metadata not defined for this gradle build file. See https://docs.corda.net/head/cordapp-build-sys
tems.html#separation-of-cordapp-contracts-flows-and-services
> Task :deployNodes
Running Cordform task
Deleting C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\Corda\templates\cordapp-template-j
ava\build\nodes
Bootstrapping local test network in C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\Corda\t
emplates\cordapp-template-java\build\nodes
Generating node directory for Notary
Generating node directory for PartyA
Generating node directory for PartyB
Waiting for all nodes to generate their node-info files...
#### Error while generating node info file C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\
Corda\templates\cordapp-template-java\build\nodes\PartyA\logs ####
Error: Could not find or load main class net.corda.node.Corda
#### Error while generating node info file C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\
Corda\templates\cordapp-template-java\build\nodes\Notary\logs ####
Error: Could not find or load main class net.corda.node.Corda
#### Error while generating node info file C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\
Corda\templates\cordapp-template-java\build\nodes\PartyB\logs ####
Error: Could not find or load main class net.corda.node.Corda
> Task :deployNodes FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':deployNodes'.
> Error while generating node info file. Please check the logs in C:\Users\48013\Desktop\Backup\Tarun\TSG\
Sample Apps\Blockchain\Corda\templates\cordapp-template-java\build\nodes\PartyA\logs.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log out
put. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 24s
15 actionable tasks: 14 executed, 1 up-to-date
Is it possible to make this repository a template repository in github?
https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-template-repository
I can work around by forking and making my fork as a template.
But would be more convenient to create template directly.
Hi,
I believe this is an important issue since currently there's no possibility to extend FungibleToken using the Java template (token-template branch), token SDK version 1.1.-SNAPSHOT:
https://stackoverflow.com/questions/57650475/error-when-extending-fungibletoken-supportedschemas-in-queryablestate-clashes
Below is the configuration of my system on which am trying to run Cordapp:
RAM: 8 GB
OS: Ubuntu 18.04.1 LTS
Processor: Intel® Core™ i3-3220 CPU @ 3.30GHz × 4
Graphics: Intel® Ivybridge Desktop
OS Type: 64-bit
I am following the steps to run Cordapp from Below:
Cordapp Java Template
My computer system hangs when I try to run below command.
./runnodes
What is the recommended system requirement to run a Cordapp?
If my system should be fine running a Cordapp, then what might be getting wrong which is hanging my system?
Please help as am new to Cordapp and running it for very first time.
Cleared all the compilation errors and now am stuck with the following errors when using both 4.0 and 4.1.RC01 as corda release version in the build.gradle file. Can someone please help?
Cordapp net.corda:corda-finance-contracts:4.1-RC01 not found in cordapps configuration
Cordapp net.corda:corda-finance-contracts:4.0 not found in cordapps configuration
When i try to import the cordapp java template into IntelliJ receive the error as in the attached file
Error.txt
Using
IntelliJ 2018.1
JDK version 1.8.0_231
Gradle version
I cloned cordapp-template-java using the below link.
https://github.com/corda/cordapp-template-java.git
Branch - release-V4
1) I executed gradle build/clean from IntelliJ gradle sidebar. It's failing with below error stack.
Build file 'D:\blockchain\build.gradle' line: 60
Failed to apply plugin 'net.corda.plugins.cordapp'.
Collection contains no element matching the predicate.
2) Executed gradle command with --stacktrace.
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin 'net.corda.plugins.cordapp'
Caused by: java.util.NoSuchElementException: Collection contains no element matching the predicate.
Hi,
It seems that the value of mainClassName in subproject "clients" build.gradle(line 29) is incorrect. I think it should be "com.template.webserver.Starter" instead of "com.template.webserver.Server", right?
Thanks.
To reproduce the error:
./gradlew test
public class FlowTests {
private final MockNetwork network = new MockNetwork(ImmutableList.of(
"com.template.contracts", "com.template.flows",
"com.r3.corda.lib.tokens.money",
"com.r3.corda.lib.tokens.contracts",
"com.r3.corda.lib.tokens.workflows",
"com.r3.corda.lib.tokens.testing"));
private final StartedMockNode exchangeNode = network.createNode();
private final Party exchange = exchangeNode.getInfo().getLegalIdentities().get(0);
@Before
public void setup() {
network.runNetwork();
}
@After
public void tearDown() {
network.stopNodes();
}
@Test
public void dummyTest() throws ExecutionException, InterruptedException {
ExampleFlowWithFixedToken issueFlow = new ExampleFlowWithFixedToken("USD", 1000L, exchange);
Future<SignedTransaction> future = exchangeNode.startFlow(issueFlow);
network.runNetwork();
SignedTransaction tx = future.get();
System.out.print(tx);
}
}
In build.gradle of clients folder, the value of mainClassName "com.template.webserver.Server". But the "Server.class" does not exist in clients. Instead it should be "com.template.webserver.Starter".
GIT repository path mentioned under How to use the SDK Section is not correct.
The Mentioned path is for kotlin cordapp template repository rather than java cordapp template repository.
Mentioned Git Clone Command:-
git clone http://github.com/corda/cordapp-template-kotlin
cd cordapp-template-java
Should be Changed to:-
git clone http://github.com/corda/cordapp-template-java
cd cordapp-template-java
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.