我有一个关于基于UUID检索未消耗状态的查询。
val uuid = linearId.toUUID()
val queryCriteria = QueryCriteria.LinearStateQueryCriteria(
linearId = listOf(uuid))
return services.vaultQueryBy<ContractState>(queryCriteria).states
问题陈述:在Corda 3.0上,使用Postgres。查询Vault时,同一UUID的多个/缺少未使用状态。由两个参与者借方和贷方组成的ObligationState,从不同的交易过渡到不同的生命周期。但是在某个时候
在公证数据库上
node_notary_commit_log
╔════════════════╤══════════════════════════╗
║ transaction_id │ consuming_transaction_id ║
╠════════════════╪══════════════════════════╣
║ Transaction A │ Transaction B ║
╟────────────────┼──────────────────────────╢
║ Transaction B │ Transaction C ║
╟────────────────┼──────────────────────────╢
║ Transaction C │ Transaction D ║
╚════════════════╧══════════════════════════╝
vault_states
缺少事务C,并且有2个tx的值为consumed_timestamp
为空,所以这可能就是为什么返回2条记录的原因。
╔════════════════╤═════════════════════╗
║ transaction_id │ consumed_timsestamp ║
╠════════════════╪═════════════════════╣
║ Transaction A │ T ║
╟────────────────┼─────────────────────╢
║ Transaction B │ null ║
╟────────────────┼─────────────────────╢
║ Transaction D │ null ║
╚════════════════╧═════════════════════╝
vault_linear_states
缺少交易C
╒════════════════╤══════╕
│ transaction_id │ uuid │
╞════════════════╪══════╡
│ Transaction A │ XYZ │
├────────────────┼──────┤
│ Transaction B │ XYZ │
├────────────────┼──────┤
│ Transaction D │ XYZ │
╘════════════════╧══════╛
obligation_states
模式表
缺少交易C
╔════════════════╤══════════╤═══════════╗
║ transaction_id │ linearId │ lifecycle ║
╠════════════════╪══════════╪═══════════╣
║ Transaction A │ XYZ │ foo ║
╟────────────────┼──────────┼───────────╢
║ Transaction B │ XYZ │ bar ║
╟────────────────┼──────────┼───────────╢
║ Transaction D │ XYZ │ baz ║
╚════════════════╧══════════╧═══════════╝
vault_states
╔════════════════╤═════════════════════╗
║ transaction_id │ consumed_timsestamp ║
╠════════════════╪═════════════════════╣
║ Transaction A │ T ║
╟────────────────┼─────────────────────╢
║ Transaction B │ T+1 ║
╟────────────────┼─────────────────────╢
║ Transaction C │ T+2 ║
╟────────────────┼─────────────────────╢
║ Transaction D │ null ║
╚════════════════╧═════════════════════╝
vault_linear_states
缺少事务D,这就是为什么即使在vault_states
中也没有找到记录D的原因
╒════════════════╤══════╕
│ transaction_id │ uuid │
╞════════════════╪══════╡
│ Transaction A │ XYZ │
├────────────────┼──────┤
│ Transaction B │ XYZ │
├────────────────┼──────┤
│ Transaction C │ XYZ │
╘════════════════╧══════╛
obligation_states
模式表
缺少交易D
╔════════════════╤══════════╤═══════════╗
║ transaction_id │ linearId │ lifecycle ║
╠════════════════╪══════════╪═══════════╣
║ Transaction A │ XYZ │ foo ║
╟────────────────┼──────────┼───────────╢
║ Transaction B │ XYZ │ bar ║
╟────────────────┼──────────┼───────────╢
║ Transaction C │ XYZ │ baz ║
╚════════════════╧══════════╧═══════════╝
公证人响应后,日志显示提交期间的某些异常。
rx.exceptions.OnErrorNotImplementedException: Error accessing index information: public.vault_linear_states
[INFO ] 2018-06-20T04:45:13,256Z [Node thread-1] flow.[a4ab4833-4c8c-4bd6-80ee-f7c58057a2d0].IssueObligation - {} [INFO ] 2018-06-20T04:45:14,738Z [Node thread-1] flow.[a4ab4833-4c8c-4bd6-80ee-f7c58057a2d0].initiateSession - Initiating flow session with party OU=Lender, O=Lender, L=UK, C=UK. Session id for tracing purposes is SessionId(toLong=8246766023731352611). {} [INFO ] 2018-06-20T04:45:18,276Z [Node thread-1] flow.[a4ab4833-4c8c-4bd6-80ee-f7c58057a2d0].initiateSession - Initiating flow session with party O=NetworkMapAndNotary, L=UK, C=UK. Session id for tracing purposes is SessionId(toLong=3705412054539601993). {} [INFO ] 2018-06-20T04:45:19,580Z [Node thread-1] persistence.HibernateConfiguration.makeSessionFactoryForSchemas - Creating session factory for schemas: [ObligationSchemaV1(name=net.corda.examples.ObligationSchema, version=1)] {} [INFO ] 2018-06-20T04:45:19,588Z [Node thread-1] internal.ConnectionProviderInitiator.initiateService - HHH000130: Instantiating explicit connection provider: net.corda.nodeapi.internal.persistence.HibernateConfiguration$NodeDatabaseConnectionProvider {} [INFO ] 2018-06-20T04:45:19,599Z [Node thread-1] dialect.Dialect. - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL94Dialect {} [INFO ] 2018-06-20T04:45:20,246Z [Node thread-1] internal.LobCreatorBuilderImpl.useContextualLobCreation - HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException {} [INFO ] 2018-06-20T04:45:20,249Z [Node thread-1] type.BasicTypeRegistry.register - HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@4fb64a52 {} [INFO ] 2018-06-20T04:45:20,250Z [Node thread-1] type.BasicTypeRegistry.register - HHH000270: Type registration [materialized_blob] overrides previous : org.hibernate.type.MaterializedBlobType@77083e41 {} [INFO ] 2018-06-20T04:45:20,329Z [Node thread-1] connections.access.getIsolatedConnection - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@2f25f745] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode. {} [INFO ] 2018-06-20T04:45:20,367Z [Node thread-1] persistence.HibernateConfiguration.makeSessionFactoryForSchemas - Created session factory for schemas: [ObligationSchemaV1(name=net.corda.examples.ObligationSchema, version=1)] {} [INFO ] 2018-06-20T04:45:20,500Z [Node thread-1] persistence.HibernateConfiguration.makeSessionFactoryForSchemas - Creating session factory for schemas: [VaultSchemaV1(name=net.corda.node.services.vault.VaultSchema, version=1)] {} [INFO ] 2018-06-20T04:45:20,503Z [Node thread-1] internal.ConnectionProviderInitiator.initiateService - HHH000130: Instantiating explicit connection provider: net.corda.nodeapi.internal.persistence.HibernateConfiguration$NodeDatabaseConnectionProvider {} [INFO ] 2018-06-20T04:45:20,510Z [Node thread-1] dialect.Dialect. - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL94Dialect {} [INFO ] 2018-06-20T04:45:20,523Z [Node thread-1] internal.LobCreatorBuilderImpl.useContextualLobCreation - HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException {} [INFO ] 2018-06-20T04:45:20,526Z [Node thread-1] type.BasicTypeRegistry.register - HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@4fb64a52 {} [INFO ] 2018-06-20T04:45:20,526Z [Node thread-1] type.BasicTypeRegistry.register - HHH000270: Type registration [materialized_blob] overrides previous : org.hibernate.type.MaterializedBlobType@77083e41 {} [INFO ] 2018-06-20T04:45:20,582Z [Node thread-1] connections.access.getIsolatedConnection - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@aac1e28] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode. {} [WARN ] 2018-06-20T04:45:20,607Z [Node thread-1] spi.SqlExceptionHelper.logExceptions - SQL Error: 0, SQLState: 42883 {} [ERROR] 2018-06-20T04:45:20,608Z [Node thread-1] spi.SqlExceptionHelper.logExceptions - ERROR: function information_schema._pg_expandarray(int2vector) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 930 {} [WARN ] 2018-06-20T04:45:20,615Z [Node thread-1] flow.[a4ab4833-4c8c-4bd6-80ee-f7c58057a2d0].run - Terminated by unexpected exception {} rx.exceptions.OnErrorNotImplementedException: Error accessing index information: public.vault_linear_states at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:386) ~[rxjava-1.2.4.jar:1.2.4] at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:383) ~[rxjava-1.2.4.jar:1.2.4] at rx.internal.util.ActionSubscriber.onError(ActionSubscriber.java:44) ~[rxjava-1.2.4.jar:1.2.4] at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:153) ~[rxjava-1.2.4.jar:1.2.4] at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115) ~[rxjava-1.2.4.jar:1.2.4] at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:216) ~[rxjava-1.2.4.jar:1.2.4] at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139) ~[rxjava-1.2.4.jar:1.2.4] at rx.subjects.PublishSubject$PublishSubjectProducer.onNext(PublishSubject.java:304) ~[rxjava-1.2.4.jar:1.2.4] at rx.subjects.PublishSubject$PublishSubjectState.onNext(PublishSubject.java:219) ~[rxjava-1.2.4.jar:1.2.4] at rx.subjects.PublishSubject.onNext(PublishSubject.java:72) ~[rxjava-1.2.4.jar:1.2.4] at rx.internal.util.ObserverSubscriber.onNext(ObserverSubscriber.java:34) ~[rxjava-1.2.4.jar:1.2.4] at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134) ~[rxjava-1.2.4.jar:1.2.4] at rx.subjects.PublishSubject$PublishSubjectProducer.onNext(PublishSubject.java:304) ~[rxjava-1.2.4.jar:1.2.4] at rx.subjects.PublishSubject$PublishSubjectState.onNext(PublishSubject.java:219) ~[rxjava-1.2.4.jar:1.2.4] at rx.subjects.PublishSubject.onNext(PublishSubject.java:72) ~[rxjava-1.2.4.jar:1.2.4] at net.corda.node.services.vault.NodeVaultService.processAndNotify(NodeVaultService.kt:203) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.vault.NodeVaultService.access$processAndNotify(NodeVaultService.kt:47) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.vault.NodeVaultService$notifyAll$1.invoke(NodeVaultService.kt:116) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.vault.NodeVaultService.notifyAll(NodeVaultService.kt:126) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.recordTransactions(ServiceHubInternal.kt:118) ~[corda-node-corda-3.0.jar:?] at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl$recordTransactions$1.invoke(AbstractNode.kt:811) ~[corda-node-corda-3.0.jar:?] at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl$recordTransactions$1.invoke(AbstractNode.kt:772) ~[corda-node-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:132) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:120) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:127) ~[corda-node-api-corda-3.0.jar:?] at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.recordTransactions(AbstractNode.kt:810) ~[corda-node-corda-3.0.jar:?] at net.corda.core.node.ServiceHub$DefaultImpls.recordTransactions(ServiceHub.kt:201) ~[corda-core-corda-3.0.jar:?] at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.recordTransactions(ServiceHubInternal.kt) ~[corda-node-corda-3.0.jar:?] at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.recordTransactions(AbstractNode.kt:772) ~[corda-node-corda-3.0.jar:?] at net.corda.core.node.ServiceHub$DefaultImpls.recordTransactions(ServiceHub.kt:193) ~[corda-core-corda-3.0.jar:?] at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.recordTransactions(ServiceHubInternal.kt) ~[corda-node-corda-3.0.jar:?] at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.recordTransactions(AbstractNode.kt:772) ~[corda-node-corda-3.0.jar:?] at net.corda.core.flows.FinalityFlow.notariseAndRecord(FinalityFlow.kt:78) ~[corda-core-corda-3.0.jar:?] at net.corda.core.flows.FinalityFlow.call(FinalityFlow.kt:56) ~[corda-core-corda-3.0.jar:?] at net.corda.core.flows.FinalityFlow.call(FinalityFlow.kt:28) ~[corda-core-corda-3.0.jar:?] at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:290) ~[corda-core-corda-3.0.jar:?] at net.corda.examples.obligation.flows.IssueObligation$Initiator.call(IssueObligation.kt:71) ~[obligation-0.1.jar:?] at net.corda.examples.obligation.flows.IssueObligation$Initiator.call(IssueObligation.kt:21) ~[obligation-0.1.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_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-corda-3.0.jar:?] Caused by: org.hibernate.exception.SQLGrammarException: Error accessing index information: public.vault_linear_states at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.convertSQLException(InformationExtractorJdbcDatabaseMetaDataImpl.java:98) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes(InformationExtractorJdbcDatabaseMetaDataImpl.java:751) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.extract.internal.TableInformationImpl.indexes(TableInformationImpl.java:122) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.extract.internal.TableInformationImpl.getIndex(TableInformationImpl.java:138) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.findMatchingIndex(AbstractSchemaMigrator.java:340) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applyIndexes(AbstractSchemaMigrator.java:324) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.performTablesMigration(GroupedSchemaMigratorImpl.java:84) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:203) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:110) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:183) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:309) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:445) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at net.corda.nodeapi.internal.persistence.HibernateConfiguration.buildSessionFactory(HibernateConfiguration.kt:113) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.HibernateConfiguration.makeSessionFactoryForSchemas(HibernateConfiguration.kt:63) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.HibernateConfiguration.access$makeSessionFactoryForSchemas(HibernateConfiguration.kt:26) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.HibernateConfiguration$sessionFactoryForSchemas$1.apply(HibernateConfiguration.kt:44) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.HibernateConfiguration$sessionFactoryForSchemas$1.apply(HibernateConfiguration.kt:26) ~[corda-node-api-corda-3.0.jar:?] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[?:1.8.0_171] at net.corda.nodeapi.internal.persistence.HibernateConfiguration.sessionFactoryForSchemas(HibernateConfiguration.kt:44) ~[corda-node-api-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver.persistStatesWithSchema$node(HibernateObserver.kt:55) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver.persist(HibernateObserver.kt:50) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver.access$persist(HibernateObserver.kt:29) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver$Companion$install$1.call(HibernateObserver.kt:34) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver$Companion$install$1.call(HibernateObserver.kt:30) ~[corda-node-corda-3.0.jar:?] at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39) ~[rxjava-1.2.4.jar:1.2.4] at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134) ~[rxjava-1.2.4.jar:1.2.4] ... 44 more Caused by: org.postgresql.util.PSQLException: ERROR: function information_schema._pg_expandarray(int2vector) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 930 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2477) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2190) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:287) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:264) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:231) ~[postgresql-42.1.4.jar:42.1.4] at org.postgresql.jdbc.PgDatabaseMetaData.getIndexInfo(PgDatabaseMetaData.java:2334) ~[postgresql-42.1.4.jar:42.1.4] at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes(InformationExtractorJdbcDatabaseMetaDataImpl.java:711) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.extract.internal.TableInformationImpl.indexes(TableInformationImpl.java:122) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.extract.internal.TableInformationImpl.getIndex(TableInformationImpl.java:138) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.findMatchingIndex(AbstractSchemaMigrator.java:340) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applyIndexes(AbstractSchemaMigrator.java:324) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.performTablesMigration(GroupedSchemaMigratorImpl.java:84) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:203) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:110) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:183) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:309) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:445) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final] at net.corda.nodeapi.internal.persistence.HibernateConfiguration.buildSessionFactory(HibernateConfiguration.kt:113) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.HibernateConfiguration.makeSessionFactoryForSchemas(HibernateConfiguration.kt:63) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.HibernateConfiguration.access$makeSessionFactoryForSchemas(HibernateConfiguration.kt:26) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.HibernateConfiguration$sessionFactoryForSchemas$1.apply(HibernateConfiguration.kt:44) ~[corda-node-api-corda-3.0.jar:?] at net.corda.nodeapi.internal.persistence.HibernateConfiguration$sessionFactoryForSchemas$1.apply(HibernateConfiguration.kt:26) ~[corda-node-api-corda-3.0.jar:?] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[?:1.8.0_171] at net.corda.nodeapi.internal.persistence.HibernateConfiguration.sessionFactoryForSchemas(HibernateConfiguration.kt:44) ~[corda-node-api-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver.persistStatesWithSchema$node(HibernateObserver.kt:55) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver.persist(HibernateObserver.kt:50) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver.access$persist(HibernateObserver.kt:29) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver$Companion$install$1.call(HibernateObserver.kt:34) ~[corda-node-corda-3.0.jar:?] at net.corda.node.services.schema.HibernateObserver$Companion$install$1.call(HibernateObserver.kt:30) ~[corda-node-corda-3.0.jar:?] at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39) ~[rxjava-1.2.4.jar:1.2.4] at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134) ~[rxjava-1.2.4.jar:1.2.4] ... 44 more
答案 0 :(得分:1)
Corda 3.x中的Postgres支持是社区提供的一项实验性功能,我想知道您是否遇到过bug(或某些与Postgres版本相关的问题)。日志中的这一行提示:
[ERROR] 2018-06-20T04:45:20,608Z [Node thread-1] spi.SqlExceptionHelper.logExceptions - ERROR: function information_schema._pg_expandarray(int2vector) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Position: 930 {}
功能不存在?版本问题?
然后出现有关索引的错误:听起来好像数据没有正确保存。
如果您使用H2,您的应用程序可以工作吗?