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

Exception swallowed when querying vault via RPC with bad page spec

Description

Suppose I have an RPC client that calls:

1 2 3 4 val vaultPage = proxy.vaultQueryBy<TemplateState>( criteria = QueryCriteria.VaultQueryCriteria(), paging = PageSpecification(-1, 5)) println(vaultPage.states)

The only exception thrown is:

Exception in thread "main" net.corda.core.CordaRuntimeException

I have to check the logs to see the underlying error:

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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 [ERROR] 2019-02-20T10:13:11,488Z [rpc-server-handler-pool-0] proxies.ExceptionSerialisingRpcOpsProxy.log - Error during RPC invocation [errorCode=17pdr0a, moreInformationAt=https://errors.corda.net/OS/4.0-RC07/17pdr0a] {actor_id=user1, actor_owning_identity=O=PartyA, L=London, C=GB, actor_store_id=NODE_CONFIG, invocation_id=693cd442-ea8f-47d6-bf25-afc7051946ab, invocation_timestamp=2019-02-20T10:13:11.427Z, origin=user1, session_id=e68cafe6-686d-4f68-b3bc-a26645c8a111, session_timestamp=2019-02-20T10:13:07.729Z} java.lang.reflect.UndeclaredThrowableException: null at com.sun.proxy.$Proxy33.vaultQueryBy(Unknown Source) ~[?:?] at net.corda.node.internal.rpc.proxies.AuthenticatedRpcOpsProxy.vaultQueryBy(AuthenticatedRpcOpsProxy.kt) ~[corda-node-4.0-RC07.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171] at net.corda.node.internal.InvocationHandlerTemplate$DefaultImpls.invoke(InvocationHandlerTemplate.kt:16) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.internal.rpc.proxies.ExceptionSerialisingRpcOpsProxy$ErrorSerialisingInvocationHandler.invoke(ExceptionSerialisingRpcOpsProxy.kt:36) ~[corda-node-4.0-RC07.jar:?] at com.sun.proxy.$Proxy33.vaultQueryBy(Unknown Source) ~[?:?] at net.corda.node.internal.rpc.proxies.ExceptionSerialisingRpcOpsProxy.vaultQueryBy(ExceptionSerialisingRpcOpsProxy.kt) ~[corda-node-4.0-RC07.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171] at net.corda.node.internal.InvocationHandlerTemplate$DefaultImpls.invoke(InvocationHandlerTemplate.kt:16) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.internal.rpc.proxies.ThreadContextAdjustingRpcOpsProxy$ThreadContextAdjustingInvocationHandler$invoke$1.invoke(ThreadContextAdjustingRpcOpsProxy.kt:25) ~[corda-node-4.0-RC07.jar:?] at net.corda.core.internal.ClassLoadingUtilsKt.executeWithThreadContextClassLoader(ClassLoadingUtils.kt:36) ~[corda-core-4.0-RC07.jar:?] at net.corda.node.internal.rpc.proxies.ThreadContextAdjustingRpcOpsProxy$ThreadContextAdjustingInvocationHandler.invoke(ThreadContextAdjustingRpcOpsProxy.kt:25) ~[corda-node-4.0-RC07.jar:?] at com.sun.proxy.$Proxy33.vaultQueryBy(Unknown Source) ~[?:?] at net.corda.node.internal.rpc.proxies.ThreadContextAdjustingRpcOpsProxy.vaultQueryBy(ThreadContextAdjustingRpcOpsProxy.kt) ~[corda-node-4.0-RC07.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171] at net.corda.node.services.rpc.RPCServer.invokeRpc(RPCServer.kt:360) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.services.rpc.RPCServer.access$invokeRpc(RPCServer.kt:77) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.services.rpc.RPCServer$clientArtemisMessageHandler$4.run(RPCServer.kt:333) ~[corda-node-4.0-RC07.jar:?] 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 java.lang.Thread.run(Thread.java:748) [?:1.8.0_171] Caused by: net.corda.core.node.services.VaultQueryException: Page specification: invalid page number 0 [page numbers start from 1] at net.corda.node.services.vault.NodeVaultService$_queryBy$2.invoke(NodeVaultService.kt:553) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.services.vault.NodeVaultService$_queryBy$2.invoke(NodeVaultService.kt:55) ~[corda-node-4.0-RC07.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.inTopLevelTransaction(CordaPersistence.kt:236) ~[corda-node-api-4.0-RC07.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:221) ~[corda-node-api-4.0-RC07.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:199) ~[corda-node-api-4.0-RC07.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:205) ~[corda-node-api-4.0-RC07.jar:?] at net.corda.node.services.vault.NodeVaultService._queryBy(NodeVaultService.kt:526) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.services.vault.NodeVaultService._queryBy(NodeVaultService.kt:515) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.internal.CordaRPCOpsImpl.vaultQueryBy(CordaRPCOpsImpl.kt:108) ~[corda-node-4.0-RC07.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171] at net.corda.node.internal.InvocationHandlerTemplate$DefaultImpls.invoke(InvocationHandlerTemplate.kt:16) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.internal.rpc.proxies.AuthenticatedRpcOpsProxy$PermissionsEnforcingInvocationHandler$invoke$1.invoke(AuthenticatedRpcOpsProxy.kt:42) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.internal.rpc.proxies.AuthenticatedRpcOpsProxyKt.guard(AuthenticatedRpcOpsProxy.kt:52) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.internal.rpc.proxies.AuthenticatedRpcOpsProxyKt.guard(AuthenticatedRpcOpsProxy.kt:46) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.internal.rpc.proxies.AuthenticatedRpcOpsProxyKt.access$guard(AuthenticatedRpcOpsProxy.kt:1) ~[corda-node-4.0-RC07.jar:?] at net.corda.node.internal.rpc.proxies.AuthenticatedRpcOpsProxy$PermissionsEnforcingInvocationHandler.invoke(AuthenticatedRpcOpsProxy.kt:42) ~[corda-node-4.0-RC07.jar:?] ... 34 more

Status

Assignee

Dan Newton

Reporter

Joel Dudley

Priority

Medium

Labels

None

Severity

Medium

Fix versions

Ported to...

None

Feature Team

Corda Core

Affects versions

Corda 4 RC06