Nasty NullPointerException in org.springframework.beans.factory.BeanDefinitionStoreException

I had a lot of trouble with Camel 2.9.2/Spring 3.0.7 projects lately (though the issue is related to Spring, not Camel). During development, a lot of server starts (I used VMware vFabric tc Server Developer Edition v2.7, but others seem to be affected as well) failed with a really nasty exception:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [spring/camel-context.xml]; nested exception is java.lang.NullPointerException

Stopping and starting sometimes helped, but often a couple of restarts were necessary to get everything working. The solution was to omit jaxb-impl version 2.2.4-1 in the Maven configuration by replacing it with the following dependency (exactly this version):


<dependency>
 <groupId>com.sun.xml.bind</groupI>
 <artifactId>jaxb-impl</artifactId>
 <version>2.2.3</version>
</dependency>


Posted

in

by

Tags: