无法将camunda-bom添加到springboot项目

时间:2017-11-21 15:16:31

标签: java maven spring-boot pom.xml camunda

我试图使用springboot创建一个camunda应用程序,但我需要使用Spin Json Node,当我将依赖项添加到pom.xml时,当我将项目作为java应用程序运行时,它会给我这个错误:

  

org.springframework.context.ApplicationContextException:无法执行   启动嵌入式容器;嵌套异常是   org.springframework.boot.context.embedded.EmbeddedServletContainerException:   无法启动嵌入式Tomcat   org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)   〜[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] at   org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)   [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)   [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.SpringApplication.run(SpringApplication.java:303)   [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)   [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)   [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   br.com.ntconsult.camundaProject.app.CamundaSpringbootApplication.main(CamundaSpringbootApplication.java:9)   [classes /:na]引起:   org.springframework.boot.context.embedded.EmbeddedServletContainerException:   无法启动嵌入式Tomcat   org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:123)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer。(TomcatEmbeddedServletContainer.java:84)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:554)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:179)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at   org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] ... 8个常见帧   省略由:org.apache.catalina.LifecycleException:失败   启动组件[StandardServer [-1]] at   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] at   org.apache.catalina.startup.Tomcat.start(Tomcat.java:367)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] at   org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:99)   〜[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] ... 13个常见帧   省略由:org.apache.catalina.LifecycleException:失败   启动组件[StandardService [Tomcat]] at   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] at   org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] at   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] ...省略了15个常用帧   引起:org.apache.catalina.LifecycleException:无法启动   组件[StandardEngine [Tomcat]]在   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] at   org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] at   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] ...省略了17个常用帧   引起:org.apache.catalina.LifecycleException:一个子容器   在开始时失败了   org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] at   org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] at   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)   〜[tomcat-embed-core-8.5.20.jar:8.5.20] ...省略了19个常见框架

如果我从pom.xml中的dependencyManagement中删除camunda-bom,一切正常,但我不能使用像旋转json节点那样的东西。

我在github中创建了一个带有此错误的简单项目:https://github.com/jradesenv/camunda-springboot

1 个答案:

答案 0 :(得分:1)

您在GitHub上提供的项目在我的结束时完全正常,并按预期运行。你切掉了部分堆栈跟踪,所以我看不出根本原因。有什么东西阻止Tomcat开始 - 可能是一个已经使用过的端口?

PS:我们昨天发布了即将到来的Spring Boot原型的预览:https://github.com/camunda/camunda-archetypes/tree/master/camunda-archetype-spring-boot/ - 也可能是一个很好的起点。

仅供参考我的控制台(我只是拉了代码并运行它):

 ____                                 _         ____  ____  __  __
