Why does contract upgrade throw casting error on counterparty during verifyProposal? - corda

I am trying to do a contract upgrade after I successfully authorised, I try to initiate the upgrade flow, but the counterparty is hitting an exception. So I'm wondering when/why this is happening.
At the springboot API
val states = queryUnconsumed<ObligationV1>
// Initiate upgrade contract flow.
states.forEach {
val flowInitiate = services.startFlow({ stateAndRef, upgrade -> ContractUpgradeFlow.Initiate(stateAndRef, upgrade) }, it , ObligationContractV2::class.java)
val resultInitiate = flowInitiate.returnValue.getOrThrow()
}
In ContractUpgradeHandler
// Wouldn't this tx always be of type upgrade tx?
val oldStateAndRef = ourSTX!!.tx.outRef<ContractState>(proposal.stateRef.index)
But in SignedTransaction.kt
** Returns the contained [WireTransaction], or throws if this is a notary change or contract upgrade transaction. */
val tx: WireTransaction get() = coreTransaction as WireTransaction
[WARN ] 2018-08-20T10:25:03,573Z [Node thread-1] flow.[fe5bf9ea-fafc-40b6-9b51-31caaa4ee513].run - Terminated by unexpected exception {}
java.lang.ClassCastException: net.corda.core.transactions.ContractUpgradeWireTransaction cannot be cast to net.corda.core.transactions.WireTransaction
at net.corda.core.transactions.SignedTransaction.getTx(SignedTransaction.kt:62) ~[corda-core-corda-3.0.jar:?]
at net.corda.node.services.ContractUpgradeHandler.verifyProposal(CoreFlowHandlers.kt:57) ~[corda-node-corda-3.0.jar:?]
at net.corda.core.flows.AbstractStateReplacementFlow$Acceptor.call(AbstractStateReplacementFlow.kt:149) ~[corda-core-corda-3.0.jar:?]
at net.corda.core.flows.AbstractStateReplacementFlow$Acceptor.call(AbstractStateReplacementFlow.kt:129) ~[corda-core-corda-3.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96) [corda-node-corda-3.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:44) [corda-node-corda-3.0.jar:?]
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:62) [corda-node-corda-3.0.jar:?]

The error message is pretty straight forward that it looks like you are trying to cast a ContractUpgradeWireTransaction to WireTransaction somewhere in your code.
Here is our recent tutorial on how to implement a contract upgrade on Corda: https://medium.com/corda/contract-upgrades-and-constraints-in-corda-425055a9a47f
and here is the video tutorial: https://www.youtube.com/watch?v=rWyJRaoWNhc

Related

Testnet seem to not support Corda4 with SignatureConstraint

