Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-11016

[camel-jbpm] RHPAM spring-boot server is not working with FUSE BOM

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Critical
    • None
    • fuse-7.4-GA
    • Camel
    • None
    • % %

    Description

      I am testing camel-jbpm component. As you can see in component documentation (consumer part) this component should be installed directly to the RHPAM server.

      1) I have created my application using https://start.jbpm.org/ (as suggested in RHPAM documentation)
      2) modified project pom.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.company</groupId>
        <artifactId>business-application-service</artifactId>
        <version>1.0-SNAPSHOT</version>
        <packaging>jar</packaging>
        <name>business-application-service</name>
      
        <parent>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-parent</artifactId>
          <version>2.1.1.RELEASE</version>
        </parent>
      
        <properties>
          <version.org.kie>7.18.0.Final-redhat-00004</version.org.kie>
          <maven.compiler.target>1.8</maven.compiler.target>
          <maven.compiler.source>1.8</maven.compiler.source>
          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
          <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
          <narayana.version>5.9.0.Final</narayana.version>
          <fabric8.version>3.5.40</fabric8.version>
        </properties>
      
      
      <dependencyManagement>
      		<dependencies>
      			<dependency>
      				<groupId>org.jboss.redhat-fuse</groupId>
      				<artifactId>fuse-springboot-bom</artifactId>
      				<version>7.4.0.fuse-sb2-740006-redhat-00002</version>
      				<type>pom</type>
      				<scope>import</scope>
      			</dependency>
      		</dependencies>
      	</dependencyManagement>
      
        <dependencies>
          
          <dependency>
          <groupId>org.kie</groupId>
          <artifactId>kie-server-spring-boot-starter</artifactId>
          <version>${version.org.kie}</version>
          </dependency>
          <dependency>
      			<groupId>org.apache.camel</groupId>
      			<artifactId>camel-jbpm</artifactId>
      		</dependency>
      		<dependency>
      			<groupId>org.apache.camel</groupId>
      			<artifactId>camel-spring-boot-starter</artifactId>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
          </dependency>
        </dependencies>
      
        <build>
          <plugins>
            <plugin>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-maven-plugin</artifactId>
              
            </plugin>
          </plugins>
        </build>
      
        <profiles>  
          
      <profile>
        <id>h2</id>
        <activation>
          <activeByDefault>true</activeByDefault>
        </activation>
        <dependencies>
          <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
          </dependency>
        </dependencies>
      </profile>
        </profiles>
      
        <repositories>    
          <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
            <releases>
              <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
              <updatePolicy>daily</updatePolicy>
            </snapshots>
          </repository>
        </repositories>
      </project>
      

      3) mvn clean install && java -jar target/business-application-service-1.0-SNAPSHOT.jar

      Once I added fuse-springboot-bom application starts throwing following exception:

      Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
      2019-07-08 11:08:58.256 ERROR 15661 --- [           main] o.s.boot.SpringApplication               : Application run failed
      
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kie.server.springboot.autoconfiguration.KieServerAutoConfiguration': Injection of autowired dependencies failed; nested exception is java.lang.IllegalAccessError: tried to access method org.springframework.core.convert.TypeDescriptor.<init>(Lorg/springframework/core/ResolvableType;Ljava/lang/Class;[Ljava/lang/annotation/Annotation;)V from class org.springframework.beans.factory.config.DependencyDescriptor
              at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:380) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1395) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]
              at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]
              at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]
              at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]
              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]
              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.1.RELEASE.jar!/:2.1.1.RELEASE]
              at com.company.service.Application.main(Application.java:10) [classes!/:1.0-SNAPSHOT]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]
              at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [business-application-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
              at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [business-application-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
              at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [business-application-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
              at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [business-application-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
      Caused by: java.lang.IllegalAccessError: tried to access method org.springframework.core.convert.TypeDescriptor.<init>(Lorg/springframework/core/ResolvableType;Ljava/lang/Class;[Ljava/lang/annotation/Annotation;)V from class org.springframework.beans.factory.config.DependencyDescriptor
              at org.springframework.beans.factory.config.DependencyDescriptor.getTypeDescriptor(DependencyDescriptor.java:330) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1195) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
              ... 25 common frames omitted
      

      Attachments

        Activity

          People

            acosenti Andrea Cosentino
            jbouska@redhat.com Jan Bouska
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: