I am trying a simple JAXB marshaling in my JUit test class and I am using Java 5. I get this error while running the test.
javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.XMLOutputFactoryBase not found
I have added the following dependencies in my pom.
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jsr173</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
</dependency>
any help on this issue is highly appreciated.
From the dependency list above, it looks like you are using jsr173 - steaming API for XML. The dependency you have specified just provides the API. You need to add a provider which implements this. The default provider that it looks for, if it does not find any is the bea implementation. Hence the error.
Here is a discussion on this. You could add the bea implementation or alternate ones like woodstox.