Reputation: 16992
I having the below code in static method of my main class -
appContext = new ClassPathXmlApplicationContext(new String[] {
"classpath*:/META-INF/spring.xml",
"classpath*:contractbatchupdate-application-context.xml"
});
All the dependencies are specified by Maven. I am trying to run this class in eclipse as a java application and it is throwing the below error. I can see the jar file in the repository that is specified in the path listed in the error.
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/C:/Users/892893/.m2/repository/com/test/contract/Contract-Client/1.0-SNAPSHOT/Contract-Client-1.0-SNAPSHOT.jar!/META-INF/spring.xml]; nested exception is javax.xml.parsers.FactoryConfigurationError: Provider weblogic.xml.jaxp.RegistryDocumentBuilderFactory not found
Upvotes: 0
Views: 957
Reputation: 9697
Open up your .classpath file and check if the jar has gotten into your Project . You could also check this in Java-build-path --> Libraries in your eclipse . See your dependency has gotten into the .M2 folder . Check these all out . If the Jar dependency is in the pom and not in your classpath , do a mvn clean eclipse:eclipse, refresh classpath , do a eclipse - project-clean(Build automatically checked) and try .
Upvotes: 1
Reputation: 308938
You might see it in Maven, but the class loader doesn't see it in the CLASSPATH. Believe the exception - check your assumptions. That JAR isn't in the CLASSPATH.
Upvotes: 1