Ok, I found the source of the dual json-smart versions. My pom.xml listed:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jsonpath</artifactId>
<version>${camel.version}</version>
</dependency>
And that was pulling in json-path 0.9.1 which pulled in json-smart 1.2.
Once I removed the above camel-jsonpath dependency the older json-path is not
pulled any longer. That problem is gone. Now I have a context problem in its
place :-( I will research that.
Thank you for your help,
-Steve Huston
From: Steve Huston
Sent: Tuesday, August 25, 2015 2:43 PM
To: 'Aki Yoshida-3 [via Camel]' <[email protected]>
Subject: RE: NoClassDefFoundError: net/minidev/json/parser/ContainerFactory
Thank you, Aki. I'm following this trail. For now, I've found that something in
my dependencies is pulling in both net.minidev.json-smart 1.2 and 2.1.1 - since
I don't list json-smart explicitly, I'll need to chase through the others to
find the mismatch.
From: Aki Yoshida-3 [via Camel]
[mailto:[email protected]]
Sent: Tuesday, August 25, 2015 8:56 AM
To: Steve Huston <[email protected]>
Subject: Re: NoClassDefFoundError: net/minidev/json/parser/ContainerFactory
you should check your project dependency to see which jayway you have.
you seem to have some old version of jayway that is expecting json-smart-1.3.x.
2015-08-24 17:00 GMT+02:00 shuston <[hidden email]>:
> This is for Camel 2.15.3 (also had the problem with 2.15.2)
>
> I am a new Camel user, and trying to use jsonpath. I have in my pom.xml:
>
> <dependency>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-jsonpath</artifactId>
> <version>${camel.version}</version>
> </dependency>
>
> In my XML config, I have:
> <route>
> <from uri="seda:from_rraa"/>
> <process ref="issPreprocessor"/>
> <choice>
> <when>
> <jsonpath>$.header[?(@.name ==
> "VerifyEmployeeRequest")]</jsonpath>
> <unmarshal ref="VerifyEmployeeRequest"/>
> </when>
> </choice>
>
> <process ref="crewMock"/>
> <to uri="seda:to_rraa"/>
> </route>
>
> I get at runtime (mvn test):
>
> java.lang.NoClassDefFoundError: net/minidev/json/parser/ContainerFactory
> at
> com.jayway.jsonpath.spi.impl.JsonSmartJsonProvider.<init>(JsonSmartJsonProvider.java:38)
>
> at
> com.jayway.jsonpath.spi.impl.JsonSmartJsonProvider.<init>(JsonSmartJsonProvider.java:41)
>
> at
> com.jayway.jsonpath.spi.JsonProviderFactory.<clinit>(JsonProviderFactory.java:24)
>
> at
> com.jayway.jsonpath.Configuration.defaultConfiguration(Configuration.java:62)
> at
> org.apache.camel.jsonpath.JsonPathEngine.<init>(JsonPathEngine.java:41)
> at
> org.apache.camel.jsonpath.JsonPathExpression.<init>(JsonPathExpression.java:33)
>
> at
> org.apache.camel.jsonpath.JsonPathLanguage.createPredicate(JsonPathLanguage.java:27)
>
> ...
>
> I tried adding this to my pom.xml:
> <dependency>
> <groupId>net.minidev</groupId>
> <artifactId>json-smart</artifactId>
> <version>2.1.1</version>
> </dependency>
>
> But that did not help.
>
> Can someone please help steer me in the right direction?
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/NoClassDefFoundError-net-minidev-json-parser-ContainerFactory-tp5770943.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
________________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/NoClassDefFoundError-net-minidev-json-parser-ContainerFactory-tp5770943p5770969.html
To unsubscribe from NoClassDefFoundError:
net/minidev/json/parser/ContainerFactory, click here.
NAML
--
View this message in context:
http://camel.465427.n5.nabble.com/NoClassDefFoundError-net-minidev-json-parser-ContainerFactory-tp5770943p5770976.html
Sent from the Camel - Users mailing list archive at Nabble.com.