生成";JHipster UML“;第二次

生成";JHipster UML“;第二次,jhipster,Jhipster,我正在尝试使用“JHipster UML”。我第一次在xmi文件上运行它时,它运行得很好。然后我修改了我的模式(使用GenMyModal),导出并在修改后的xmi文件上重新运行“JHipster UML”,然后重新启动。然后,我会在启动时出错。我漏了一步吗 Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; n

我正在尝试使用“JHipster UML”。我第一次在xmi文件上运行它时,它运行得很好。然后我修改了我的模式(使用GenMyModal),导出并在修改后的xmi文件上重新运行“JHipster UML”,然后重新启动。然后,我会在启动时出错。我漏了一步吗

Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:687)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
at com.mycompany.myapp.Application.main(Application.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
原因:

org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:98)
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:75)
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:378)
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:155)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:157)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)

... 10 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.setFilterChainProxySecurityConfigurer(org.springframework.security.config.annotation.ObjectPostProcessor,java.util.List) throws java.lang.Exception; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.security.core.userdetails.UserDetailsService com.mycompany.myapp.config.SecurityConfiguration.userDetailsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mycompany.myapp.repository.UserRepository com.mycompany.myapp.security.UserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Cannot create inner bean '(inner bean)#503a431e' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#503a431e': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/mycompany/myapp/config/DatabaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.ValidationFailedException: Validation Failed:

 2 change sets check sum
  classpath:config/liquibase/changelog/20151003011413_added_entity_Parent.xml::20151003011413::jhipster is now: 7:57b97f063aff9a9eb02142bd4831626b
  classpath:config/liquibase/changelog/20151003011413_added_entity_Child.xml::20151003011413::jhipster is now: 7:a7512c06e21d617c6aeaeba25d6a8051
org.springframework.boot.context.embedded.EmbeddedServletContainerException:无法启动嵌入式Tomcat
位于org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:98)
位于org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.(TomcatEmbeddedServletContainer.java:75)
位于org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.gettomcatembeddedservletContainerContainer(TomcatEmbeddedServletContainerFactory.java:378)
位于org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.GetEmbeddedServletContainerFactory(TomcatEmbeddedServletContainerFactory.java:155)
位于org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:157)
位于org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)
... 10多
原因:org.springframework.beans.factory.BeanCreationException:创建名为“org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration”的bean时出错:自动关联依赖项的注入失败;嵌套异常为org.springframework.beans.factory.BeanCreationException:无法自动连线方法:public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.SetFilterChainProxy SecurityConfigure(org.springframework.security.config.annotation.ObjectPostProcessor,java.util.List)抛出java.lang.Exception;嵌套异常为org.springframework.beans.factory.BeanExpressionException:表达式解析失败;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建名为“securityConfiguration”的bean时出错:自动连线依赖项的注入失败;嵌套异常为org.springframework.beans.factory.BeanCreationException:无法自动连接字段:private org.springframework.security.core.userdetails.userdetails服务com.mycompany.myapp.config.SecurityConfiguration.userdetails服务;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建名为“userDetailsService”的bean时出错:自动连线依赖项的注入失败;嵌套异常为org.springframework.beans.factory.BeanCreationException:无法自动连接字段:private com.mycompany.myapp.repository.UserRepository com.mycompany.myapp.security.UserDetailsService.UserRepository;嵌套异常为org.springframework.beans.factory.beancreatitionException:创建名为“userRepository”的bean时出错:在设置bean属性“entityManager”时无法创建[org.springframework.orm.jpa.SharedEntityManagerCreator]类型的内部bean(内部bean)#503a431e”;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建名为“(内部bean)#503a431e”的bean时出错:设置构造函数参数时无法解析对bean“entityManagerFactory”的引用;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建名为“liquibase”的bean时出错,该bean在类路径资源[com/mycompany/myapp/config/DatabaseConfiguration.class]:调用init方法失败;嵌套异常为liquibase.exception.ValidationFailedException:验证失败:
2变更集校验和
类路径:config/liquibase/changelog/20151003011413_added_entity_Parent.xml::20151003011413::jhipster现在是:7:57b97f063aff9ab02142bd4831626b
类路径:config/liquibase/changelog/20151003011413_added_entity_Child.xml::20151003011413::jhipster现在是:7:A7512C06E21D617C6AEBA25D6A8051

我想您没有在开发模式下使用H2数据库,因此这意味着数据库更改将被持久化,并且Liquibase发现您的更改日志的校验和与上次运行时记录的校验和不同,这是正确的。若你们想克服这个问题,你们必须放弃你们的模式,重新启动应用程序

当然,在dev中使用H2时没有这些问题

或者,您可以参考