[ 
https://issues.apache.org/jira/browse/CAMEL-8667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Love updated CAMEL-8667:
------------------------------
    Description: 
I am getting a NPE with camel spring unit testing.  I am trying to convert 
https://github.com/apache/camel/blob/master/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/unmarshall/simple/trim/BindySimpleFixedLengthUnmarshallTest.java
 to pure annotations ... and I am getting a NPE ... 

I am using:
{code:java}
@ContextConfiguration()
@RunWith(SpringJUnit4ClassRunner.class)
@BoostrapWith(CamelTestContextBootstrapper.class)
{code}

Here is my stack trace.

{code:java}
Caused by: java.lang.NullPointerException: null
        at 
org.apache.camel.test.spring.CamelSpringTestContextLoader.cleanup(CamelSpringTestContextLoader.java:174)
        at 
org.apache.camel.test.spring.CamelSpringTestContextLoader.loadContext(CamelSpringTestContextLoader.java:86)
        at 
org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)
        at 
org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)
        at 
org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)
{code}

I will update will the code from my unit test when I can get on to my dev 
server.

  was:
I am getting a NPE with camel spring unit testing.

<code>
Caused by: java.lang.NullPointerException: null
        at 
org.apache.camel.test.spring.CamelSpringTestContextLoader.cleanup(CamelSpringTestContextLoader.java:174)
        at 
org.apache.camel.test.spring.CamelSpringTestContextLoader.loadContext(CamelSpringTestContextLoader.java:86)
        at 
org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)
        at 
org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)
        at 
org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)
</code>


> java.lang.NullPointerException CamelSpringTestContextLoader.java:174
> --------------------------------------------------------------------
>
>                 Key: CAMEL-8667
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8667
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring
>    Affects Versions: 2.15.1
>            Reporter: Chris Love
>
> I am getting a NPE with camel spring unit testing.  I am trying to convert 
> https://github.com/apache/camel/blob/master/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/unmarshall/simple/trim/BindySimpleFixedLengthUnmarshallTest.java
>  to pure annotations ... and I am getting a NPE ... 
> I am using:
> {code:java}
> @ContextConfiguration()
> @RunWith(SpringJUnit4ClassRunner.class)
> @BoostrapWith(CamelTestContextBootstrapper.class)
> {code}
> Here is my stack trace.
> {code:java}
> Caused by: java.lang.NullPointerException: null
>       at 
> org.apache.camel.test.spring.CamelSpringTestContextLoader.cleanup(CamelSpringTestContextLoader.java:174)
>       at 
> org.apache.camel.test.spring.CamelSpringTestContextLoader.loadContext(CamelSpringTestContextLoader.java:86)
>       at 
> org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)
>       at 
> org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)
>       at 
> org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)
> {code}
> I will update will the code from my unit test when I can get on to my dev 
> server.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to