c7n 后端开发手册中的数据库初始化部分执行不通

  • Choerodon平台版本:0.6.0

  • 运行环境:自主搭建

  • 问题描述:

文档地址:http://choerodon.io/zh/docs/development-guide/backend/intergration/init/
文档章节: 开发手册 - 后端开发手册 - 测试与集成 - 数据初始化
运行 init-manager-service.sh 之后报 groovy.lang.MissingPropertyException: No such property: helper for class: org.liquibase.groovy.delegate.ChangeSetDelegate

完整的错误栈如下:


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.3.RELEASE)

2018-09-19 15:39:56.499  INFO 3305 --- [           main] io.choerodon.liquibase.LiquibaseTools    : Starting LiquibaseTools v0.5.2.RELEASE on rmbp.local with PID 3305 (/Users/eliuhy/my/choerodon/projects/ora-gzdc/choerodon-todo-service/bin/choerodon-tool-liquibase.jar started by eliuhy in /Users/eliuhy/my/choerodon/projects/ora-gzdc/choerodon-todo-service/tmp)
2018-09-19 15:39:56.504  INFO 3305 --- [           main] io.choerodon.liquibase.LiquibaseTools    : No active profile set, falling back to default profiles: default
2018-09-19 15:39:56.929  INFO 3305 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3bfdc050: startup date [Wed Sep 19 15:39:56 CST 2018]; root of context hierarchy
2018-09-19 15:39:58.295  WARN 3305 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2018-09-19 15:39:58.643  WARN 3305 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2018-09-19 15:40:01.046  INFO 3305 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-09-19 15:40:02.703  INFO 3305 --- [           main] liquibase                                : Successfully acquired change log lock
2018-09-19 15:40:03.478  INFO 3305 --- [           main] liquibase                                : Successfully released change log lock
2018-09-19 15:40:03.494 ERROR 3305 --- [           main] i.choerodon.liquibase.LiquibaseExecutor  : No such property: helper for class: org.liquibase.groovy.delegate.ChangeSetDelegate

groovy.lang.MissingPropertyException: No such property: helper for class: org.liquibase.groovy.delegate.ChangeSetDelegate
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307) ~[groovy-2.4.10.jar!/:2.4.10]
	at db.Script1$_run_closure1$_closure2.doCall(Script1.groovy:5) ~[na:na]
	at db.Script1$_run_closure1$_closure2.doCall(Script1.groovy) ~[na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.liquibase.groovy.delegate.DatabaseChangeLogDelegate.changeSet(DatabaseChangeLogDelegate.groovy:115) ~[liquibase-groovy-dsl-1.2.2.jar!/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174) ~[groovy-2.4.10.jar!/:2.4.10]
	at db.Script1$_run_closure1.doCall(Script1.groovy:4) ~[na:na]
	at db.Script1$_run_closure1.doCall(Script1.groovy) ~[na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) ~[groovy-2.4.10.jar!/:2.4.10]
	at liquibase.parser.ext.GroovyLiquibaseChangeLogParser.processDatabaseChangeLogRootElement(GroovyLiquibaseChangeLogParser.groovy:136) ~[liquibase-groovy-dsl-1.2.2.jar!/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182) ~[groovy-2.4.10.jar!/:2.4.10]
	at liquibase.parser.ext.GroovyLiquibaseChangeLogParser$_getChangeLogMethodMissing_closure3.doCall(GroovyLiquibaseChangeLogParser.groovy:93) ~[liquibase-groovy-dsl-1.2.2.jar!/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod.invoke(ClosureMetaMethod.java:84) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:944) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1267) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1220) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1125) ~[groovy-2.4.10.jar!/:2.4.10]
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174) ~[groovy-2.4.10.jar!/:2.4.10]
	at db.Script1.run(Script1.groovy:3) ~[na:na]
	at db.Script1$run.call(Unknown Source) ~[na:na]
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) ~[groovy-2.4.10.jar!/:2.4.10]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) ~[groovy-2.4.10.jar!/:2.4.10]
	at liquibase.parser.ext.GroovyLiquibaseChangeLogParser.parse(GroovyLiquibaseChangeLogParser.groovy:64) ~[liquibase-groovy-dsl-1.2.2.jar!/:na]
	at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:229) ~[liquibase-core-3.5.3.jar!/:na]
	at liquibase.Liquibase.update(Liquibase.java:202) ~[liquibase-core-3.5.3.jar!/:na]
	at liquibase.Liquibase.update(Liquibase.java:192) ~[liquibase-core-3.5.3.jar!/:na]
	at liquibase.Liquibase.update(Liquibase.java:188) ~[liquibase-core-3.5.3.jar!/:na]
	at io.choerodon.liquibase.LiquibaseExecutor.load(LiquibaseExecutor.java:236) ~[classes!/:0.5.2.RELEASE]
	at io.choerodon.liquibase.LiquibaseExecutor.simpleExec(LiquibaseExecutor.java:181) ~[classes!/:0.5.2.RELEASE]
	at io.choerodon.liquibase.LiquibaseExecutor.run(LiquibaseExecutor.java:77) ~[classes!/:0.5.2.RELEASE]
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:776) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:760) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:747) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at io.choerodon.liquibase.LiquibaseTools.main(LiquibaseTools.java:16) [classes!/:0.5.2.RELEASE]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [choerodon-tool-liquibase.jar:0.5.2.RELEASE]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [choerodon-tool-liquibase.jar:0.5.2.RELEASE]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [choerodon-tool-liquibase.jar:0.5.2.RELEASE]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [choerodon-tool-liquibase.jar:0.5.2.RELEASE]

2018-09-19 15:40:03.496 ERROR 3305 --- [           main] i.choerodon.liquibase.LiquibaseExecutor  : 数据库初始化任务失败
2018-09-19 15:40:03.497  INFO 3305 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@3bfdc050: startup date [Wed Sep 19 15:39:56 CST 2018]; root of context hierarchy
2018-09-19 15:40:03.499  INFO 3305 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

而且文档中让执行的脚本命令是不是也不对啊?不是应该执行 init-manager-service.sh 吗?

你好,麻烦提供一下工具包的版本,和初始化服务的版本。文档的错误我们修复一下

你好,工具包版本是:0.5.2.RELEASE

如果iam-service 和 manager-service 是拉取的master分支代码。可以下载最新的工具包0.6.2.RELEASE。

目前文档上给的连接指向0.5.2的:http://choerodon.io/zh/docs/development-guide/backend/demo/init_db/

0.6.2 工具包的下载地址可以提供一下吗?谢谢

我们会尽快修复文档的错误的

下载链接:
https://oss.sonatype.org/content/groups/public/io/choerodon/choerodon-tool-liquibase/0.6.2.RELEASE/choerodon-tool-liquibase-0.6.2.RELEASE.jar

好的,谢谢。 刚刚试过 0.6.2 版本的工具包并不会报错。