I'm trying to use Microsoft Application Insights with my spring boot application.
It uses JAXB to load the xml config from ApplicationInsights.xml (stored in /java/main/resources) using the following code: https://github.com/Microsoft/ApplicationInsights-Java/blob/master/core/src/main/java/com/microsoft/applicationinsights/internal/config/JaxbAppInsightsConfigurationBuilder.java
This works fine when running the spring boot application via gradle (as the resource exists in the normal file system).
However if I create a jar file for this project and attempt to run it then I see the following error:
javax.xml.bind.UnmarshalException
- with linked exception:
[java.io.FileNotFoundException: C:\Users\u\Code\ExperimentationService\file:\C:\Users\u\Code\ExperimentationService\build\libs\experimentationService-0.1.0.jar!\ApplicationInsights.xml (The filename, directory name or volume label syntax is incorrect)]
I see the same problem when running in a linux environment also.
Is there anything I can do to make the xml file available to the unmarshaller or is this something that needs to change in the sdk for Application Insights?