I build Corda4 with SignatureConstraint and deploy with Testnet. Then when I make transaction I got this exception
net.corda.core.node.ZoneVersionTooLowException: Signature constraints requires all nodes on the Corda compatibility zone to be running at least platform version 4. The current zone is only enforcing a minimum platform version of 1. Please contact your zone operator.
at net.corda.core.internal.CordaUtilsKt.checkMinimumPlatformVersion(CordaUtils.kt:36) ~[corda-core-4.0.jar:?]
at net.corda.core.internal.Verifier.verifyConstraints(TransactionVerifierServiceInternal.kt:332) ~[corda-core-4.0.jar:?]
at net.corda.core.internal.Verifier.verify(TransactionVerifierServiceInternal.kt:61) ~[corda-core-4.0.jar:?]
at net.corda.core.transactions.LedgerTransaction.verify(LedgerTransaction.kt:125) ~[corda-core-4.0.jar:?]
at net.corda.core.transactions.TransactionBuilder.addMissingDependency(TransactionBuilder.kt:173) ~[corda-core-4.0.jar:?]
at net.corda.core.transactions.TransactionBuilder.toWireTransactionWithContext$core(TransactionBuilder.kt:160) ~[corda-core-4.0.jar:?]
at net.corda.core.transactions.TransactionBuilder.toWireTransactionWithContext$core$default(TransactionBuilder.kt:128) ~[corda-core-4.0.jar:?]
at net.corda.core.transactions.TransactionBuilder.toWireTransaction(TransactionBuilder.kt:125) ~[corda-core-4.0.jar:?]
at net.corda.core.transactions.TransactionBuilder.toLedgerTransaction(TransactionBuilder.kt:451) ~[corda-core-4.0.jar:?]
at net.corda.core.transactions.TransactionBuilder.verify(TransactionBuilder.kt:459) ~[corda-core-4.0.jar:?]
at th.co.jventures.ddlp.cordapp.flows.CustomerIssueFlow.call(CustomerIssueFlow.kt:166) ~[cordapp-flows-1.0.jar:?]
at th.co.jventures.ddlp.cordapp.flows.CustomerIssueFlow.call(CustomerIssueFlow.kt:32) ~[cordapp-flows-1.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:228) ~[corda-node-4.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:45) ~[corda-node-4.0.jar:?]
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) ~[quasar-core-0.7.10-jdk8.jar:0.7.10]
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) ~[quasar-core-0.7.10-jdk8.jar:0.7.10]
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) ~[quasar-core-0.7.10-jdk8.jar:0.7.10]
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) ~[quasar-core-0.7.10-jdk8.jar:0.7.10]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_201]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_201]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_201]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_201]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:63) ~[corda-node-4.0.jar:?]
Is this mean Testnet not support Signature constraint right?
The Corda Testnet is minimum platform version 1 at this time. There is a new Testnet with a minimum platform version of 4 coming out in due course that will support Corda V4 and therefore signature constraints.
Source: I am the tech lead of the R3 Corda Testnet.
If you are testing and want to debug, Mock network also doesn't support V4, so you will not be able to mock it either.
An alternative is to run nodes locally and attach the debugger with Corda's node driver as explained at https://docs.corda.net/debugging-a-cordapp.html
This is how I enabled on mock tests:
HashSet<TestCordapp> cordapps = new HashSet<>(asList( TestCordapp.findCordapp("com.r3.corda.lib.tokens.money"),
TestCordapp.findCordapp("com.r3.corda.lib.tokens.contracts"),
TestCordapp.findCordapp("com.r3.corda.lib.tokens.workflows")));
List<String> packages = Arrays.asList("[your packages]");
#Create new drive parameters and generate new network parameters copying defult
# except the minimun supported version
DriverParameters driverParameters = new DriverParameters().withIsDebug(true).withCordappsForAllNodes(cordapps);
NetworkParameters networkParameters = driverParameters.getNetworkParameters();
NetworkParameters parameters = networkParameters.copy(4, networkParameters.getNotaries(), networkParameters.getMaxMessageSize(), networkParameters.getMaxTransactionSize(), networkParameters.getModifiedTime(), networkParameters.getEpoch(), networkParameters.getWhitelistedContractImplementations());
InMemoryMessagingNetwork.ServicePeerAllocationStrategy servicePeerAllocationStrategy = new InMemoryMessagingNetwork.ServicePeerAllocationStrategy.Random();
MockNetworkParameters mockNetworkParameters = new MockNetworkParameters(cordapps);
MockNetworkNotarySpec mockNetworkNotarySpec = new MockNetworkNotarySpec(new CordaX500Name("Notary", "London", "GB"), false);
mockNet = new MockNetwork(packages,mockNetworkParameters,false,false,servicePeerAllocationStrategy,Arrays.asList(mockNetworkNotarySpec),parameters);
issuerNode = mockNet.createNode(new CordaX500Name("Issuer", "London", "GB"));
issuer = issuerNode.getInfo().getLegalIdentities().get(0);

Can a node sign over a transaction without the state cordapp?