/ ___| __ _ _ __ ___  _   _ _ __   __| | __ _  | __ )|  _ \|  \/  |
| |   / _` | '_ ` _ \| | | | '_ \ / _` |/ _` | |  _ \| |_) | |\/| |
| |__| (_| | | | | | | |_| | | | | (_| | (_| | | |_) |  __/| |  | |
\____/\__,_|_| |_| |_|\__,_|_| |_|\__,_|\__,_| |____/|_|   |_|  |_|

  Spring-Boot:  (v1.5.7.RELEASE)
  Camunda BPM: (v7.8.0-alpha6)
  Camunda BPM Spring Boot Starter: (v2.3.0-alpha1)

2017-11-22 09:12:24.931  INFO 13404 --- [           main] b.c.n.c.a.CamundaSpringbootApplication   : Starting CamundaSpringbootApplication on LAPTOP-LFHA6NM6 with PID 13404 (C:\Temp\camunda-springboot-support\target\classes started by ruecker in C:\Temp\camunda-springboot-support)
2017-11-22 09:12:24.954  INFO 13404 --- [           main] b.c.n.c.a.CamundaSpringbootApplication   : No active profile set, falling back to default profiles: default
2017-11-22 09:12:25.052  INFO 13404 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@37918c79: startup date [Wed Nov 22 09:12:25 CET 2017]; root of context hierarchy
2017-11-22 09:12:26.624  INFO 13404 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-11-22 09:12:27.830  INFO 13404 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-11-22 09:12:27.854  INFO 13404 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2017-11-22 09:12:27.856  INFO 13404 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.20
2017-11-22 09:12:28.079  INFO 13404 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-11-22 09:12:28.080  INFO 13404 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3033 ms
2017-11-22 09:12:28.522  INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-11-22 09:12:28.567  INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-11-22 09:12:28.568  INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-11-22 09:12:28.568  INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-11-22 09:12:28.568  INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-11-22 09:12:29.118  INFO 13404 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@37918c79: startup date [Wed Nov 22 09:12:25 CET 2017]; root of context hierarchy
2017-11-22 09:12:29.232  INFO 13404 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-11-22 09:12:29.234  INFO 13404 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-11-22 09:12:29.264  INFO 13404 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Root mapping to handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
2017-11-22 09:12:29.287  INFO 13404 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.288  INFO 13404 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.288  INFO 13404 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/lib/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.288  INFO 13404 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/api/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.289  INFO 13404 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/app/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.359  INFO 13404 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.870  INFO 13404 --- [           main] org.camunda.bpm.spring.boot              : STARTER-SB040 Setting up jobExecutor with corePoolSize=3, maxPoolSize:10
2017-11-22 09:12:29.891  INFO 13404 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService  'camundaTaskExecutor'
2017-11-22 09:12:30.101  INFO 13404 --- [           main] org.camunda.bpm.engine.cfg               : ENGINE-12003 Plugin 'CompositeProcessEnginePlugin[genericPropertiesConfiguration, camundaProcessEngineConfiguration, camundaDatasourceConfiguration, camundaJobConfiguration, camundaHistoryConfiguration, camundaMetricsConfiguration, camundaAuthorizationConfiguration, camundaDeploymentConfiguration, failedJobConfiguration]' activated on process engine 'default'
2017-11-22 09:12:32.841  INFO 13404 --- [           main] org.camunda.bpm.spring.boot              : STARTER-SB021 Auto-Deploying resources: []
2017-11-22 09:12:36.911  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03016 Performing database operation 'create' on component 'engine' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.engine.sql'
2017-11-22 09:12:36.965  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03016 Performing database operation 'create' on component 'history' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.history.sql'
2017-11-22 09:12:36.993  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03016 Performing database operation 'create' on component 'identity' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.identity.sql'
2017-11-22 09:12:37.024  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03016 Performing database operation 'create' on component 'case.engine' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.case.engine.sql'
2017-11-22 09:12:37.037  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03016 Performing database operation 'create' on component 'case.history' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.case.history.sql'
2017-11-22 09:12:37.045  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03016 Performing database operation 'create' on component 'decision.engine' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.decision.engine.sql'
2017-11-22 09:12:37.068  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03016 Performing database operation 'create' on component 'decision.history' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.decision.history.sql'
2017-11-22 09:12:37.159  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03067 No history level property found in database
2017-11-22 09:12:37.159  INFO 13404 --- [           main] org.camunda.bpm.engine.persistence       : ENGINE-03065 Creating historyLevel property in database for level: HistoryLevelFull(name=full, id=3)
2017-11-22 09:12:37.171  INFO 13404 --- [           main] org.camunda.bpm.engine                   : ENGINE-00001 Process Engine default created.
2017-11-22 09:12:37.370  INFO 13404 --- [           main] o.c.b.s.b.s.w.f.LazyInitRegistration     : lazy initialized org.camunda.bpm.spring.boot.starter.webapp.filter.LazyProcessEnginesFilter@4e25e00f
2017-11-22 09:12:37.470  INFO 13404 --- [           main] o.c.b.s.b.s.w.f.LazyInitRegistration     : lazy initialized org.camunda.bpm.spring.boot.starter.webapp.filter.LazySecurityFilter@2097d719
2017-11-22 09:12:37.808  INFO 13404 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-11-22 09:12:37.934  INFO 13404 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-11-22 09:12:37.944  INFO 13404 --- [           main] org.camunda.bpm.engine.jobexecutor       : ENGINE-14014 Starting up the JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor].
2017-11-22 09:12:37.947  INFO 13404 --- [           main] b.c.n.c.a.CamundaSpringbootApplication   : Started CamundaSpringbootApplication in 13.493 seconds (JVM running for 14.344)
2017-11-22 09:12:37.949  INFO 13404 --- [ingJobExecutor]] org.camunda.bpm.engine.jobexecutor       : ENGINE-14018 JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor] starting to acquire jobs