[
https://issues.apache.org/jira/browse/CAMEL-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-9623.
--------------------------------
Resolution: Invalid
Assignee: Claus Ibsen
Fix Version/s: 2.17.0
You are mixing up 2.17 with 2.16.2.
For 2.16.x or older you need to tell the run plugin that its blueprint with
<configuration>
<useCDI>true</useCDI>
</configuration>
>From 2.17 onwards it can auto detect this.
> camel-example-swagger-cdi does not run
> --------------------------------------
>
> Key: CAMEL-9623
> URL: https://issues.apache.org/jira/browse/CAMEL-9623
> Project: Camel
> Issue Type: Bug
> Affects Versions: 2.16.2
> Reporter: Ralf Steppacher
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.17.0
>
>
> I am trying to run the example {{camel-example-swagger-cdi}} as documented in
> the {{README.md}} but the goal {{camel:run}} fails:
> {noformat}
> Ralfs-MacBook-Pro:camel-example-swagger-cdi rsteppac$
> ~/dev/maven-3.2.1/bin/mvn -s ~/dev/git/vivatesmaven/settings-nexus.xml
> camel:run
> [..]
> [INFO] Using org.apache.camel.spring.Main to initiate a CamelContext
> [INFO] Starting Camel ...
> [ERROR] *************************************
> [ERROR] Error occurred while running main from: org.apache.camel.spring.Main
> [ERROR]
> java.lang.ClassNotFoundException: org.apache.camel.spring.Main
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:455)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> In response I added {{camel-spring}} to the dependency list in the pom. Next
> run fails because no spring context is available:
> {noformat}
> Caused by: java.io.FileNotFoundException: class path resource
> [META-INF/spring/] cannot be resolved to URL because it does not exist
> at
> org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187)
> at
> org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:413)
> at
> org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:287)
> at
> org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1166)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
> ... 21 more
> {noformat}
> Indeed no spring context file is provided with the project.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)