We're updating the issue view to help you get more done. 

Node won't start if cordapps generate states prior to deletion

Description

Have a cordapp installed in a node (used obligation cordapp). Used the app to create a bunch of states in the vault. Decided that I no longer wanted that app so I removed it. This lead to node not able to start due to a check of vault states against installed cordapps.

Proposal: catch exception and log as warning to allow the node to start.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Database connection url is : jdbc:h2:tcp://localhost:11022/node Advertised P2P messaging addresses : localhost:10022 RPC connection address : localhost:10023 RPC admin connection address : localhost:1124 [ERROR] 13:18:49+0100 [main] internal.Node.run - Exception during node startup java.lang.ClassNotFoundException: net.corda.examples.obligation.Obligation at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_144] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_144] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[?:1.8.0_144] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_144] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_144] at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_144] at net.corda.node.services.vault.NodeVaultService.bootstrapContractStateTypes(NodeVaultService.kt:533) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.services.vault.NodeVaultService.<init>(NodeVaultService.kt:395) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.AbstractNode.makeVaultService(AbstractNode.kt:985) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl$vaultService$2.invoke(AbstractNode.kt:1025) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl$vaultService$2.invoke(AbstractNode.kt:1004) ~[corda-node-3.0.0-RC06.jar:?] at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) ~[kotlin-stdlib-1.2.50.jar:1.2.50-release-103 (1.2.50)] at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.getVaultService(AbstractNode.kt) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.AbstractNode.makeServices(AbstractNode.kt:786) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.AbstractNode.access$makeServices(AbstractNode.kt:160) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.AbstractNode$start$6.invoke(AbstractNode.kt:335) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.AbstractNode$start$6.invoke(AbstractNode.kt:160) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.inTopLevelTransaction(CordaPersistence.kt:173) ~[corda-node-api-3.0.0-RC06.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:158) ~[corda-node-api-3.0.0-RC06.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:136) ~[corda-node-api-3.0.0-RC06.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:142) ~[corda-node-api-3.0.0-RC06.jar:?] at net.corda.node.internal.AbstractNode.start(AbstractNode.kt:322) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.Node.start(Node.kt:400) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.EnterpriseNode.start(EnterpriseNode.kt:170) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:191) ~[corda-node-3.0.0-RC06.jar:?] at net.corda.node.internal.NodeStartup.run(NodeStartup.kt:148) [corda-node-3.0.0-RC06.jar:?] at net.corda.node.Corda.main(Corda.kt:25) [corda-node-3.0.0-RC06.jar:?]

Status

Assignee

Michele Sollecito

Reporter

Bogdan Paunescu

Labels

None

Affected OS

None

Severity

None

Target Version/s

R3 Corda 3.0 GA
Corda 3.3

Feature Team

Operational Experience

Fix versions

Priority

High