A regulator node is needed to sign over a transaction containing a few linear states of type X, Y. Can the regulator sign the transaction without the state/contract cordapp? The node still have the flow-cordapps with the flows.
Will there be any issue in deserialisation? The regulator does need to store the states, but he just need to sign the transaction.
It is not possible, but not for the reasons manish described above.
As of Corda 3, sending the transaction to the regulator to be signed will result in a java.io.NotSerializableException.
This behaviour makes sense - what is the purpose of signing over a transaction where you cannot see the input and output states? If you do want to provide a signature regardless, you could work around it by sending a FilteredTransaction where all the states have been filtered out, along with any other components the regulator doesn't have the class definitions for. Then use serviceHub.createSignatures(filteredTransaction).
NB Here is an example of the stacktrace I received when I attempted to send a counterparty a SignedTransaction with components for which they did not have the class definitions:
java.io.NotSerializableException: Unexpected throwable: net.corda.core.transactions.WireTransaction -> net.corda.core.transactions.WireTransaction -> null java.lang.reflect.InvocationTargetException: net.corda.core.transactions.WireTransaction -> net.corda.core.transactions.WireTransaction -> null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at net.corda.nodeapi.internal.serialization.amqp.ObjectSerializer.construct(ObjectSerializer.kt:138)
at net.corda.nodeapi.internal.serialization.amqp.ObjectSerializer.readObjectBuildViaConstructor(ObjectSerializer.kt:97)
at net.corda.nodeapi.internal.serialization.amqp.ObjectSerializer.readObject(ObjectSerializer.kt:82)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObject$node_api(DeserializationInput.kt:135)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObjectOrNull$node_api(DeserializationInput.kt:109)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObjectOrNull$node_api$default(DeserializationInput.kt:108)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput$deserialize$1.invoke(DeserializationInput.kt:98)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.des(DeserializationInput.kt:80)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.deserialize(DeserializationInput.kt:96)
at net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme.deserialize(AMQPSerializationScheme.kt:123)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1$1.invoke(SerializationScheme.kt:111)
at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:66)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:111)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:86)
at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:80)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl.deserialize(SerializationScheme.kt:111)
at net.corda.core.transactions.SignedTransaction.getCoreTransaction(SignedTransaction.kt:273)
at net.corda.core.transactions.SignedTransaction.getId(SignedTransaction.kt:55)
at net.corda.core.node.ServiceHub$DefaultImpls.createSignature(ServiceHub.kt:264)
at net.corda.core.node.ServiceHub$DefaultImpls.createSignature(ServiceHub.kt:279)
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.createSignature(ServiceHubInternal.kt)
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.createSignature(AbstractNode.kt:820)
at net.corda.core.node.ServiceHub$DefaultImpls.addSignature(ServiceHub.kt:302)
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.addSignature(ServiceHubInternal.kt)
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.addSignature(AbstractNode.kt:820)
at net.corda.core.node.ServiceHub$DefaultImpls.addSignature(ServiceHub.kt:311)
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.addSignature(ServiceHubInternal.kt)
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.addSignature(AbstractNode.kt:820)
at com.template.Responder.call(App.kt:58)
at com.template.Responder.call(App.kt:54)
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96)
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:44)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788)
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100)
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:62)
Caused by: java.lang.Exception: Malformed transaction, OUTPUTS_GROUP at index 0 cannot be deserialised
at net.corda.core.transactions.TraversableTransaction.deserialiseComponentGroup(MerkleTransaction.kt:70)
at net.corda.core.transactions.TraversableTransaction.<init>(MerkleTransaction.kt:25)
at net.corda.core.transactions.WireTransaction.<init>(WireTransaction.kt:43)
... 47 more
Caused by: java.io.NotSerializableException: Unexpected throwable: Interface net.corda.core.contracts.ContractState requires a field named participants but that isn't found in the schema or any superclass schemas net.corda.nodeapi.internal.serialization.carpenter.InterfaceMismatchException: Interface net.corda.core.contracts.ContractState requires a field named participants but that isn't found in the schema or any superclass schemas
at net.corda.nodeapi.internal.serialization.carpenter.ClassCarpenter.validateSchema(ClassCarpenter.kt:434)
at net.corda.nodeapi.internal.serialization.carpenter.ClassCarpenter.build(ClassCarpenter.kt:106)
at net.corda.nodeapi.internal.serialization.carpenter.MetaCarpenterBase.step(MetaCarpenter.kt:69)
at net.corda.nodeapi.internal.serialization.carpenter.MetaCarpenter.build(MetaCarpenter.kt:98)
at net.corda.nodeapi.internal.serialization.amqp.SerializerFactory.processSchema(SerializerFactory.kt:235)
at net.corda.nodeapi.internal.serialization.amqp.SerializerFactory.processSchema$default(SerializerFactory.kt:216)
at net.corda.nodeapi.internal.serialization.amqp.SerializerFactory$get$1.invoke(SerializerFactory.kt:185)
at net.corda.nodeapi.internal.serialization.amqp.SerializerFactory$get$1.invoke(SerializerFactory.kt:40)
at net.corda.nodeapi.internal.serialization.amqp.SerializerFactory.get(SerializerFactory.kt:184)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObject$node_api(DeserializationInput.kt:131)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObjectOrNull$node_api(DeserializationInput.kt:109)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObjectOrNull$node_api$default(DeserializationInput.kt:108)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput$deserialize$1.invoke(DeserializationInput.kt:98)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.des(DeserializationInput.kt:80)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.deserialize(DeserializationInput.kt:96)
at net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme.deserialize(AMQPSerializationScheme.kt:123)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1$1.invoke(SerializationScheme.kt:111)
at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:66)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:111)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:86)
at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:80)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl.deserialize(SerializationScheme.kt:111)
at net.corda.core.transactions.TraversableTransaction$outputs$1.invoke(MerkleTransaction.kt:357)
at net.corda.core.transactions.TraversableTransaction$outputs$1.invoke(MerkleTransaction.kt:18)
at net.corda.core.transactions.TraversableTransaction.deserialiseComponentGroup(MerkleTransaction.kt:66)
at net.corda.core.transactions.TraversableTransaction.<init>(MerkleTransaction.kt:25)
at net.corda.core.transactions.WireTransaction.<init>(WireTransaction.kt:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at net.corda.nodeapi.internal.serialization.amqp.ObjectSerializer.construct(ObjectSerializer.kt:138)
at net.corda.nodeapi.internal.serialization.amqp.ObjectSerializer.readObjectBuildViaConstructor(ObjectSerializer.kt:97)
at net.corda.nodeapi.internal.serialization.amqp.ObjectSerializer.readObject(ObjectSerializer.kt:82)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObject$node_api(DeserializationInput.kt:135)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObjectOrNull$node_api(DeserializationInput.kt:109)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.readObjectOrNull$node_api$default(DeserializationInput.kt:108)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput$deserialize$1.invoke(DeserializationInput.kt:98)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.des(DeserializationInput.kt:80)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.deserialize(DeserializationInput.kt:96)
at net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme.deserialize(AMQPSerializationScheme.kt:123)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1$1.invoke(SerializationScheme.kt:111)
at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:66)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:111)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:86)
at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:80)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl.deserialize(SerializationScheme.kt:111)
at net.corda.core.transactions.SignedTransaction.getCoreTransaction(SignedTransaction.kt:273)
at net.corda.core.transactions.SignedTransaction.getId(SignedTransaction.kt:55)
at net.corda.core.node.ServiceHub$DefaultImpls.createSignature(ServiceHub.kt:264)
at net.corda.core.node.ServiceHub$DefaultImpls.createSignature(ServiceHub.kt:279)
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.createSignature(ServiceHubInternal.kt)
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.createSignature(AbstractNode.kt:820)
at net.corda.core.node.ServiceHub$DefaultImpls.addSignature(ServiceHub.kt:302)
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.addSignature(ServiceHubInternal.kt)
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.addSignature(AbstractNode.kt:820)
at net.corda.core.node.ServiceHub$DefaultImpls.addSignature(ServiceHub.kt:311)
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.addSignature(ServiceHubInternal.kt)
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.addSignature(AbstractNode.kt:820)
at com.template.Responder.call(App.kt:58)
at com.template.Responder.call(App.kt:54)
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96)
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:44)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788)
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100)
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:62)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.des(DeserializationInput.kt:84)
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.deserialize(DeserializationInput.kt:96)
at net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme.deserialize(AMQPSerializationScheme.kt:123)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1$1.invoke(SerializationScheme.kt:111)
at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:66)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:111)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:86)
at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:80)
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl.deserialize(SerializationScheme.kt:111)
at net.corda.core.transactions.TraversableTransaction$outputs$1.invoke(MerkleTransaction.kt:357)
at net.corda.core.transactions.TraversableTransaction$outputs$1.invoke(MerkleTransaction.kt:18)
at net.corda.core.transactions.TraversableTransaction.deserialiseComponentGroup(MerkleTransaction.kt:66)
... 49 more
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.des(DeserializationInput.kt:84) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.serialization.amqp.DeserializationInput.deserialize(DeserializationInput.kt:96) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme.deserialize(AMQPSerializationScheme.kt:123) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1$1.invoke(SerializationScheme.kt:111) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:66) ~[corda-core-3.2-corda.jar:?]
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:111) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:86) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:80) ~[corda-core-3.2-corda.jar:?]
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl.deserialize(SerializationScheme.kt:111) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.core.transactions.SignedTransaction.getCoreTransaction(SignedTransaction.kt:273) ~[corda-core-3.2-corda.jar:?]
at net.corda.core.transactions.SignedTransaction.getId(SignedTransaction.kt:55) ~[corda-core-3.2-corda.jar:?]
at net.corda.core.node.ServiceHub$DefaultImpls.createSignature(ServiceHub.kt:264) ~[corda-core-3.2-corda.jar:?]
at net.corda.core.node.ServiceHub$DefaultImpls.createSignature(ServiceHub.kt:279) ~[corda-core-3.2-corda.jar:?]
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.createSignature(ServiceHubInternal.kt) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.createSignature(AbstractNode.kt:820) ~[corda-node-3.2-corda.jar:?]
at net.corda.core.node.ServiceHub$DefaultImpls.addSignature(ServiceHub.kt:302) ~[corda-core-3.2-corda.jar:?]
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.addSignature(ServiceHubInternal.kt) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.addSignature(AbstractNode.kt:820) ~[corda-node-3.2-corda.jar:?]
at net.corda.core.node.ServiceHub$DefaultImpls.addSignature(ServiceHub.kt:311) ~[corda-core-3.2-corda.jar:?]
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.addSignature(ServiceHubInternal.kt) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.addSignature(AbstractNode.kt:820) ~[corda-node-3.2-corda.jar:?]
at com.template.Responder.call(App.kt:58) ~[cordapp-0.1.jar:?]
at com.template.Responder.call(App.kt:54) ~[cordapp-0.1.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96) [corda-node-3.2-corda.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:44) [corda-node-3.2-corda.jar:?]
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_171]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_171]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_171]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:62) [corda-node-3.2-corda.jar:?]
No, it is not possible .
CollectSignaturesFlow required the counter party to override the SendTransactionFlow to collect the signature.This could be only possible only the node has the cordapp that has the initated by flow.

