SpringBoot2.0.3集成Activiti6.0.0报错

简介: SpringBoot2.0与Activiti6.0集成后抛出如下异常: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

SpringBoot2.0与Activiti6.0集成后抛出如下异常:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

[INFO ] 13:53:32.235 [restartedMain] o.s.b.a.l.ConditionEvaluationReportLoggingListener - 


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2018-07-31 13:53:32.286 ERROR 9714 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)

at com.asiainfo.BassWebApplication.main(BassWebApplication.java:19)

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:498)

at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)

at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)

at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)

at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)

at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)

at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)

at java.lang.Class.createAnnotationData(Class.java:3521)

at java.lang.Class.annotationData(Class.java:3510)

at java.lang.Class.createAnnotationData(Class.java:3526)

at java.lang.Class.annotationData(Class.java:3510)

at java.lang.Class.getAnnotation(Class.java:3415)

at java.lang.reflect.AnnotatedElement.isAnnotationPresent(AnnotatedElement.java:258)

at java.lang.Class.isAnnotationPresent(Class.java:3425)

at org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(AnnotatedElementUtils.java:573)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.isHandler(RequestMappingHandlerMapping.java:177)

at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:217)

at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:188)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:129)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)

... 21 common frames omitted


[ERROR] 13:53:32.286 [restartedMain] o.s.boot.SpringApplication - Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)

at com.asiainfo.BassWebApplication.main(BassWebApplication.java:19)

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:498)

at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)

at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)

at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)

at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)

at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)

at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)

at java.lang.Class.createAnnotationData(Class.java:3521)

at java.lang.Class.annotationData(Class.java:3510)

at java.lang.Class.createAnnotationData(Class.java:3526)

at java.lang.Class.annotationData(Class.java:3510)

at java.lang.Class.getAnnotation(Class.java:3415)

at java.lang.reflect.AnnotatedElement.isAnnotationPresent(AnnotatedElement.java:258)

at java.lang.Class.isAnnotationPresent(Class.java:3425)

at org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(AnnotatedElementUtils.java:573)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.isHandler(RequestMappingHandlerMapping.java:177)

at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:217)

at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:188)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:129)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)

... 21 common frames omitted



原因:springboot2.0不能与activiti6.0.0直接集成使用,因为activiti6.0.0出来的时候springboot2.0还没有出来,activiti6.0.0 支持springboot1.2.6以上,2.0.0以下的版本

解决方案:

解决方式:

1:将springboot2.0换成1.X版本

2:在springboot启动类上添加

@SpringBootApplication(exclude = SecurityAutoConfiguration.class)

即可,当然我们应该找找原因,为什么排除 SecurityAutoConfiguration 这个类就可以正常运行,原因就是springboot2.0的api与1.X版本有改变。通过源码可以看到 SecurityAutoConfiguration 类全线飘红,自然就会出现各种异常。

3:修改源码的集成问题,重新编译,比如SecurityAutoConfiguration 这个类我们可以看到

已经移到了servlet目录下,修改对应位置即可。

(注意:这只是举例,要修改的地方不止这一处,并且修改源码风险不小,慎行!!!)


说明:以上解决方案文章全部摘抄自:http://www.cnblogs.com/jvpBlog/p/9226755.html

我的解决方案;对activiti降低版本:5.22.0  然后测试也不行,最后还是使用的上述方法。@SpringBootApplication(exclude = SecurityAutoConfiguration.class)

最后的结论是还是解决不了,不知道网上的大神是怎么解决的,但是我试过了不行,搞不定,

我最后的解决方案是i;activiti7我使用了最新的版本,最后搞定:

<dependency> <groupId>org.activiti.cloud</groupId> <artifactId>activiti-cloud-starter-configure</artifactId> <version>7-201802-EA</version> </dependency>

相关文章
|
1月前
|
SQL 分布式计算 DataWorks
DataWorks报错问题之集成hive数据源报错如何解决
DataWorks是阿里云提供的一站式大数据开发与管理平台,支持数据集成、数据开发、数据治理等功能;在本汇总中,我们梳理了DataWorks产品在使用过程中经常遇到的问题及解答,以助用户在数据处理和分析工作中提高效率,降低难度。
|
1月前
|
运维 Kubernetes Nacos
nacos常见问题之集成nacos时 端口9848报错如何解决
Nacos是阿里云开源的服务发现和配置管理平台,用于构建动态微服务应用架构;本汇总针对Nacos在实际应用中用户常遇到的问题进行了归纳和解答,旨在帮助开发者和运维人员高效解决使用Nacos时的各类疑难杂症。
|
3月前
|
Java Nacos Docker
在集成nacos时,端口9848报错但服务器的这个端口是开放的
在集成nacos时,端口9848报错但服务器的这个端口是开放的【1月更文挑战第14天】【1月更文挑战第67篇】
209 1
|
2月前
|
SQL DataWorks 关系型数据库
DataWorks数据源问题之数据集成报错如何解决
DataWorks数据源是指DataWorks中配置的用于数据集成的外部数据源;本合集将讲解如何在DataWorks中配置和管理数据源,以及处理数据源连接和集成过程中的问题。
39 4
|
2月前
|
SQL DataWorks NoSQL
DataWorks数据源问题之数据集成任务报错如何解决
DataWorks数据源是指DataWorks中配置的用于数据集成的外部数据源;本合集将讲解如何在DataWorks中配置和管理数据源,以及处理数据源连接和集成过程中的问题。
37 5
|
4月前
|
Java 数据安全/隐私保护
Neo4j【付诸实践 01】SpringBoot集成报错org.neo4j.driver.exceptions.ClientException:服务器不支持此驱动程序支持的任何协议版本(解决+源代码)
Neo4j【付诸实践 01】SpringBoot集成报错org.neo4j.driver.exceptions.ClientException:服务器不支持此驱动程序支持的任何协议版本(解决+源代码)
67 1
|
4月前
|
监控 druid Java
Druid【SpringBoot集成】监控数据库报错 Failed to bind properties under ‘‘ to javax.sql.DataSource 解决(含配置源码)
Druid【SpringBoot集成】监控数据库报错 Failed to bind properties under ‘‘ to javax.sql.DataSource 解决(含配置源码)
226 0
|
Java
Springboot集成SpringCloud启动后Eureka报错
Springboot集成SpringCloud启动后Eureka报错
266 0
Springboot集成SpringCloud启动后Eureka报错
|
3月前
|
监控 Java BI
springboot集成积木报表项目springboot启动报错 Unable to load cache item
springboot集成积木报表项目springboot启动报错 Unable to load cache item
|
4月前
|
NoSQL MongoDB 数据库
MongoDB【部署 03】Windows系统安装mongodb并设置用户名密码(无需安装mongosh)及SpringBoot集成报错 Command failed with error 18
MongoDB【部署 03】Windows系统安装mongodb并设置用户名密码(无需安装mongosh)及SpringBoot集成报错 Command failed with error 18
134 0