在Corda Enterprise 3上运行网络引导程序时出错

时间:2018-10-08 11:47:44

标签: corda

在使用SQL Server设置的Corda Enterprise 3.1上运行网络引导程序时出现错误。迁移SQL成功运行,并且在SQL Server上设置的架构中创建了新表。

能否请您说明可能是什么问题?我注意到我们的数据库名称中有“-”字符。那会是个问题吗?

  

[错误] 2018-10-05T06:17:52,269Z [main] internal.Node.run-异常   在节点启动期间{} javax.persistence.PersistenceException:   org.hibernate.exception.SQLGrammarException:无法提取   结果集           在org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1419)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.Query.getResultList(Query.java:427)〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.query.criteria.internal.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:72)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           位于net.corda.node.services.network.PersistentNetworkMapCache.getAllInfos(PersistentNetworkMapCache.kt:251)   〜[corda-node-3.1.jar :?]           位于net.corda.node.services.network.PersistentNetworkMapCache.access $ getAllInfos(PersistentNetworkMapCache.kt:89)   〜[corda-node-3.1.jar :?]           在net.corda.node.services.network.PersistentNetworkMapCache $ start $$ inlined $ synchronized $ lambda $ 1.invoke(PersistentNetworkMapCache.kt:113)   〜[corda-node-3.1.jar :?]           在net.corda.node.services.network.PersistentNetworkMapCache $ start $$ inlined $ synchronized $ lambda $ 1.invoke(PersistentNetworkMapCache.kt:89)   〜[corda-node-3.1.jar :?]           在net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:156)   〜[corda-node-api-3.1.jar :?]           在net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:136)   〜[corda-node-api-3.1.jar :?]           在net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:142)   〜[corda-node-api-3.1.jar :?]           在net.corda.node.services.network.PersistentNetworkMapCache.start(PersistentNetworkMapCache.kt:113)   〜[corda-node-3.1.jar :?]           在net.corda.node.internal.AbstractNode $ generateAndSaveNodeInfo $$ inlined $ use $ lambda $ 1.invoke(AbstractNode.kt:259)   〜[corda-node-3.1.jar :?]           在net.corda.node.internal.AbstractNode $ generateAndSaveNodeInfo $$ inlined $ use $ lambda $ 1.invoke(AbstractNode.kt:161)   〜[corda-node-3.1.jar :?]           位于net.corda.nodeapi.internal.persistence.CordaPersistence.inTopLevelTransaction(CordaPersistence.kt:173)   〜[corda-node-api-3.1.jar :?]           在net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:158)   〜[corda-node-api-3.1.jar :?]           在net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:136)   〜[corda-node-api-3.1.jar :?]           在net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:142)   〜[corda-node-api-3.1.jar :?]           在net.corda.node.internal.AbstractNode.generateAndSaveNodeInfo(AbstractNode.kt:255)   〜[corda-node-3.1.jar :?]           在net.corda.node.internal.Node.generateAndSaveNodeInfo(Node.kt:381)   〜[corda-node-3.1.jar :?]           在net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:203)   〜[corda-node-3.1.jar :?]           在net.corda.node.internal.NodeStartup.run(NodeStartup.kt:160)处[corda-node-3.1.jar :?]           在net.corda.node.Corda.main(Corda.kt:25)[corda-node-3.1.jar :?]的原因:   org.hibernate.exception.SQLGrammarException:无法提取   结果集           在org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:79)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.getResultSet(Loader.java:2123)〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1911)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1887)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.doQuery(Loader.java:932)〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.doList(Loader.java:2615)〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.doList(Loader.java:2598)〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2430)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.Loader.list(Loader.java:2425)〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:502)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:370)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.internal.SessionImpl.list(SessionImpl.java:1481)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1441)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           在org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1410)   〜[hibernate-core-5.2.6.Final.jar:5.2.6.Final]           ... 21更多原因:com.microsoft.sqlserver.jdbc.SQLServerException:附近的语法不正确   '-'。           在com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)   〜[mssql-jdbc-6.2.2.jre8.jar:?]

1 个答案:

答案 0 :(得分:1)

连字符-在SQL Server中不是标识符的有效字符,如果存在,则需要通过用双引号引起来对标识符进行转义。 Liquibase会检测到这一点并添加双引号(因此表可以正确创建),但是Corda不会并使用错误的语法发送SQL。解决方法是将架构名称更改为包含_而不是-