Is there a limit to the number of inputs/outputs states during transaction building?

On Corda Open Source 3.2 with postgres 9.6. I have 300 obligations states in the transaction that has to atomically transition to SETTLED AND cash states as inputs to knock these obligations off.
I am getting a pagination error during recordTransactions. Is there a limit to how many states that can be put into a transaction?
Stacktrace below
[ERROR] 2018-08-10T06:40:38,702Z [Node thread-1] flow.[a80ddfb6-628e-4194-98ef-77261512b6fb].call - Error during mutedTry {}
net.corda.core.node.services.VaultQueryException: Please specify a `PageSpecification` as there are more results [201] than the default page size [200]
at net.corda.node.services.vault.NodeVaultService._queryBy(NodeVaultService.kt:426) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.vault.NodeVaultService.loadStates(NodeVaultService.kt:546) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.vault.NodeVaultService.access$loadStates(NodeVaultService.kt:49) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.vault.NodeVaultService$makeUpdates$1.invoke(NodeVaultService.kt:143) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.vault.NodeVaultService.makeUpdates(NodeVaultService.kt:188) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.vault.NodeVaultService.access$makeUpdates(NodeVaultService.kt:49) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.vault.NodeVaultService$notifyAll$1.invoke(NodeVaultService.kt:119) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.vault.NodeVaultService.notifyAll(NodeVaultService.kt:130) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.recordTransactions(ServiceHubInternal.kt:118) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl$recordTransactions$1.invoke(AbstractNode.kt:857) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl$recordTransactions$1.invoke(AbstractNode.kt:818) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:136) ~[corda-node-api-3.2.1847-corda.jar:?]
at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:124) ~[corda-node-api-3.2.1847-corda.jar:?]
at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:131) ~[corda-node-api-3.2.1847-corda.jar:?]
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.recordTransactions(AbstractNode.kt:856) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.core.node.ServiceHub$DefaultImpls.recordTransactions(ServiceHub.kt:201) ~[corda-core-3.2.1847-corda.jar:?]
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.recordTransactions(ServiceHubInternal.kt) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.recordTransactions(AbstractNode.kt:818) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.core.node.ServiceHub$DefaultImpls.recordTransactions(ServiceHub.kt:193) ~[corda-core-3.2.1847-corda.jar:?]
at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.recordTransactions(ServiceHubInternal.kt) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.recordTransactions(AbstractNode.kt:818) ~[corda-node-3.2.1847-corda.jar:?]
at net.corda.core.flows.FinalityFlow.notariseAndRecord(FinalityFlow.kt:78) ~[corda-core-3.2.1847-corda.jar:?]
at net.corda.core.flows.FinalityFlow.call(FinalityFlow.kt:56) ~[corda-core-3.2.1847-corda.jar:?]
at net.corda.core.flows.FinalityFlow.call(FinalityFlow.kt:28) ~[corda-core-3.2.1847-corda.jar:?]
at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:290) ~[corda-core-3.2.1847-corda.jar:?]
at example.template.flows.SettleOblgiations$Initiator.call(SettleOblgiations.kt:105) ~[obligation-1.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96) [corda-node-3.2.1847-corda.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:44) [corda-node-3.2.1847-corda.jar:?]
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_171]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_171]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_171]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:62) [corda-node-3.2.1847-corda.jar:?]
Thanks for raising this issue.
It has indeed been fixed on master since May, and will be included in the next OS 3.3 release.
See https://github.com/corda/corda/pull/3788
In general, if you perform a vault query returning over 200 results, you need to provide a PageSpecification to define how the results are returned. This is to prevent memory overflow errors if too many results are returned. Here is an example of a vault query using a PageSpecification:
val vaultSnapshot = serviceHub.vaultService.queryBy<ContractState>(
criteria = VaultQueryCriteria(UNCONSUMED),
paging = PageSpecification(DEFAULT_PAGE_NUM, 200))
FinalityFlow calls out to NodeVaultService.loadStates, which is where your error is being thrown. As of Corda 3.2, NodeVaultService.loadStates is not doing anything to prevent it requesting more than 200 results at once, causing the pagination error to be thrown. This has been fixed in master and the fix will be included in Corda 3.3/Corda 4, as follows:
private fun loadStates(refs: Collection<StateRef>): Collection<StateAndRef<ContractState>> {
val states = mutableListOf<StateAndRef<ContractState>>()
if (refs.isNotEmpty()) {
val refsList = refs.toList()
val pageSize = PageSpecification().pageSize
(0..(refsList.size - 1) / pageSize).forEach {
val offset = it * pageSize
val limit = minOf(offset + pageSize, refsList.size)
val page = queryBy<ContractState>(QueryCriteria.VaultQueryCriteria(stateRefs = refsList.subList(offset, limit))).states
states.addAll(page)
}
}
return states
}

