Writing a test class for the one of the OSGI service using JAXBContext which came with aem-sdk. When executing the service JAXBContext is getting invoked perfectly.. But, from the test class when is calling same line of the actual class its throwing "javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory] " in Intellij Debug. Any suggestions, how can I resolve this issue..
Solved! Go to Solution.
Views
Replies
Total Likes
@KeerthiDundi Could be dependency issue with Intellij, please check the below conversation in Intellij for the same and the solution offered.
https://youtrack.jetbrains.com/issue/IDEA-199578
@KeerthiDundi Could be dependency issue with Intellij, please check the below conversation in Intellij for the same and the solution offered.
https://youtrack.jetbrains.com/issue/IDEA-199578
@KeerthiDundi Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hello everyone,
I added these dependencies in core/pom.xml file.
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.2</version>
<scope>test</scope>
</dependency>
Also I invalidate the cache of the intellij. This worked for me. Thank you.
Views
Likes
Replies