camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Karlsen <davidkarl...@gmail.com>
Subject Re: Problems prettyPrinting JSON after camel 2.14.0 upgrade
Date Sun, 21 Sep 2014 20:28:34 GMT
java.lang.IllegalStateException: Failed to load ApplicationContext

        at
org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:91)

        at
org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:74)

        at
org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:116)

        at
org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:82)

        at
org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:212)

        at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:199)

        at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:251)

        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

        at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:253)

        at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:216)

        at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:82)

        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

        at
org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60)

        at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

        at
org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:67)

        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)

        at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:162)

        at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)

        at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)

        at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:483)

        at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)

        at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)

        at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)

        at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)

        at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Caused by: org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
fetchFullAnalysisRoute at: >>>
Unmarshal[org.apache.camel.model.dataformat.JsonDataFormat@441fbe89] <<< in
route: Route(fetchFullAnalysisRoute)[[From[direct:fetchFullAnalysis...
because of Failed to set property: prettyPrint on:
org.apache.camel.component.jackson.JacksonDataFormat@4ed15347. Reason:
java.lang.IllegalArgumentException: Could not find a suitable setter for
property: prettyPrint as there isn't a setter method with same type: [null]
nor type conversion possible: null

        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1364)

        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:122)

        at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:327)

        at
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)

        at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)

        at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)

        at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)

        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)

        at
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125)

        at
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)

        at
org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:108)

        at
org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:260)

        at
org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:63)

        at
org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:83)

        ... 33 more

2014-09-20 19:05 GMT+02:00 Claus Ibsen <claus.ibsen@gmail.com>:

> Hi
>
> Don't you have more in the stacktrace or some other error? There is
> maybe some NPE that hides this error.
>
> On Fri, Sep 19, 2014 at 1:53 PM, David Karlsen <davidkarlsen@gmail.com>
> wrote:
> > With the config:
> > <camel:unmarshal>
> >                 <camel:json prettyPrint="true" library="Jackson" />
> >             </camel:unmarshal>
> >
> > I get:
> >
> > .. because of Failed to set property: prettyPrint on:
> > org.apache.camel.component.jackson.JacksonDataFormat@77ab22be. Reason:
> > java.lang.IllegalArgumentException: Could not find a suitable setter for
> > property: prettyPrint as there isn't a setter method with same type:
> [null]
> > nor type conversion possible: null
> >
> >         at
> >
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1364)
> >
> >         at
> >
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:122)
> >
> >         at
> >
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:327)
> >
> >         at
> >
> org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
> >
> >         at
> >
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
> >
> >         at
> >
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)
> >
> >         at
> >
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)
> >
> >         at
> >
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
> >
> >         at
> >
> org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125)
> >
> >         at
> >
> org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
> > after this upgrade:
> >
> > -    <camel.version>2.13.2</camel.version>
> >
> > +    <camel.version>2.14.0</camel.version>
> >
> >
> > jira https://issues.apache.org/jira/browse/CAMEL-7639 says it was fixed
> for
> > 2.14.0 - but it actually worked before on 2.13.2?
> > --
> > --
> > David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message