com.google.api.gax.grpc.ApiException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED

Recently,I use google cloud vision api for detecting image label ,follow this
,I set up the credentials for my application to authenticate its identity to the service and obtain authorization to perform task,then follow the API Documentation ,write code like this:
ImageAnnotatorClient vision= ImageAnnotatorClient.create();
ByteString imgBytes = ByteString.readFrom(new FileInputStream("my_image_path.jpg"));
List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();
Image img = Image.newBuilder().setContent(imgBytes).build();
Feature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();
AnnotateImageRequest request = AnnotateImageRequest.newBuilder()
.addFeatures(feat)
.setImage(img)
.build();
requests.add(request);
BatchAnnotateImagesResponse response = vision.batchAnnotateImages(requests);
List<AnnotateImageResponse> responses = response.getResponsesList();
for (AnnotateImageResponse res : responses) {
if (res.hasError()) {
System.out.printf("Error: %s\n", res.getError().getMessage());
return;
}
for (EntityAnnotation annotation : res.getLabelAnnotationsList()) {
annotation.getAllFields().forEach((k, v)->System.out.printf("%s : %s\n", k, v.toString()));
}
}
I get error :
Exception in thread "main" com.google.api.gax.grpc.ApiException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED
at com.google.api.gax.grpc.ExceptionTransformingCallable$ExceptionTransformingFuture.onFailure(ExceptionTransformingCallable.java:109)
at com.google.api.gax.core.ApiFutures$1.onFailure(ApiFutures.java:52)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1310)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:202)
at io.grpc.stub.ClientCalls$GrpcFuture.setException(ClientCalls.java:466)
at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:442)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:481)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:398)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:513)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52)
at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:154)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED
at io.grpc.Status.asRuntimeException(Status.java:545)
... 13 more
why?

