You need to use Spring Boot 1.3.x with Camel 2.17.x. Camel 2.18 will support SB 1.4
On Fri, Aug 19, 2016 at 12:55 PM, fxthomas <[email protected]> wrote: > hello, > > I have a camel spring application , which runs fine from eclipse using the > spring:run goal. But when i tried to execute it from command line using > java -jar , it does not run and throws the below error. I am using camel > 2.17.3 and spring boot 1.4.0 release. > > org.springframework.beans.factory.BeanDefinitionStoreException: Failed to > process import candidates for configuration class > [org.apache.camel.spring.boot.CamelAutoConfiguration]; nested exception is > java.lang.ClassCastException: java.lang.IndexOutOfBoundsException cannot be > cast to [Ljava.lang.Object; > at > org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:546) > ~[spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE] > at > org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:286) > ~[spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]. > > I even tried to exclude the CamelAutoConfiguration class from the > Enableautoconfiguration but it fails and says class not found. Inside the > Lib folder of the WAR i also see the jar present > camel-spring-boot-2.17.3.jar. > > It looks like some packaging issue for WAR, but I am not able to pinpoint > it. I even tried using the spring-boot-starter-parent but still same error. > > My pom.xml as below > > <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/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>com.boot</groupId> > <artifactId>wl-loader-boot</artifactId> > <packaging>war</packaging> > <version>0.0.1-SNAPSHOT</version> > <name>wl-loader-boot Webapp</name> > > > > <properties> > <camel.version>2.17.3</camel.version> > > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > <slf4j.version>1.7.21</slf4j.version> > <log4j.version>2.5</log4j.version> > <spring-boot-version>1.4.0.RELEASE</spring-boot-version> > <start-class>com.boot.DLBootApplication</start-class> > </properties> > > > > <dependencyManagement> > <dependencies> > <dependency> > <groupId>org.springframework.boot</groupId> > <artifactId>spring-boot-dependencies</artifactId> > <version>${spring-boot-version}</version> > <type>pom</type> > <scope>import</scope> > </dependency> > </dependencies> > </dependencyManagement> > > <dependencies> > > > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-spring-boot</artifactId> > <version>${camel.version}</version> > </dependency> > > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-jms</artifactId> > <version>${camel.version}</version> > </dependency> > > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-csv</artifactId> > <version>${camel.version}</version> > </dependency> > > <dependency> > <groupId>javax.jms</groupId> > <artifactId>jms</artifactId> > <version>1.1</version> > </dependency> > > <dependency> > <groupId>javax.jms</groupId> > <artifactId>javax.jms-api</artifactId> > <version>2.0</version> > </dependency> > > <dependency> > <groupId>org.springframework.boot</groupId> > <artifactId>spring-boot-starter-web</artifactId> > > </dependency> > > <dependency> > <groupId>org.springframework.boot</groupId> > <artifactId>spring-boot-starter-jdbc</artifactId> > > </dependency> > > > > > > <dependency> > <groupId>org.springframework.boot</groupId> > <artifactId>spring-boot-starter-actuator</artifactId> > > </dependency> > > > <dependency> > <groupId>org.springframework.boot</groupId> > <artifactId>spring-boot-starter-remote-shell</artifactId> > </dependency> > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-commands-spring-boot</artifactId> > <version>${camel.version}</version> > </dependency> > > > <dependency> > <groupId>org.springframework.boot</groupId> > <artifactId>spring-boot-starter-test</artifactId> > <scope>test</scope> > </dependency> > > > > <dependency> > <groupId>org.slf4j</groupId> > <artifactId>slf4j-api</artifactId> > <version>${slf4j.version}</version> > </dependency> > > > > <dependency> > <groupId>commons-dbcp</groupId> > <artifactId>commons-dbcp2</artifactId> > <version>2.1.1</version> > </dependency> > <dependency> > <groupId>org.apache.commons</groupId> > <artifactId>commons-pool2</artifactId> > </dependency> > <dependency> > <groupId>com.oracle</groupId> > <artifactId>ojdbc6</artifactId> > <version>11.2.0.3</version> > </dependency> > > > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <scope>test</scope> > </dependency> > > > > > > > <dependency> > <groupId>org.beanio</groupId> > <artifactId>beanio</artifactId> > <version>2.1.0</version> > </dependency> > > <dependency> > <groupId>org.apache.commons</groupId> > <artifactId>commons-lang3</artifactId> > <version>3.4</version> > </dependency> > > <dependency> > <groupId>commons-beanutils</groupId> > <artifactId>commons-beanutils</artifactId> > </dependency> > > > <dependency> > <groupId>com.ibm.mq.client</groupId> > <artifactId>mq-client</artifactId> > <version>8.0.0.4</version> > </dependency> > > </dependencies> > > > > <build> > > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>3.5.1</version> > <configuration> > <source>1.8</source> > <target>1.8</target> > </configuration> > </plugin> > > <plugin> > <groupId>org.springframework.boot</groupId> > <artifactId>spring-boot-maven-plugin</artifactId> > <configuration> > <mainClass>${start-class}</mainClass> > </configuration> > <executions> > <execution> > <goals> > <goal>repackage</goal> > </goals> > </execution> > </executions> > </plugin> > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-resources-plugin</artifactId> > <version>3.0.0</version> > <executions> > <execution> > <id>copy-resources</id> > > <phase>validate</phase> > <goals> > > <goal>copy-resources</goal> > </goals> > <configuration> > > <outputDirectory>${basedir}/src/main/resources</outputDirectory> > <resources> > <resource> > > <directory>src/main/config</directory> > > <includes> > > <include>application.yml</include> > > </includes> > > <filtering>true</filtering> > </resource> > </resources> > </configuration> > </execution> > </executions> > </plugin> > > > <plugin> > <artifactId>maven-war-plugin</artifactId> > <version>2.6</version> > <configuration> > > <failOnMissingWebXml>false</failOnMissingWebXml> > <attachClasses>true</attachClasses> > </configuration> > </plugin> > > > > </plugins> > </build> > </project> > > > > > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-Spring-boot-WAR-not-executing-tp5786638.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
