Component camel-jsonpath gives error after adding to pom file

倖福魔咒の 提交于 2019-12-05 14:12:36

I posted this on the Camel nabble forum and indeed it seems you need to add the asm dependency to get it to work.

http://camel.465427.n5.nabble.com/Error-with-Camel-component-camel-jsonpath-td5777201.html

<dependency>
    <groupId>org.ow2.asm</groupId>
    <artifactId>asm-commons</artifactId>
    <version>5.0.3</version>
    <scope>runtime</scope>
</dependency> 

the pom.xml are about compile-time dependencies. You have a runtime error about a missing dependency (org.objectweb.asm). You should add it to your container.

In your stack traces : a new service is registered in a blueprint context. this service is then injected in another blueprint context. for this service, the blueprint container want to wrap it in a new proxy, and to create this kind of proxy, aries blueprint need org.objectweb.asm. i don't think this error is directly related to camel-jsonpath.

In my case, back when asm-commons with version 5.0.3 was used, I was still getting some error. As an altetrnative to previous answer, asm-all artifact can be used instead, since it includes other dependencies that in my scenario were breaking otherwise.

<dependency>
  <groupId>org.ow2.asm</groupId>
  <artifactId>asm-all</artifactId>
  <scope>runtime</scope>
</dependency>

However, regarding deployment, it seems quite impossible to integrate the project using this dependency to Fabric8 (no errors on console log and containers do not start), so not sure if there is a better alternative with a sort of camel-jsonpath feature.

Hope it helps someone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!