context initialization failed alfresco, open office failed to connect

facing this error on the development server on local host amps are working fine,as error suggests tried trouble-shooting open office (http://docs.alfresco.com/5.0/tasks/troubleshoot-openoffice.html) but error still persists.
PS:Before deployment of new amps,I deleted all workflows "delete all workflows imeanit" through admin console.Dont know if this lead to the below error
Edit : 8100 was responsible for jodconverter (used by open office /libre office ) , I disabled converter but still context initialisation failed.
org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:68)
at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:101)
at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:66)
at org.alfresco.enterprise.repo.content.JodConverterSharedInstance.afterPropertiesSet(JodConverterSharedInstance.java:239)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1572)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1510)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:633)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ApplicationContextState.start(ChildApplicationContextFactory.java:809)
at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.start(AbstractPropertyBackedBean.java:1086)
at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.onApplicationEvent(AbstractPropertyBackedBean.java:625)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:178)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:66)
... 39 more
Caused by: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:147)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$0(ManagedOfficeProcess.java:122)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:62)
... 5 more
Caused by: java.lang.IllegalStateException: a process with acceptString 'socket,host=127.0.0.1,port=8100' is already running; pid 3288
at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:74)
at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:67)
at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:124)
... 7 more
Context initialization failed
java.lang.NullPointerException
at org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl.getFacetProperties(SolrFacetServiceImpl.java:348)
at org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl.getPersistedFacetProperties(SolrFacetServiceImpl.java:728)
at org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl.onBootstrap(SolrFacetServiceImpl.java:637)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:178)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-04-12 06:53:40,546 INFO [org.alfresco.enterprise.repo.cluster.core.ClusteringBootstrap] [localhost-startStop-1] Clustering has shutdown.
2017-04-12 06:53:40,547 WARN [org.springframework.web.context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.NullPointerException
at org.springframework.extensions.config.xml.XMLConfigService.removeElementReaders(XMLConfigService.java:504)
at org.springframework.extensions.config.xml.XMLConfigService.destroy(XMLConfigService.java:150)
at org.springframework.extensions.config.BaseConfigService.onShutdown(BaseConfigService.java:630)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:67)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:183)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5063)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5719)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
*********************Logs AfterDisablingJodconverter***********************
2017-04-20 06:47:44,549 ERROR [org.springframework.web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
java.lang.NullPointerException
at org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl.getFacetProperties(SolrFacetServiceImpl.java:348)
at org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl.getPersistedFacetProperties(SolrFacetServiceImpl.java:728)
at org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl.onBootstrap(SolrFacetServiceImpl.java:637)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:178)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-04-20 06:48:04,139 INFO [org.alfresco.enterprise.repo.cluster.core.ClusteringBootstrap] [localhost-startStop-1] Clustering has shutdown.
2017-04-20 06:48:04,140 WARN [org.springframework.web.context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.NullPointerException
at org.springframework.extensions.config.xml.XMLConfigService.removeElementReaders(XMLConfigService.java:504)
at org.springframework.extensions.config.xml.XMLConfigService.destroy(XMLConfigService.java:150)
at org.springframework.extensions.config.BaseConfigService.onShutdown(BaseConfigService.java:630)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:67)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:183)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5063)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5719)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
When you said "I disabled converter but still context initialisation failed." did you disabled it in /shared/classes/alfresco/extension/subsystems/OOoDirect/default/default/openoffice-transform.properties ? (Or in alfresco-global.properties it work there too)
ooo.exe=soffice
ooo.enabled=false
ooo.host=localhost
ooo.port=8100
It seems like your alfresco try to connect to soffice but can't because the port 8100 is already in use. Can change that port or you might want to start your soffice as a separated service:
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
You'll need to change the port.
You might have another soffice thread still running, check your process and kill it.

Resources